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

1.1     ! root        1: /*------------------------------------------
        !             2:    WELCO.C -- A Program with a Message Loop
        !             3:   ------------------------------------------*/
        !             4: 
        !             5: #include <os2.h>
        !             6: #include <stddef.h>
        !             7: 
        !             8: int main (void)
        !             9:      {
        !            10:      HAB   hab ;
        !            11:      HMQ   hmq ;
        !            12:      HWND  hwndFrame ;
        !            13:      QMSG  qmsg ;
        !            14:      ULONG flFrameFlags = FCF_STANDARD & ~FCF_MENU ;
        !            15:      ULONG flFrameStyle = WS_VISIBLE ;
        !            16: 
        !            17:      hab = WinInitialize (0) ;
        !            18:      hmq = WinCreateMsgQueue (hab, 0) ;
        !            19: 
        !            20:      hwndFrame = WinCreateStdWindow (
        !            21:                     HWND_DESKTOP,       /* Parent window handle            */
        !            22:                     flFrameStyle,       /* Style of frame window           */
        !            23:                    &flFrameFlags,      /* Pointer to control data         */
        !            24:                     NULL,               /* Client window class name        */
        !            25:                     "WELCO Program",    /* 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 */
        !            30: 
        !            31:      while (WinGetMsg (hab, &qmsg, NULL, 0, 0))
        !            32:           WinDispatchMsg (hab, &qmsg) ;
        !            33: 
        !            34:      WinDestroyWindow (hwndFrame) ;
        !            35:      WinDestroyMsgQueue (hmq) ;
        !            36:      WinTerminate (hab) ;
        !            37: 
        !            38:      return 0 ;
        !            39:      }

unix.superglobalmegacorp.com

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