1 /*M///////////////////////////////////////////////////////////////////////////////////////
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
10 // Intel License Agreement
11 // For Open Source Computer Vision Library
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
14 // Third party copyrights are property of their respective owners.
16 // Redistribution and use in source and binary forms, with or without modification,
17 // are permitted provided that the following conditions are met:
19 // * Redistribution's of source code must retain the above copyright notice,
20 // this list of conditions and the following disclaimer.
22 // * Redistribution's in binary form must reproduce the above copyright notice,
23 // this list of conditions and the following disclaimer in the documentation
24 // and/or other materials provided with the distribution.
26 // * The name of Intel Corporation may not be used to endorse or promote products
27 // derived from this software without specific prior written permission.
29 // This software is provided by the copyright holders and contributors "as is" and
30 // any express or implied warranties, including, but not limited to, the implied
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
33 // indirect, incidental, special, exemplary, or consequential damages
34 // (including, but not limited to, procurement of substitute goods or services;
35 // loss of use, data, or profits; or business interruption) however caused
36 // and on any theory of liability, whether in contract, strict liability,
37 // or tort (including negligence or otherwise) arising in any way out of
38 // the use of this software, even if advised of the possibility of such damage.
40 //M*/// LkDemo.cpp : Defines the class behaviors for the application.
47 #include "LkDemoDoc.h"
48 #include "LkDemoView.h"
53 static char THIS_FILE[] = __FILE__;
56 /////////////////////////////////////////////////////////////////////////////
59 BEGIN_MESSAGE_MAP(CLkDemoApp, CWinApp)
60 //{{AFX_MSG_MAP(CLkDemoApp)
61 ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
62 // NOTE - the ClassWizard will add and remove mapping macros here.
63 // DO NOT EDIT what you see in these blocks of generated code!
65 // Standard file based document commands
66 ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
67 ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
70 /////////////////////////////////////////////////////////////////////////////
71 // CLkDemoApp construction
73 CLkDemoApp::CLkDemoApp()
75 // TODO: add construction code here,
76 // Place all significant initialization in InitInstance
79 /////////////////////////////////////////////////////////////////////////////
80 // The one and only CLkDemoApp object
84 /////////////////////////////////////////////////////////////////////////////
85 // CLkDemoApp initialization
87 BOOL CLkDemoApp::InitInstance()
89 AfxEnableControlContainer();
91 // Standard initialization
92 // If you are not using these features and wish to reduce the size
93 // of your final executable, you should remove from the following
94 // the specific initialization routines you do not need.
97 Enable3dControls(); // Call this when using MFC in a shared DLL
99 Enable3dControlsStatic(); // Call this when linking to MFC statically
102 // Change the registry key under which our settings are stored.
103 // TODO: You should modify this string to be something appropriate
104 // such as the name of your company or organization.
105 SetRegistryKey(_T("Local AppWizard-Generated Applications"));
107 LoadStdProfileSettings(); // Load standard INI file options (including MRU)
109 // Register the application's document templates. Document templates
110 // serve as the connection between documents, frame windows and views.
112 CSingleDocTemplate* pDocTemplate;
113 pDocTemplate = new CSingleDocTemplate(
115 RUNTIME_CLASS(CLkDemoDoc),
116 RUNTIME_CLASS(CMainFrame), // main SDI frame window
117 RUNTIME_CLASS(CLkDemoView));
118 AddDocTemplate(pDocTemplate);
120 // Parse command line for standard shell commands, DDE, file open
121 CCommandLineInfo cmdInfo;
122 ParseCommandLine(cmdInfo);
124 // Dispatch commands specified on the command line
125 if (!ProcessShellCommand(cmdInfo))
128 // The one and only window has been initialized, so show and update it.
129 m_pMainWnd->ShowWindow(SW_SHOW);
130 m_pMainWnd->UpdateWindow();
136 /////////////////////////////////////////////////////////////////////////////
137 // CAboutDlg dialog used for App About
139 class CAboutDlg : public CDialog
145 //{{AFX_DATA(CAboutDlg)
146 enum { IDD = IDD_ABOUTBOX };
149 // ClassWizard generated virtual function overrides
150 //{{AFX_VIRTUAL(CAboutDlg)
152 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
157 //{{AFX_MSG(CAboutDlg)
158 // No message handlers
160 DECLARE_MESSAGE_MAP()
163 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
165 //{{AFX_DATA_INIT(CAboutDlg)
169 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
171 CDialog::DoDataExchange(pDX);
172 //{{AFX_DATA_MAP(CAboutDlg)
176 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
177 //{{AFX_MSG_MAP(CAboutDlg)
178 // No message handlers
182 // App command to run the dialog
183 void CLkDemoApp::OnAppAbout()
189 /////////////////////////////////////////////////////////////////////////////
190 // CLkDemoApp message handlers