BOOL InitInstance ( HANDLE hInstance, int nCmdShow )
{ hInst = hInstance; /* assign instance to global variable */
hWnd = CreateWindow ( szAppName, /* ClassName */
”My Window", /* window title */
WS_OVERLAPPEDWINDOW, /* window style flag*/
70, /* horizontal position */
70, /* vertical position */
NULL, /* handle of parent window */
NULL, /* handle of child or menu */
hInstance, /* handle of app instance */
NULL ); /* window creation data */
if ( !hWnd ) /* If window could not be created, return "failure” */
ShowWindow ( hWnd, nCmdShow ); /* Show the window */
return ( TRUE ); /* Returns the value from PostQuitMessage */