- 论坛徽章:
- 0
|
回复 7# bruceteen
为什么不能在用TAB键在 g1 和 g2 之间切换焦点??
而且在 g1 里的 2 个按钮也不能用 TAB 键切换焦点,? 什么原因 ,
HWND g1 = CreateWindow(TEXT("button"), TEXT("Choose Color"),
WS_CHILD | WS_VISIBLE | BS_GROUPBOX | WS_TABSTOP,
10, 10, 120, 110, hwnd, (HMENU) 0, g_hinst, NULL);
CreateWindow(TEXT("button"), TEXT("Blue"),
WS_CHILD | WS_VISIBLE,
20, 30, 100, 30, g1 , (HMENU)ID_BLUE , g_hinst, NULL);
CreateWindow(TEXT("button"), TEXT("Yellow"),
WS_CHILD | WS_VISIBLE,
20, 55, 100, 30, g1 , (HMENU)ID_YELLOW , g_hinst, NULL);
HWND g2 = CreateWindow(TEXT("button"), TEXT("Choose Color"),
WS_CHILD | WS_VISIBLE | BS_GROUPBOX | WS_TABSTOP,
10 + 150, 10, 120, 110, hwnd, (HMENU) 1, g_hinst, NULL);
CreateWindow(TEXT("button"), TEXT("Blue"),
WS_CHILD | WS_VISIBLE,
20 + 150, 30, 100, 30, g2 , (HMENU)ID_BLUE2 , g_hinst, NULL);
CreateWindow(TEXT("button"), TEXT("Yellow"),
WS_CHILD | WS_VISIBLE,
20 + 150, 55, 100, 30, g2 , (HMENU)ID_YELLOW2 , g_hinst, NULL); |
|