1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/iMONDisplayApiSample/DisplayTest/DisplayTest.cpp Sun Apr 14 22:40:46 2013 +0200
1.3 @@ -0,0 +1,78 @@
1.4 +// DisplayTest.cpp : Defines the class behaviors for the application.
1.5 +//
1.6 +
1.7 +#include "stdafx.h"
1.8 +#include "DisplayTest.h"
1.9 +#include "DisplayTestDlg.h"
1.10 +
1.11 +#ifdef _DEBUG
1.12 +#define new DEBUG_NEW
1.13 +#endif
1.14 +
1.15 +
1.16 +// CDisplayTestApp
1.17 +
1.18 +BEGIN_MESSAGE_MAP(CDisplayTestApp, CWinApp)
1.19 + ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
1.20 +END_MESSAGE_MAP()
1.21 +
1.22 +
1.23 +// CDisplayTestApp construction
1.24 +
1.25 +CDisplayTestApp::CDisplayTestApp()
1.26 +{
1.27 + // TODO: add construction code here,
1.28 + // Place all significant initialization in InitInstance
1.29 +}
1.30 +
1.31 +
1.32 +// The one and only CDisplayTestApp object
1.33 +
1.34 +CDisplayTestApp theApp;
1.35 +
1.36 +
1.37 +// CDisplayTestApp initialization
1.38 +
1.39 +BOOL CDisplayTestApp::InitInstance()
1.40 +{
1.41 + // InitCommonControlsEx() is required on Windows XP if an application
1.42 + // manifest specifies use of ComCtl32.dll version 6 or later to enable
1.43 + // visual styles. Otherwise, any window creation will fail.
1.44 + INITCOMMONCONTROLSEX InitCtrls;
1.45 + InitCtrls.dwSize = sizeof(InitCtrls);
1.46 + // Set this to include all the common control classes you want to use
1.47 + // in your application.
1.48 + InitCtrls.dwICC = ICC_WIN95_CLASSES;
1.49 + InitCommonControlsEx(&InitCtrls);
1.50 +
1.51 + CWinApp::InitInstance();
1.52 +
1.53 + AfxEnableControlContainer();
1.54 +
1.55 + // Standard initialization
1.56 + // If you are not using these features and wish to reduce the size
1.57 + // of your final executable, you should remove from the following
1.58 + // the specific initialization routines you do not need
1.59 + // Change the registry key under which our settings are stored
1.60 + // TODO: You should modify this string to be something appropriate
1.61 + // such as the name of your company or organization
1.62 + SetRegistryKey(_T("Local AppWizard-Generated Applications"));
1.63 +
1.64 + CDisplayTestDlg dlg;
1.65 + m_pMainWnd = &dlg;
1.66 + INT_PTR nResponse = dlg.DoModal();
1.67 + if (nResponse == IDOK)
1.68 + {
1.69 + // TODO: Place code here to handle when the dialog is
1.70 + // dismissed with OK
1.71 + }
1.72 + else if (nResponse == IDCANCEL)
1.73 + {
1.74 + // TODO: Place code here to handle when the dialog is
1.75 + // dismissed with Cancel
1.76 + }
1.77 +
1.78 + // Since the dialog has been closed, return FALSE so that we exit the
1.79 + // application, rather than start the application's message pump.
1.80 + return FALSE;
1.81 +}