Is there a way to make an edit box accept tab characters? When I hit tab in an edit box it jumps to the next button, but I want it to treat that as a tab character (or turn it into a few 'space' characters). Is there a way to do this? Thanks.
Is there a way to make an edit box accept tab characters? When I hit tab in an edit box it jumps to the next button, but I want it to treat that as a tab character (or turn it into a few 'space' characters). Is there a way to do this? Thanks.
-Grunt (Malek)
Something I've never needed to do. There does not appear to be an obvious answer, I'll think about it.
Of course, you could always process the tab key press yourself and do whatever you like rather than pass it to the default handler.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
AFAIK edit controls will not accept a TAB key as input.
To stop the TAB changing ctrls try removing the
WS_TABSTOP
from your script.rc or uncheck the box in the resource editor.
>>Of course, you could always process the tab key press yourself and do whatever you like rather than pass it to the default handler.
Look at WM_KEYDOWN and VK_TAB. You may be able to write in your own code for a TAB.
Possibly a different ctrl is what you are looking for. Such as a report style listview (columns can act as TAB spacings).
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
I stumbled across a solution when I was trying to find a way to translate WM_CHAR messages. When I was translating messages in my main function, I used to be doing:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!IsDialogMessage(hWndMain, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
But I couldn't get the main handler to ever receive a WM_CHAR or WM_KEYDOWN character, so I thought the !IsDialogMessage might be blocking it. So I remarked it out, and now tab keys actually appear as tab keys in the edit control. This may have some other side effects I haven't discovered yet, but it seems to work so far.
-Grunt (Malek)