
// NSeries_SDK_USB_ETH.cpp 
//

#include "pch.h"
#include "framework.h"
#include "NSeries_SDK_USB_ETH.h"
#include "NSeries_SDK_USB_ETHDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CNSERIESSDKUSBETHApp

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


// CNSERIESSDKUSBETHApp Generation

CNSERIESSDKUSBETHApp::CNSERIESSDKUSBETHApp()
{
	m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

}



CNSERIESSDKUSBETHApp theApp;


// CNSERIESSDKUSBETHApp Initialization

BOOL CNSERIESSDKUSBETHApp::InitInstance()
{
	INITCOMMONCONTROLSEX InitCtrls;
	InitCtrls.dwSize = sizeof(InitCtrls);

	InitCtrls.dwICC = ICC_WIN95_CLASSES;
	InitCommonControlsEx(&InitCtrls);

	CWinApp::InitInstance();


	AfxEnableControlContainer();

	CShellManager *pShellManager = new CShellManager;

	CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));

	SetRegistryKey(_T("Application generated by local application wizard"));

	CNSERIESSDKUSBETHDlg dlg;
	m_pMainWnd = &dlg;
	INT_PTR nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
	}
	else if (nResponse == IDCANCEL)
	{
	}
	else if (nResponse == -1)
	{
		TRACE(traceAppMsg, 0, "Warning: The applicaiton is closed because a dialog box couldn't be generated.\n");
		TRACE(traceAppMsg, 0, "Warning: in the dialog box, if the MFC control is used, #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS can't be executed.\n");
	}

	if (pShellManager != nullptr)
	{
		delete pShellManager;
	}

#if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS)
	ControlBarCleanUp();
#endif

	return FALSE;
}

