/*
- * Copyright (c) 2001, Gary R. Van Sickle.
+ * Copyright (c) 2001, 2002, 2003 Gary R. Van Sickle.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// PropSheet class to implement a single page of the property sheet.
+#include <map>
#include "win32.h"
#include <prsht.h>
#include "window.h"
+#include "ControlAdjuster.h"
class PropSheet;
// For setting the back/finish buttons properly.
bool IsFirst, IsLast;
-
- static BOOL CALLBACK FirstDialogProcReflector (HWND hwnd, UINT message,
+
+ static INT_PTR CALLBACK FirstDialogProcReflector (HWND hwnd, UINT message,
WPARAM wParam,
LPARAM lParam);
- static BOOL CALLBACK DialogProcReflector (HWND hwnd, UINT message,
+ static INT_PTR CALLBACK DialogProcReflector (HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam);
-
+ void setTitleFont ();
+
+ // this is an internal structure that is used to store information
+ // about static text controls in the dialog that have been turned
+ // into clickable URLs
+ typedef struct
+ {
+ // the URL to load when clicked
+ std::string url;
+
+ // location of the control's original winproc that we are subclassing
+ WNDPROC origWinProc;
+
+ // font handle; note: it's our responsibility to DeleteObject() this
+ HFONT font;
+
+ // handle to the brush we return in response to WM_CTLCOLORSTATIC
+ HBRUSH brush;
+ } ClickableURL;
+
+ // the list of controls that we have modified to be clickable is
+ // stored in the following which maps the ID to the above data
+ static std::map <int, ClickableURL> urls;
+
+ // subclass the static control with this winproc
+ static LRESULT CALLBACK urlWinProc (HWND hwnd, UINT uMsg, WPARAM wParam,
+ LPARAM lParam);
+
protected:
- virtual BOOL CALLBACK DialogProc (UINT message, WPARAM wParam,
- LPARAM lParam);
+ SizeProcessor sizeProcessor;
+
+ virtual INT_PTR CALLBACK DialogProc (UINT message, WPARAM wParam,
+ LPARAM lParam);
+ virtual INT_PTR CALLBACK OnMouseWheel (UINT message, WPARAM wParam,
+ LPARAM lParam);
+ virtual INT_PTR CALLBACK OnTimerMessage (UINT message, WPARAM wParam,
+ LPARAM lparam);
public:
PropertyPage ();
virtual void OnActivate ()
{
};
+ virtual bool wantsActivation () const
+ {
+ return true;
+ };
virtual void OnDeactivate ()
{
};
+
+ // Overload these to perform special processing when the user hits
+ // "Next" or "Back". Return:
+ // 0 == Go to next/previous page in sequence.
+ // -1 == Prevent wizard from changing page.
+ // Resource ID == go to a specific page specified by the resource ID.
virtual long OnNext ()
{
return 0;
{
return 0;
};
+
virtual bool OnFinish ()
{
return true;
{
return OurSheet;
};
+
+ void makeClickable (int id, std::string link);
};
#endif /* SETUP_PROPPAGE_H */