回复 9# 三月廿七
搞定了,原来你将 radiobutton 设为 groupbox 的子控件了- HWND g1 = CreateWindow(TEXT("Button"), TEXT("Choose Color"),
- WS_CHILDWINDOW | WS_VISIBLE | BS_GROUPBOX,
- 10, 10, 120, 110, hwnd, (HMENU)0, g_hinst, NULL);
- CreateWindow(TEXT("Button"), TEXT("Blue"),
- WS_CHILDWINDOW | WS_VISIBLE | BS_AUTORADIOBUTTON | WS_GROUP,
- 20, 30, 80, 30, hwnd , (HMENU)ID_BLUE , g_hinst, NULL);
- CreateWindow(TEXT("Button"), TEXT("Yellow"),
- WS_CHILDWINDOW | WS_VISIBLE | BS_AUTORADIOBUTTON,
- 20, 55, 80, 30, hwnd , (HMENU)ID_YELLOW , g_hinst, NULL);
- HWND g2 = CreateWindow(TEXT("Button"), TEXT("Choose Color2"),
- WS_CHILDWINDOW | WS_VISIBLE | BS_GROUPBOX,
- 10+150, 10, 120, 110, hwnd, (HMENU)1, g_hinst, NULL);
- CreateWindow(TEXT("Button"), TEXT("Blue2"),
- WS_CHILDWINDOW | WS_VISIBLE | BS_AUTORADIOBUTTON | WS_GROUP,
- 20+150, 30, 80, 30, hwnd , (HMENU)ID_BLUE2 , g_hinst, NULL);
- CreateWindow(TEXT("Button"), TEXT("Yellow2"),
- WS_CHILDWINDOW | WS_VISIBLE | BS_AUTORADIOBUTTON,
- 20+150, 55, 80, 30, hwnd , (HMENU)ID_YELLOW2 , g_hinst, NULL);
复制代码 |