]>
git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/PrinterSetupWizard/FirstPage.cpp
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: FirstPage.cpp,v $
26 Revision 1.3 2005/01/25 08:58:08 shersche
27 <rdar://problem/3911084> Load icons at run-time from resource DLLs
30 Revision 1.2 2004/07/13 20:15:04 shersche
31 <rdar://problem/3726363> Load large font name from resource
34 Revision 1.1 2004/06/18 04:36:57 rpantos
41 #include "PrinterSetupWizardApp.h"
42 #include "FirstPage.h"
44 #include <DebugServices.h>
49 IMPLEMENT_DYNAMIC(CFirstPage
, CPropertyPage
)
50 CFirstPage::CFirstPage()
51 : CPropertyPage(CFirstPage::IDD
)
55 m_psp
.dwFlags
&= ~(PSP_HASHELP
);
56 m_psp
.dwFlags
|= PSP_DEFAULT
|PSP_HIDEHEADER
;
58 fontName
.LoadString(IDS_LARGE_FONT
);
60 // create the large font
61 m_largeFont
.CreateFont(-16, 0, 0, 0,
62 FW_BOLD
, FALSE
, FALSE
, 0, DEFAULT_CHARSET
, OUT_DEFAULT_PRECIS
,
63 CLIP_DEFAULT_PRECIS
, DEFAULT_QUALITY
, DEFAULT_PITCH
, fontName
);
66 CFirstPage::~CFirstPage()
70 void CFirstPage::DoDataExchange(CDataExchange
* pDX
)
72 CPropertyPage::DoDataExchange(pDX
);
73 DDX_Control(pDX
, IDC_GREETING
, m_greeting
);
78 CFirstPage::OnSetActive()
80 static bool firstTime
= true;
84 CStatic
* image
= (CStatic
*) GetDlgItem( IDC_INFO
);
87 image
->SetIcon( LoadIcon( GetNonLocalizedResources(), MAKEINTRESOURCE( IDI_INFO
) ) );
92 CPropertySheet
* psheet
= (CPropertySheet
*) GetParent();
94 psheet
->SetWizardButtons(PSWIZB_NEXT
);
96 m_greeting
.SetFont(&m_largeFont
);
100 greetingText
.LoadString(IDS_GREETING
);
101 m_greeting
.SetWindowText(greetingText
);
103 return CPropertyPage::OnSetActive();
107 BEGIN_MESSAGE_MAP(CFirstPage
, CPropertyPage
)
111 // CFirstPage message handlers