Annotation of pmsdk/samples/petzold/chap02/welco.c, revision 1.1.1.2

1.1       root        1: /*------------------------------------------
                      2:    WELCO.C -- A Program with a Message Loop
                      3:   ------------------------------------------*/
                      4: 
                      5: #include <os2.h>
                      6: 
                      7: int main (void)
                      8:      {
1.1.1.2 ! root        9:      static ULONG flFrameFlags = FCF_TITLEBAR      | FCF_SYSMENU |
        !            10:                                  FCF_SIZEBORDER    | FCF_MINMAX  |
        !            11:                                  FCF_SHELLPOSITION | FCF_TASKLIST ;
        !            12:      HAB          hab ;
        !            13:      HMQ          hmq ;
        !            14:      HWND         hwndFrame ;
        !            15:      QMSG         qmsg ;
1.1       root       16: 
                     17:      hab = WinInitialize (0) ;
                     18:      hmq = WinCreateMsgQueue (hab, 0) ;
                     19: 
                     20:      hwndFrame = WinCreateStdWindow (
1.1.1.2 ! root       21:                     HWND_DESKTOP,       // Parent window handle
        !            22:                     WS_VISIBLE,         // Style of frame window
        !            23:                     &flFrameFlags,      // Pointer to control data
        !            24:                     NULL,               // Client window class name
        !            25:                     NULL,               // Title bar text
        !            26:                     0L,                 // Style of client window
        !            27:                     NULL,               // Module handle for resources
        !            28:                     0,                  // ID of resources
        !            29:                     NULL) ;             // Pointer to client window handle
1.1       root       30: 
                     31:      while (WinGetMsg (hab, &qmsg, NULL, 0, 0))
                     32:           WinDispatchMsg (hab, &qmsg) ;
                     33: 
                     34:      WinDestroyWindow (hwndFrame) ;
                     35:      WinDestroyMsgQueue (hmq) ;
                     36:      WinTerminate (hab) ;
                     37:      return 0 ;
                     38:      }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.