Sample Application Main Routine (Part 1) - Registration
#define INCL_WIN
#include <os2.h>
#define WCP_MAIN "WCP_MAIN"
MRESULT EXPENTRY wpMain(HWND,ULONG,MPARAM,MPARAM);
int main()
{
struct MYSTRUCT InitData;
static CHAR szTitle[] = "Main Window";
FRAMECDATA fcdata; /* Control data for window */
HAB hAB; /* Anchor block handle */
HMQ hMsgQ; /* Message queue handle */
HWND hFrame, hClient; /* Window handles */
QMSG qMsg; /* Message queue structure */
APIRET rc; /* Flag */
hAB = WinInitialize(0); /* Register appl. to PM */
hMsgQ = WinCreateMsgQueue(hAB,0); /* Create message queue */
rc = WinRegisterClass(hAB, /* Register window class */
WCP_MAIN, /* Name of class */
wpMain, /* Window procedure name */
0L, /* No style */
4); /* 32 bits in window words */
[Back: Allocating Shared Memory]
[Next: Sample Application Main Routine (Part 2) - Window Creation]