]>
git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/PrinterSetupWizard/FirstPage.cpp
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.
19 #include "PrinterSetupWizardApp.h"
20 #include "PrinterSetupWizardSheet.h"
21 #include "FirstPage.h"
23 #include <DebugServices.h>
28 IMPLEMENT_DYNAMIC(CFirstPage
, CPropertyPage
)
29 CFirstPage::CFirstPage()
30 : CPropertyPage(CFirstPage::IDD
)
34 m_psp
.dwFlags
&= ~(PSP_HASHELP
);
35 m_psp
.dwFlags
|= PSP_DEFAULT
|PSP_HIDEHEADER
;
37 fontName
.LoadString(IDS_LARGE_FONT
);
39 // create the large font
40 m_largeFont
.CreateFont(-16, 0, 0, 0,
41 FW_BOLD
, FALSE
, FALSE
, 0, DEFAULT_CHARSET
, OUT_DEFAULT_PRECIS
,
42 CLIP_DEFAULT_PRECIS
, DEFAULT_QUALITY
, DEFAULT_PITCH
, fontName
);
45 CFirstPage::~CFirstPage()
49 void CFirstPage::DoDataExchange(CDataExchange
* pDX
)
51 CPropertyPage::DoDataExchange(pDX
);
52 DDX_Control(pDX
, IDC_GREETING
, m_greeting
);
57 CFirstPage::OnSetActive()
59 CPrinterSetupWizardSheet
* psheet
;
62 psheet
= reinterpret_cast<CPrinterSetupWizardSheet
*>(GetParent());
63 require_quiet( psheet
, exit
);
65 psheet
->SetWizardButtons(PSWIZB_NEXT
);
67 m_greeting
.SetFont(&m_largeFont
);
69 greetingText
.LoadString(IDS_GREETING
);
70 m_greeting
.SetWindowText(greetingText
);
74 return CPropertyPage::OnSetActive();
79 CFirstPage::OnKillActive()
81 CPrinterSetupWizardSheet
* psheet
;
83 psheet
= reinterpret_cast<CPrinterSetupWizardSheet
*>(GetParent());
84 require_quiet( psheet
, exit
);
86 psheet
->SetLastPage(this);
90 return CPropertyPage::OnKillActive();
94 BEGIN_MESSAGE_MAP(CFirstPage
, CPropertyPage
)
98 // CFirstPage message handlers