|
CMPT 212
Spring 1998
|
InvalidateRec(hwnd, NULL, 1);
int MessageBox(HWND, LPCSTR, LPCSTR, UINT)where
int response;
response = MessageBox(hwnd, "What now?", "Question",
MB_OKCANCEL | MB_ICONQUESTION);
switch (response) {
case IDOK:
... // user pressed "OK" button.
break;
case IDCANCEL:
... // user pressed "Cancel" button.
break;
}
#include "menu.h"
MYMENU MENU
{
POPUP "&File"
{
MENUITEM "&Open", IDM_OPEN
MENUITEM "&Close", IDM_CLOSE
MENUITEM "&Quit", IDM_QUIT
}
POPUP "&Edit"
{
MENUITEM "Cop&y", IDM_COPY
MENUITEM "&Paste", IDM_PASTE
}
MENUITEM "&Help", IDM_HELP
}
Return to lecture notes index |
|
| This page is maintained by simpson@cs.sfu.ca. | Last updated on 23 Mar 1998. |