Greetings all,
I have several editboxes, and I would like to use "Tab" key to traverse through them, but my program doesn't seem to respond to the "Tab" key.
Is there a setting I need to set in CreateWindowEx?
Any suggestion is appreciated
K.B.
Printable View
Greetings all,
I have several editboxes, and I would like to use "Tab" key to traverse through them, but my program doesn't seem to respond to the "Tab" key.
Is there a setting I need to set in CreateWindowEx?
Any suggestion is appreciated
K.B.
Are you setting the WS_TABSTOP style?
Cheers
Greetings,Quote:
Originally Posted by golanshahar
golanshahar, yes, I did set WS_TABSTOP on all of my edit boxes.
It is still not recognizing the Tab key.
I am creating my edit boxes dynamically with CreateWindowEx(), I did not use a resource script. I looked up similar problems on other posts, and it seems like I have to intercept KEYDOWN & VK_TAB messages, and process them myself.
Does that mean WS_TABSTOP is an useless style for CreateWindowEx()?
Thank you
post your project so that we can build it and test it. Make sure that what you post can be compiled.
What compiler are you using?
Greetings,Quote:
Originally Posted by cvogt61457
cvogt61457, I am using VS 2005 Professional Edition.
Here is my project: Project
The project is created under Win32 Application, and alarm2.wav needs to be added to resource.
The project is compiling with 6 warnings but no errors.
If you stubble across some obvious mistakes while investigating the Tab problem, please point them out, I will greatly appreciate your comments.
Thank you
WS_TABSTOP simply indicates on what controls to stop if the window procedure moves focus from one control to another on TAB key.Quote:
Originally Posted by kabilius
By default, only the Dialog Box proc does it. To make it work in generic window, you should call IsDialogMessage() yourself in your message loop:
Code:// Message Loop
while(GetMessage(&Msg, NULL, 0, 0) > 0)
{
if(IsDialogMessage(hwnd, &Msg) == 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
}
Greetings,Quote:
Originally Posted by VladimirF
VladimirF, after adding IsDialogMessage(), the program is recognizing the TAB key. Problem solved =))
Should I delete my project from the web space now?
Thanks to golanshahar, cvogt61457, and VladimirF for helping me!