#pragma	title("Notebook Example  --  Version 1.0  --  (Notebook.C)")
#pragma	subtitle("   main( ) - Interface Definitions")

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

#if defined(__IBMC__)

#pragma	info(nopar)

#endif

#include <os2.h>

#include "appdefs.h"
#include "notebook.h"

/* This	module contains	routine	used to	handle main entry to program.	*/

/* Filename:   Notebook.C						*/

/*  Version:   1.0							*/
/*  Created:   1994-08-22						*/
/*  Revised:   1994-08-22						*/

/* Routines:   INT main(INT argc, CHAR *argv[ ]);			*/


/* Copyright ¸ 1994  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.								*/
/************************************************************************/
/************************************************************************/

PSZ pszNotebookClassName = "Notebook";

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

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

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

hmqNotebook = WinCreateMsgQueue(hAB = WinInitialize(0),	0);

		       /* Register the window class			*/

if ( !WinRegisterClass(hAB, pszNotebookClassName, (PFNWP)ExampleWndProc,
		       CS_SYNCPAINT | CS_SIZEREDRAW, 0)	)
   return(0);

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

if ( !(hwndNotebookFrame = CreateStdWindow(HWND_DESKTOP, WS_VISIBLE,
					   FCF_NOBYTEALIGN | FCF_TITLEBAR |
					   FCF_ICON | FCF_SYSMENU | FCF_MENU |
					   FCF_MINMAX |	FCF_SIZEBORDER,
					   pszNotebookClassName, "Notebook Window", 0L,
					   (HMODULE)NULL, WIN_MAIN, &hwndNotebook, 2, 20, 401, 244)) )
   return(0);

InitApp(hwndNotebookFrame, hwndNotebook, "Notebook Example");

		       /* Get and dispatch the message to program	*/
		       /* windows					*/

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

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

WinDestroyWindow(hwndNotebookFrame);
WinDestroyMsgQueue(hmqNotebook);

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