iMONDisplayApiSample/DisplayTest/DisplayTest.cpp
author sl
Mon, 21 Apr 2014 10:04:44 +0200
changeset 13 6828ef797524
permissions -rw-r--r--
Adding API header files to project.
     1 // DisplayTest.cpp : Defines the class behaviors for the application.
     2 //
     3 
     4 #include "stdafx.h"
     5 #include "DisplayTest.h"
     6 #include "DisplayTestDlg.h"
     7 
     8 #ifdef _DEBUG
     9 #define new DEBUG_NEW
    10 #endif
    11 
    12 
    13 // CDisplayTestApp
    14 
    15 BEGIN_MESSAGE_MAP(CDisplayTestApp, CWinApp)
    16 	ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
    17 END_MESSAGE_MAP()
    18 
    19 
    20 // CDisplayTestApp construction
    21 
    22 CDisplayTestApp::CDisplayTestApp()
    23 {
    24 	// TODO: add construction code here,
    25 	// Place all significant initialization in InitInstance
    26 }
    27 
    28 
    29 // The one and only CDisplayTestApp object
    30 
    31 CDisplayTestApp theApp;
    32 
    33 
    34 // CDisplayTestApp initialization
    35 
    36 BOOL CDisplayTestApp::InitInstance()
    37 {
    38 	// InitCommonControlsEx() is required on Windows XP if an application
    39 	// manifest specifies use of ComCtl32.dll version 6 or later to enable
    40 	// visual styles.  Otherwise, any window creation will fail.
    41 	INITCOMMONCONTROLSEX InitCtrls;
    42 	InitCtrls.dwSize = sizeof(InitCtrls);
    43 	// Set this to include all the common control classes you want to use
    44 	// in your application.
    45 	InitCtrls.dwICC = ICC_WIN95_CLASSES;
    46 	InitCommonControlsEx(&InitCtrls);
    47 
    48 	CWinApp::InitInstance();
    49 
    50 	AfxEnableControlContainer();
    51 
    52 	// Standard initialization
    53 	// If you are not using these features and wish to reduce the size
    54 	// of your final executable, you should remove from the following
    55 	// the specific initialization routines you do not need
    56 	// Change the registry key under which our settings are stored
    57 	// TODO: You should modify this string to be something appropriate
    58 	// such as the name of your company or organization
    59 	SetRegistryKey(_T("Local AppWizard-Generated Applications"));
    60 
    61 	CDisplayTestDlg dlg;
    62 	m_pMainWnd = &dlg;
    63 	INT_PTR nResponse = dlg.DoModal();
    64 	if (nResponse == IDOK)
    65 	{
    66 		// TODO: Place code here to handle when the dialog is
    67 		//  dismissed with OK
    68 	}
    69 	else if (nResponse == IDCANCEL)
    70 	{
    71 		// TODO: Place code here to handle when the dialog is
    72 		//  dismissed with Cancel
    73 	}
    74 
    75 	// Since the dialog has been closed, return FALSE so that we exit the
    76 	//  application, rather than start the application's message pump.
    77 	return FALSE;
    78 }