#pragma	title("Test Bed Application  --  Version 1.1   -- (TestBed.C)")
#pragma	subtitle("  main( ) -   Interface Definitions")

#if defined(__IBMC__)

#pragma	info(noext, nopar)

#endif

#define	INCL_DOS		   /* Include OS/2 PM DOS Kernal	*/
#define	INCL_WIN		   /* Include OS/2 PM Windows Interface	*/

static char *PROGID = "@(#)testbed.c:1.00";

#include <os2.h>

#include "appdefs.h"

#include "testbed.h"

/* This	is the main program module for the Test	Bed Application.  It	*/
/* performs program initialization/termination and provides the	main	*/
/* dispatch controller.	 The program requires OS/2 Version 2.0 or	*/
/* above.								*/
/*									*/
/* The application was created using Resource Editor for OS/2 and the	*/
/* design is contained within the TestBed.Pdf file.			*/
/*									*/
/*									*/
/*     Icc -C -G3 -O+ -Rn -W3 -Fofilename filename.C			*/

/* Filename:   TestBed.C						*/

/*  Version:   1.1							*/
/*  Created:   1993-12-21						*/
/*  Revised:   1995-11-03						*/


/* Copyright ¸ 1989-1995  Prominare Inc.  All Rights Reserved.		*/

/* --------------------------------------------------------------------	*/

/************************************************************************/
/************************************************************************/
/*		       DISCLAIMER OF WARRANTIES.			*/
/************************************************************************/
/************************************************************************/
/*     The following [enclosed]	code is	library	code created by		*/
/*     Prominare Inc.  This library code is  provided to you solely	*/
/*     for the purpose of assisting you	in the development of your	*/
/*     applications.  The code is provided "AS IS", without		*/
/*     warranty	of any kind.  Prominare	Inc. shall not be liable	*/
/*     for any damages arising out of your use of the library code,	*/
/*     even if they have been advised of the possibility of such	*/
/*     damages.								*/
/************************************************************************/
/************************************************************************/


/* --- Module Definitions ---------------------------------------------	*/

PSZ pszTestBedClassName	= "TestBed";

INT main(INT argc, CHAR	*argv[ ])

{
QMSG  qmsg;			   /* PM Message Queue Holder		*/

		       /* Initialize the program for PM	and create the	*/
		       /* message queue					*/

WinSetCp(hmqTestBed = WinCreateMsgQueue(hAB = WinInitialize(0UL), 0L), 850UL);

		       /* Register the window class			*/

if ( !WinRegisterClass(hAB, pszTestBedClassName, (PFNWP)TestWndProc, CS_SYNCPAINT | CS_SIZEREDRAW, 0UL)	)
   return(0);

RegisterIDBox(hAB);
		       /* Create the main program window		*/

if ( !(hwndTestBedFrame	= CreateStdWindow(HWND_DESKTOP,	WS_VISIBLE, FCF_NOBYTEALIGN | FCF_TASKLIST | FCF_TITLEBAR | FCF_ICON |
					  FCF_SYSMENU |	FCF_MENU | FCF_MINMAX |	FCF_ACCELTABLE | FCF_BORDER,
					  pszTestBedClassName, (PSZ)"PMCX Test Facility", 0L,
					  (HMODULE)NULL, ID_WINDOW, &hwndTestBed, 8, 23, 170, 50)) )
   return(0);
InitProg( );
		       /* Get and dispatch the message to program	*/
		       /* windows					*/

while (	WinGetMsg(hAB, &qmsg, (HWND)NULL, 0UL, 0UL) )
   WinDispatchMsg(hAB, &qmsg);

		       /* Have received	a WM_QUIT, start the program	*/
		       /* shutdown by destroying the program windows	*/
		       /* and destroying the message queue		*/

WinDestroyWindow(hwndTestBedFrame);
WinDestroyMsgQueue(hmqTestBed);

		       /* Notify PM that main program thread not needed	*/
		       /* any longer					*/
WinTerminate(hAB);
		       /* Exit back to OS/2 cleanly			*/
return(0);
}
