--- pmsdk/samples/petzold/chap02/welco.c 2018/08/09 12:28:13 1.1.1.1 +++ pmsdk/samples/petzold/chap02/welco.c 2018/08/09 12:28:24 1.1.1.2 @@ -3,30 +3,30 @@ ------------------------------------------*/ #include -#include int main (void) { - HAB hab ; - HMQ hmq ; - HWND hwndFrame ; - QMSG qmsg ; - ULONG flFrameFlags = FCF_STANDARD & ~FCF_MENU ; - ULONG flFrameStyle = WS_VISIBLE ; + static ULONG flFrameFlags = FCF_TITLEBAR | FCF_SYSMENU | + FCF_SIZEBORDER | FCF_MINMAX | + FCF_SHELLPOSITION | FCF_TASKLIST ; + HAB hab ; + HMQ hmq ; + HWND hwndFrame ; + QMSG qmsg ; hab = WinInitialize (0) ; hmq = WinCreateMsgQueue (hab, 0) ; hwndFrame = WinCreateStdWindow ( - HWND_DESKTOP, /* Parent window handle */ - flFrameStyle, /* Style of frame window */ - &flFrameFlags, /* Pointer to control data */ - NULL, /* Client window class name */ - "WELCO Program", /* Title bar text */ - 0L, /* Style of client window */ - NULL, /* Module handle for resources */ - 0, /* ID of resources */ - NULL) ; /* Pointer to client window handle */ + HWND_DESKTOP, // Parent window handle + WS_VISIBLE, // Style of frame window + &flFrameFlags, // Pointer to control data + NULL, // Client window class name + NULL, // Title bar text + 0L, // Style of client window + NULL, // Module handle for resources + 0, // ID of resources + NULL) ; // Pointer to client window handle while (WinGetMsg (hab, &qmsg, NULL, 0, 0)) WinDispatchMsg (hab, &qmsg) ; @@ -34,6 +34,5 @@ int main (void) WinDestroyWindow (hwndFrame) ; WinDestroyMsgQueue (hmq) ; WinTerminate (hab) ; - return 0 ; }