You do not say whether you are using MFC or straight Win32, but in either case you add the code to run the dialog at the point where you capture the command value raised by the menu. For example in Win32 do it in your
WndProc
function like this:
LRESULT CALLBACK WndProc(HWND hWnd,
UINT uMessage,
WPARAM wParam,
LPARAM lParam
)
{
switch (uMessage)
{
case WM_COMMAND:
if (wParam == IDM_MENUCOMMAND)
{
}
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWnd, uMessage, wParam, lParam);
}