2 * Copyright (c) 2001, 2002, 2003 Gary R. Van Sickle.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
16 #ifndef SETUP_PROPPAGE_H
17 #define SETUP_PROPPAGE_H
19 // This is the header for the PropertyPage class. It works closely with the
20 // PropSheet class to implement a single page of the property sheet.
29 #include "ControlAdjuster.h"
33 class PropertyPage
:public Window
35 static bool DoOnceForSheet
;
38 BOOL (*cmdproc
) (HWND h
, int id
, HWND hwndctl
, UINT code
);
40 // The sheet that owns this page.
43 // For setting the back/finish buttons properly.
46 static BOOL CALLBACK
FirstDialogProcReflector (HWND hwnd
, UINT message
,
49 static BOOL CALLBACK
DialogProcReflector (HWND hwnd
, UINT message
,
50 WPARAM wParam
, LPARAM lParam
);
53 // this is an internal structure that is used to store information
54 // about static text controls in the dialog that have been turned
55 // into clickable URLs
58 // the URL to load when clicked
61 // location of the control's original winproc that we are subclassing
64 // font handle; note: it's our responsibility to DeleteObject() this
67 // handle to the brush we return in response to WM_CTLCOLORSTATIC
71 // the list of controls that we have modified to be clickable is
72 // stored in the following which maps the ID to the above data
73 static std::map
<int, ClickableURL
> urls
;
75 // subclass the static control with this winproc
76 static LRESULT CALLBACK
urlWinProc (HWND hwnd
, UINT uMsg
, WPARAM wParam
,
80 SizeProcessor sizeProcessor
;
82 virtual BOOL CALLBACK
DialogProc (UINT message
, WPARAM wParam
,
84 virtual BOOL CALLBACK
OnMouseWheel (UINT message
, WPARAM wParam
,
89 virtual ~ PropertyPage ();
91 PROPSHEETPAGE
*GetPROPSHEETPAGEPtr ()
96 // FIXME: These should be private and friended to PropSheet.
97 void YouAreBeingAddedToASheet (PropSheet
* ps
)
117 virtual bool Create (int TemplateID
);
118 virtual bool Create (DLGPROC dlgproc
, int TemplateID
);
119 virtual bool Create (DLGPROC dlgproc
,
120 BOOL (*cmdproc
) (HWND h
, int id
, HWND hwndctl
,
121 UINT code
), int TemplateID
);
123 virtual void OnInit ()
126 virtual void OnActivate ()
129 virtual bool wantsActivation () const
133 virtual void OnDeactivate ()
137 // Overload these to perform special processing when the user hits
138 // "Next" or "Back". Return:
139 // 0 == Go to next/previous page in sequence.
140 // -1 == Prevent wizard from changing page.
141 // Resource ID == go to a specific page specified by the resource ID.
142 virtual long OnNext ()
146 virtual long OnBack ()
151 virtual bool OnFinish ()
155 virtual long OnUnattended ()
160 PropSheet
*GetOwner () const
165 void makeClickable (int id
, String link
);
168 #endif /* SETUP_PROPPAGE_H */