home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / prog_pm / chap02 / welc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-01-09  |  1.3 KB  |  35 lines

  1. /*----------------------------------------------------------
  2.    WELC.C -- A Program that Creates a Standard Frame Window
  3.   ----------------------------------------------------------*/
  4.  
  5. #include <os2.h>
  6.  
  7. int main (void)
  8.      {
  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.  
  16.      hab = WinInitialize (0) ;
  17.      hmq = WinCreateMsgQueue (hab, 0) ;
  18.  
  19.      hwndFrame = WinCreateStdWindow (
  20.                     HWND_DESKTOP,       // Parent window handle
  21.                     WS_VISIBLE,         // Style of frame window
  22.                     &flFrameFlags,      // Pointer to control data
  23.                     NULL,               // Client window class name
  24.                     NULL,               // Title bar text
  25.                     0L,                 // Style of client window
  26.                     NULL,               // Module handle for resources
  27.                     0,                  // ID of resources
  28.                     NULL) ;             // Pointer to client window handle
  29.  
  30.      WinDestroyWindow (hwndFrame) ;
  31.      WinDestroyMsgQueue (hmq) ;
  32.      WinTerminate (hab) ;
  33.      return 0 ;
  34.      }
  35.