Professional Documents
Culture Documents
h>
#include "main.h"
/* Declare WindowsProcedure */
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
/* Make the classname into a global variable */
char szClassName[] = "Windows Example";
HINSTANCE hThisInstance;
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application is saved */
WNDCLASSEX wincl; /* Datastructure for the windowclass */
HMENU menu; /* Handle of the menu */
case IDM_EDITUNDO:
case IDM_EDITCUT:
case IDM_EDITCOPY:
case IDM_EDITPASTE:
case IDM_EDITDELETE:
MessageBox( hwnd, (LPSTR) "Function Not Yet Implemented.",
(LPSTR) szClassName,
MB_ICONINFORMATION | MB_OK );
return 0;
case IDM_HELPCONTENTS:
WinHelp( hwnd, (LPSTR) "HELPFILE.HLP",
HELP_CONTENTS, 0L );
return 0;
case IDM_HELPSEARCH:
WinHelp( hwnd, (LPSTR) "HELPFILE.HLP",
HELP_PARTIALKEY, 0L );
return 0;
case IDM_HELPHELP:
WinHelp( hwnd, (LPSTR) "HELPFILE.HLP",
HELP_HELPONHELP, 0L );
return 0;
case IDM_FILEEXIT:
SendMessage( hwnd, WM_CLOSE, 0, 0L );
return 0;
case IDM_HELPABOUT:
MessageBox (NULL, "About..." , "Windows example version 0.01",
1);
return 0;
}
break;
case WM_CLOSE:
DestroyWindow( hwnd );
return 0;
case WM_DESTROY:
PostQuitMessage (0);
return 0;
break;
default: /* for messages that we don't deal with */
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}