2 * Copyright (c) 1997-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
23 Change History (most recent first):
25 $Log: PrinterSetupWizardApp.cpp,v $
26 Revision 1.3 2004/07/13 21:24:23 rpantos
27 Fix for <rdar://problem/3701120>.
29 Revision 1.2 2004/06/24 20:12:08 shersche
31 Submitted by: herscher
33 Revision 1.1 2004/06/18 04:36:57 rpantos
40 #include "PrinterSetupWizardApp.h"
41 #include "PrinterSetupWizardSheet.h"
42 #include "DebugServices.h"
49 // CPrinterSetupWizardApp
51 BEGIN_MESSAGE_MAP(CPrinterSetupWizardApp
, CWinApp
)
52 ON_COMMAND(ID_HELP
, CWinApp::OnHelp
)
56 // CPrinterSetupWizardApp construction
58 CPrinterSetupWizardApp::CPrinterSetupWizardApp()
60 // TODO: add construction code here,
61 // Place all significant initialization in InitInstance
65 // The one and only CPrinterSetupWizardApp object
67 CPrinterSetupWizardApp theApp
;
70 // CPrinterSetupWizardApp initialization
72 BOOL
CPrinterSetupWizardApp::InitInstance()
75 // initialize the debugging framework
77 debug_initialize( kDebugOutputTypeWindowsDebugger
, "PrinterSetupWizard", NULL
);
78 debug_set_property( kDebugPropertyTagPrintLevel
, kDebugLevelTrace
);
81 // InitCommonControls() is required on Windows XP if an application
82 // manifest specifies use of ComCtl32.dll version 6 or later to enable
83 // visual styles. Otherwise, any window creation will fail.
86 CWinApp::InitInstance();
88 AfxEnableControlContainer();
90 CPrinterSetupWizardSheet
dlg(IDS_CAPTION
);
96 INT_PTR nResponse
= dlg
.DoModal();
98 if (nResponse
== IDOK
)
100 // TODO: Place code here to handle when the dialog is
103 else if (nResponse
== IDCANCEL
)
105 // TODO: Place code here to handle when the dialog is
106 // dismissed with Cancel
109 catch (CPrinterSetupWizardSheet::WizardException
& exc
)
111 MessageBox(NULL
, exc
.text
, exc
.caption
, MB_OK
|MB_ICONEXCLAMATION
);
114 // Since the dialog has been closed, return FALSE so that we exit the
115 // application, rather than start the application's message pump.