home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / info / prgramer / edmi / issue_1 / gpi / main.c < prev    next >
C/C++ Source or Header  |  1993-02-23  |  995b  |  45 lines

  1. #include <math.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #define INCL_GPI
  5. #define INCL_WIN
  6. #include "supergpi.h"
  7.  
  8. HAB hab;
  9.  
  10. void main(int argc, char *argv[]) {
  11.     HMQ hmq;
  12.     QMSG qmsg;
  13.     HWND hwndFrame,hwndDrawing;
  14.     ULONG flFrameFlags=FCF_TITLEBAR | FCF_SYSMENU | FCF_TASKLIST |
  15.         FCF_SIZEBORDER | FCF_MINMAX | FCF_SHELLPOSITION | FCF_MENU; 
  16.     char szClientClass[]="Advanced GPI Demontration";
  17.  
  18.     hab=WinInitialize(0);
  19.     hmq=WinCreateMsgQueue(hab,0);
  20.     WinRegisterClass(hab,
  21.                      szClientClass,
  22.                      (PFNWP)ClientWndProc,
  23.                      CS_SIZEREDRAW,
  24.                      (USHORT)0);
  25.     hwndFrame=WinCreateStdWindow(HWND_DESKTOP,
  26.                                  WS_VISIBLE,
  27.                                  &flFrameFlags,
  28.                                  szClientClass,
  29.                                  szClientClass,
  30.                                  WS_VISIBLE,
  31.                                  (HMODULE)0L,
  32.                                  ID_GPI,
  33.                                  &hwndDrawing);
  34.     while(WinGetMsg(hab,&qmsg,NULLHANDLE,0L,0L))
  35.         WinDispatchMsg(hab,&qmsg);
  36.     WinDestroyWindow(hwndFrame);
  37.     WinDestroyMsgQueue(hmq);
  38.     WinTerminate(hab);
  39.     return;
  40. }
  41.                                  
  42.  
  43.  
  44.  
  45.