I've created several controls in my window in the WM_CREATE message handler and I want to allow using the tab key to advance the focus through the set of controls from one to the next.
The control creation is like this:
case WM_CREATE:
{
CreateWindowA("button", "Refresh Listview",
BS_MULTILINE | WS_CHILD | WS_VISIBLE, 10, 10, 70, 50,
hwnd, (HMENU)IDC_REFRESHLW, g_hInst, NULL);
break;
}
When I press the tab key to change the focus to another control in the window it does nothing. Do I have to initialize it somehow?
I noticed if I use a dialog, it already automatically allows using the tab key and the tab order is the order in which you create the controls in the .rc file.
But I don't want a dialog!