home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
info
/
prgramer
/
edmi
/
issue_1
/
gpi
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-02-23
|
995b
|
45 lines
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define INCL_GPI
#define INCL_WIN
#include "supergpi.h"
HAB hab;
void main(int argc, char *argv[]) {
HMQ hmq;
QMSG qmsg;
HWND hwndFrame,hwndDrawing;
ULONG flFrameFlags=FCF_TITLEBAR | FCF_SYSMENU | FCF_TASKLIST |
FCF_SIZEBORDER | FCF_MINMAX | FCF_SHELLPOSITION | FCF_MENU;
char szClientClass[]="Advanced GPI Demontration";
hab=WinInitialize(0);
hmq=WinCreateMsgQueue(hab,0);
WinRegisterClass(hab,
szClientClass,
(PFNWP)ClientWndProc,
CS_SIZEREDRAW,
(USHORT)0);
hwndFrame=WinCreateStdWindow(HWND_DESKTOP,
WS_VISIBLE,
&flFrameFlags,
szClientClass,
szClientClass,
WS_VISIBLE,
(HMODULE)0L,
ID_GPI,
&hwndDrawing);
while(WinGetMsg(hab,&qmsg,NULLHANDLE,0L,0L))
WinDispatchMsg(hab,&qmsg);
WinDestroyWindow(hwndFrame);
WinDestroyMsgQueue(hmq);
WinTerminate(hab);
return;
}