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