| /* ********************************************************** |
| * Copyright (c) 2008 VMware, Inc. All rights reserved. |
| * **********************************************************/ |
| |
| /* |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions are met: |
| * |
| * * Redistributions of source code must retain the above copyright notice, |
| * this list of conditions and the following disclaimer. |
| * |
| * * Redistributions in binary form must reproduce the above copyright notice, |
| * this list of conditions and the following disclaimer in the documentation |
| * and/or other materials provided with the distribution. |
| * |
| * * Neither the name of VMware, Inc. nor the names of its contributors may be |
| * used to endorse or promote products derived from this software without |
| * specific prior written permission. |
| * |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| * ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE |
| * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
| * DAMAGE. |
| */ |
| |
| /* Copyright (c) 2003-2007 Determina Corp. */ |
| /* Copyright (c) 2002-2003 Massachusetts Institute of Technology */ |
| /* Copyright (c) 2002 Hewlett-Packard Company */ |
| |
| #include "stdafx.h" |
| #include "Wizard.h" |
| #include "WizSheet.h" |
| |
| #ifdef _DEBUG |
| #define new DEBUG_NEW |
| #undef THIS_FILE |
| static char THIS_FILE[] = __FILE__; |
| #endif |
| |
| ///////////////////////////////////////////////////////////////////////////// |
| // CWizardApp |
| |
| BEGIN_MESSAGE_MAP(CWizardApp, CWinApp) |
| //{{AFX_MSG_MAP(CWizardApp) |
| // NOTE - the ClassWizard will add and remove mapping macros here. |
| // DO NOT EDIT what you see in these blocks of generated code! |
| //}}AFX_MSG |
| ON_COMMAND(ID_HELP, CWinApp::OnHelp) |
| END_MESSAGE_MAP() |
| |
| ///////////////////////////////////////////////////////////////////////////// |
| // CWizardApp construction |
| |
| CWizardApp::CWizardApp() |
| { |
| // TODO: add construction code here, |
| // Place all significant initialization in InitInstance |
| } |
| |
| ///////////////////////////////////////////////////////////////////////////// |
| // The one and only CWizardApp object |
| |
| CWizardApp theApp; |
| |
| ///////////////////////////////////////////////////////////////////////////// |
| // CWizardApp initialization |
| |
| BOOL CWizardApp::InitInstance() |
| { |
| // Standard initialization |
| // If you are not using these features and wish to reduce the size |
| // of your final executable, you should remove from the following |
| // the specific initialization routines you do not need. |
| |
| #ifdef USE_VC60 /* deprecated in VC7.1: not needed anymore */ |
| # ifdef _AFXDLL |
| Enable3dControls(); // Call this when using MFC in a shared DLL |
| # else |
| Enable3dControlsStatic(); // Call this when linking to MFC statically |
| # endif |
| #endif |
| |
| CWizardSheet dlg(IDS_SAMPLEWIZARD, NULL, 0); |
| dlg.m_psh.hInstance = ::GetModuleHandle(NULL); |
| m_pMainWnd = &dlg; |
| int nResponse = dlg.DoModal(); |
| if (nResponse == IDOK) { |
| // TODO: Place code here to handle when the dialog is |
| // dismissed with OK |
| } |
| else if (nResponse == IDCANCEL) { |
| // TODO: Place code here to handle when the dialog is |
| // dismissed with Cancel |
| } |
| |
| // Since the dialog has been closed, return FALSE so that we exit the |
| // application, rather than start the application's message pump. |
| return FALSE; |
| } |