// zyPrtLib_Demo.cpp : Define class behavior of application 
//

#include "stdafx.h"
#include "zyPrtLib_Demo.h"
#include "zyPrtLib_DemoDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CzyPrtLib_DemoApp

BEGIN_MESSAGE_MAP(CzyPrtLib_DemoApp, CWinApp)
	ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()


// CzyPrtLib_DemoApp Constructor

CzyPrtLib_DemoApp::CzyPrtLib_DemoApp()
{
	// TODO: Add control notification handler codes here, 
	// and place all important initialization function into InitInstance
}


// This is the unique CzyPrtLib_DemoApp object

CzyPrtLib_DemoApp theApp;


// CzyPrtLib_DemoApp Initialization 

BOOL CzyPrtLib_DemoApp::InitInstance()
{
	// If an application list running on Windows XP need to use 
	// ComCtl32.dll Version 6 or a higher version to enable visualisation,
	// InitCommonControlsEx() should be used. Or else, can not build new window.
	INITCOMMONCONTROLSEX InitCtrls;
	InitCtrls.dwSize = sizeof(InitCtrls);
	// Set it to contain all the public control classes that requied in applciation 
	InitCtrls.dwICC = ICC_WIN95_CLASSES;
	InitCommonControlsEx(&InitCtrls);

	CWinApp::InitInstance();

	AfxEnableControlContainer();

	// Standard initialization
	// If some of these functions are unsed, 
	// you can remove the unwanted initialization routines  
	// as following to keep the target code small
	// Modify the registry item for stroage settings
	// TODO: Modification to this character string is requied,
	// such as modifying to company name or organization name
	SetRegistryKey(_T("Native applications generated by application wizard"));

	CzyPrtLib_DemoDlg dlg;
	m_pMainWnd = &dlg;
	INT_PTR nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Add the code hander to process 
		// when to close the dialog box by "OK"
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Add the code hander to process 
		// when to close the dialog box by "Cancel"
	}

	// Since the dialog box has been closed, FALSE will be returned to exit the applicaton 
	// but not the message pump to startup the application
	return FALSE;
}
