| Stewbond (1676) | |||||||
|
I'm having trouble moving around my Win32 app with the TAB key. I'm using only the windows pre-existing registered classes. When I press TAB, I can select the button, but it never goes to the edit boxes. The format is something like this:
My boxes, buttons and group boxes are created like so:
I tried adding WS_TABSTOP to the group-box and I do see a difference (The button is only selected every 3rd TAB stroke), but I can't get the cursor to appear in any of the edit boxes. In my main loop I do check IsDialogMessage():
Any ideas? | |||||||
|
|
|||||||
| Stewbond (1676) | |||
|
I don't know of a better way to do it, but I've got it working. The answer was to put all of my edit boxes in the main window. This means that if anything in my main window is selected when I hit TAB, it'll go to the next object in my main window that has WS_TABSTOP. The disadvantage is that I can't just move around group boxes easily anymore since the coordinates of the edit boxes are now relative to the top left pixel of the main window instead of the group-box that it is in. My new Parent-Child tree now looks like this, which is less convenient
I'm guessing that I'd have to make a customer class and register it if I want to send messages such as WM_KEYDOWN: VK_TAB to the parent window. If anyone has any other ideas. I am very happy to listen! | |||
|
|
|||