My Buttons cannot get focus!
I create 2 buttons and one input box dynamically.
I use this code:
HWND hwndG1B1,hwndG1B2,hwndG1B3; hwndG1B1 = CreateWindow( L"button", L"OK", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP, SCALEX(30), SCALEY(172), SCALEX(80), SCALEY(22), hWnd, (HMENU) ID_BUTTON1,g_hInst, NULL ); hwndG1B2 = CreateWindow( L"button", L"Cancel", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP, SCALEX(130), SCALEY(172), SCALEX(80), SCALEY(22), hWnd, (HMENU) ID_BUTTON2,g_hInst, NULL ); hwndG1B3 = CreateWindow(_T("EDIT"), L"", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, SCALEX(30), SCALEY(140), SCALEX(180), SCALEY(22), hWnd, (HMENU)IDC_EDIT_BOX1, g_hInst, 0); |
then if I give
SetFocus(hwndG1B1); |
But if I give the focus to the input box
SetFocus(hwndG1B3); |
What am I doing wrong?
Also: How can I make this code so that I can navigate from one button to another using the UP or RIGHT arrow of the Pocket PC? (Something like when you click TAB in the PC)
Thanks a lot.
Giorgos

