Hi,
Here a code part that create a group box and radio button
here is the part in WM_COMMAND..
and this WM_COMMAND is related with hGroup window's Mother window i.e. main window in my program.
The problem is on click action 10010 or 10011 never get called.
I have realized one possible reason. The reason is the WndProc is related with main window it only process its child window but not grand child (:)) Radiobuttons are not main windows child. in that case what would be the best solution to toggle between radio buttons.
Please let me know.
Best regards,
Johny
Here a code part that create a group box and radio button
Code:
hGroup=CreateWindowEx(0,L"BUTTON",L"Choose Connection type", WS_CHILD|WS_VISIBLE|BS_GROUPBOX|WS_GROUP,30,180,300,85,hWnd,(HMENU)10006,hInstance, NULL); CreateWindowEx(0,L"BUTTON",L"Direct Connection",WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON, 10,17,280,30,hGroup,(HMENU) 10010,hInstance ,NULL); CreateWindowEx(0,L"BUTTON",L"XML Connection",WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON, 10,47,280,30,hGroup,(HMENU) 10011,hInstance,NULL);
Code:
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case 10010:
setRadiocehck(hGroup,GetDlgItem(hGroup,10010));
break;
case 10011:
setRadiocehck(hGroup,GetDlgItem(hGroup,10011));
break;
}
The problem is on click action 10010 or 10011 never get called.
I have realized one possible reason. The reason is the WndProc is related with main window it only process its child window but not grand child (:)) Radiobuttons are not main windows child. in that case what would be the best solution to toggle between radio buttons.
Please let me know.
Best regards,
Johny
Comment