]>
git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/PrinterSetupWizard/FirstPage.cpp
8d4b881ff65f4cc1c93cd19b0b26d54d6f625252
1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 1997-2004 Apple Computer, Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 Change History (most recent first):
19 $Log: FirstPage.cpp,v $
20 Revision 1.6 2006/08/14 23:24:09 cheshire
21 Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
23 Revision 1.5 2005/07/07 17:53:20 shersche
24 Fix problems associated with the CUPS printer workaround fix.
26 Revision 1.4 2005/03/16 01:41:29 shersche
27 <rdar://problem/3989644> Remove info icon from first page
29 Revision 1.3 2005/01/25 08:58:08 shersche
30 <rdar://problem/3911084> Load icons at run-time from resource DLLs
33 Revision 1.2 2004/07/13 20:15:04 shersche
34 <rdar://problem/3726363> Load large font name from resource
37 Revision 1.1 2004/06/18 04:36:57 rpantos
44 #include "PrinterSetupWizardApp.h"
45 #include "PrinterSetupWizardSheet.h"
46 #include "FirstPage.h"
48 #include <DebugServices.h>
53 IMPLEMENT_DYNAMIC(CFirstPage
, CPropertyPage
)
54 CFirstPage::CFirstPage()
55 : CPropertyPage(CFirstPage::IDD
)
59 m_psp
.dwFlags
&= ~(PSP_HASHELP
);
60 m_psp
.dwFlags
|= PSP_DEFAULT
|PSP_HIDEHEADER
;
62 fontName
.LoadString(IDS_LARGE_FONT
);
64 // create the large font
65 m_largeFont
.CreateFont(-16, 0, 0, 0,
66 FW_BOLD
, FALSE
, FALSE
, 0, DEFAULT_CHARSET
, OUT_DEFAULT_PRECIS
,
67 CLIP_DEFAULT_PRECIS
, DEFAULT_QUALITY
, DEFAULT_PITCH
, fontName
);
70 CFirstPage::~CFirstPage()
74 void CFirstPage::DoDataExchange(CDataExchange
* pDX
)
76 CPropertyPage::DoDataExchange(pDX
);
77 DDX_Control(pDX
, IDC_GREETING
, m_greeting
);
82 CFirstPage::OnSetActive()
84 CPrinterSetupWizardSheet
* psheet
;
87 psheet
= reinterpret_cast<CPrinterSetupWizardSheet
*>(GetParent());
88 require_quiet( psheet
, exit
);
90 psheet
->SetWizardButtons(PSWIZB_NEXT
);
92 m_greeting
.SetFont(&m_largeFont
);
94 greetingText
.LoadString(IDS_GREETING
);
95 m_greeting
.SetWindowText(greetingText
);
99 return CPropertyPage::OnSetActive();
104 CFirstPage::OnKillActive()
106 CPrinterSetupWizardSheet
* psheet
;
108 psheet
= reinterpret_cast<CPrinterSetupWizardSheet
*>(GetParent());
109 require_quiet( psheet
, exit
);
111 psheet
->SetLastPage(this);
115 return CPropertyPage::OnKillActive();
119 BEGIN_MESSAGE_MAP(CFirstPage
, CPropertyPage
)
123 // CFirstPage message handlers