Sample Application Main Routine (Part 2) - Window Creation
fcdata.flCreateFlags = FCF_TITLEBAR | FCF_SYSMENU |
FCF_SIZEBORDER | FCF_MINMAX |
FCF_SHELLPOSITION;
hFrame=WinCreateWindow(HWND_DESKTOP, /* Create frame window */
WC_FRAME, /* Frame window class */
(PSZ)0, /* No window text */
0L, /* No style */
0,0,0,0, /* PM shell will position */
(HWND)0, /* No owner */
HWND_TOP, /* On top of siblings */
0, /* No window identifier */
&fcdata, /* Frame control data */
0); /* Presentation parameters */
hClient=WinCreateWindow(hFrame, /* Create client window */
WCP_MAIN, /* Window class */
szTitle, /* Window title */
01, /* Standard style */
0,0,0,0, /* PM shell will position */
(HWND)0, /* No owner */
HWND_TOP, /* On top of siblings */
FID_CLIENT, /* Client window identifier */
&InitData, /* Initialization data */
0); /* Presentation parameters */
/* <Create Window List entry for application> */
while (WinGetMsg(hAB, &qMsg, 0, 0, 0))
WinDispatchMsg(hAB, &qMsg);
/* <Remove Window List entry for application> */
WinDestroyWindow(hFrame); /* Destroy frame & children */
WinDestroyMsgQueue(hMsgQ); /* Destroy message queue */
WinTerminate(hAB); /* Deregister application */
}
[Back: Sample Application Main Routine (Part 1) - Registration]
[Next: WinAddSwitchEntry() Function]