I’ve looked at MSDN for about 2 hours so far and I’m still very confused as to how to even use a dialog box. I’ve tried reading several examples on google and just got confused further.
Currently I have a popup menu that has its options just being checked and unchecked and the last item I have on the menu is to make a dialog box show, inside the dialogbox I’m going to have a group box for some radio buttons but I’m unsure of where to create a dialog box or what kind of dialog box to create to be shown by the popup menu.
Is it made in the WM_CREATE message I thought it might be as simple as creating a window bu it doesn’t seem like it?
or is it made in the WM_COMMAND where I trigger my popup menu item.
The case ID_TOOL_TOOLBOX is where the dialog box should be called to be shown or created. But I’m not sure whether its to be created there or even what kind of dialogbox to make.
Or somewhere else different entirely?
case WM_COMMAND:
case ID_TOOL_POLYGON:
CheckMenuItem(hMenu, Selection, MF_UNCHECKED);
Selection = LOWORD(wParam);
CheckMenuItem(hMenu, Selection, MF_CHECKED);
if (GetMenuState(hMenu, Selection, MF_BYCOMMAND) == MF_CHECKED)
{
MessageBox(hwnd, L"Polygon does nothing this is a test popup msgbox.", L"Works", MB_OK);
}
break;
case ID_TOOL_SELECT:
CheckMenuItem(hMenu, Selection, MF_UNCHECKED);
Selection = LOWORD(wParam);
CheckMenuItem(hMenu, Selection, MF_CHECKED);
break;
case ID_TOOL_TOOLBOX:
This is one of the first hits that shows up when we search for “win32 ShowDialog”:
http://www.functionx.com/win32/Lesson04.htm