14#include <owl/propsht.rh>
17#if !defined MAXPROPPAGES
18#define MAXPROPPAGES 100
51 h.hInstance =
w.GetModule()->GetHandle();
52 h.pszCaption =
w.GetCaption();
195 return static_cast<int>(
Run(
true));
206 return Run(
false) != 0;
217 page->RegisterChildObjects();
286TPropertySheet::GetPageHandles()
288#if defined(__TRACE) || defined(__WARN)
303#if defined(__TRACE) || defined(__WARN)
426 if (
pg.GetParentO() !=
this)
431 pg.CreatePropertyPage();
1076 if (
page->GetHandle()) {
1090 if (!
sheet->GetHandle()) {
1099 page->SubclassWindowFunction();
1172 if (MessageLoopResult != 0)
#define PRECONDITION(condition)
void ResumeThrow()
Rethrows the suspended exception stored by a previous call to SuspendThrow.
Typically used to obtain information from a user, a dialog box is a window inside of which other cont...
void EvClose()
Message response function for WM_CLOSE by unconditionally closing the window.
virtual INT_PTR DialogFunction(TMsgId, TParam1, TParam2)
Override this to process messages within the dialog function.
static INT_PTR CALLBACK StdDlgProc(HWND, UINT, WPARAM, LPARAM) noexcept
Callback procs for hooking TDialog to native window.
TIcon, derived from TGdiObject, represents the GDI object icon class.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TNotify is a thin wrapper around the NMHDR structure.
The 'TPropertyPage' object represents a dialog box found within a property sheet.
HPROPSHEETPAGE HPropPage
Handle of this property page.
virtual void Reset(TPshNotify &)
PSN_RESET.
virtual int Apply(TPshNotify &)
PSN_APPLY.
virtual int WizNext(TPshNotify &)
PSN_WIZNEXT.
HPROPSHEETPAGE CreatePropertyPage()
CreatePropertyPage is called by the Sheet object requesting the page to return a handle used to repre...
virtual bool KillActive(TPshNotify &)
PSN_KILLACTIVE.
virtual bool WizFinish(TPshNotify &)
PSN_WIZFINISH.
friend class TPropertySheet
virtual void Help(TPshNotify &)
PSN_HELP.
void SetIcon(const TIcon &)
Specifies the icon to be used for this page.
bool DestroyPropertyPage()
Destroys the page represented by this object.
PROPSHEETPAGE PageInfo
Following structure holds information about this dialog when it is inserted into a PropertySheet.
static INT_PTR CALLBACK PropDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
This callback is the default 'Dialog box procedure' of each page of our property sheet....
auto DialogFunction(TMsgId, TParam1, TParam2) -> INT_PTR override
As with TDialog, most of the page's events are dispatched directly from the window procedure.
void CopyPageInfo(PROPSHEETPAGE &pgInfo) const
void SetFlags(uint32 flags)
Specifies flags to be used in creating the property page.
virtual int WizBack(TPshNotify &)
PSN_WIZBACK.
auto Create() -> bool override
Creates the page.
auto EvNotify(uint id, TNotify &) -> TResult override
WM_NOTIFY handler: Scans for property sheet notifications to 'patch' the 'idFrom' member to the prede...
static UINT CALLBACK PropCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
void SetTitle(LPCTSTR)
Sets the caption of this page.
virtual int SetActive(TPshNotify &)
PSN_SETACTIVE.
virtual bool QueryCancel(TPshNotify &)
PSN_QUERYCANCEL.
TPropertyPage(TPropertySheet *parent, TResId resId, LPCTSTR title=0, TResId iconRes=0, TModule *module=0)
Constructor for TPropertyPage.
~TPropertyPage() override
Destructor of TPropertyPage.
TPropertySheet encapsulates a window which contains one or more overlapping child windows knowns as p...
bool SubClassSheet
Should we subclass the sheet (OS only)
HWND GetTabControl() const
Retrieves the handle to a tab control of a property sheet.
void PageUnchanged(TPropertyPage &)
Informs the sheet that the information in the specified page has reverted to the previously saved sta...
INT_PTR Run(bool modal)
Brings up the property sheet by calling the Windows API function PropertySheet.
void SetWizButtons(uint32 flags)
bool WantTimer
Flags whether to start a timer.
TPropertyPage * FirstPageThat(TCondPageFunc cond, void *paramList=0)
Applies the specified 'test' function to each 'TPropertyPage' of the sheet and returns the first page...
void SetCaption(LPCTSTR title)
Updates the caption of the property sheet.
auto Execute() -> int override
Brings up the property sheet modally.
void CancelToClose()
Disables the 'Cancel' button and changes the text of the 'OK' button to 'Close'.
UINT_PTR TimerID
Timer identifier.
int QuerySiblings(TParam1, TParam2)
Forwards the 'PSM_QUERYSIBLINGS' message to each page in the property sheet.
int GetPageCount() const
Retrieves the number of pages within a particular sheet.
void EnableSubclass(bool subclass)
bool Apply()
Simulates the choice of the Apply button, indicating that one or more pages have changed and the chan...
void SetupWindow() override
Computes the size of the sheet, activates the designated 'startPage' and sets focus to the tab contro...
auto Create() -> bool override
Brings up the property sheet modelessly.
HWND GetCurrentPage() const
void ForEachPage(TActionPageFunc action, void *paramList=0)
Applies the specified 'action' function to each TPropertyPage child of the sheet.
bool SelectPage(TPropertyPage &)
Activates the specified page in the property sheet.
void AddPage(TPropertyPage &)
Adds a new page to the end of the PropertySheet.
TPropertySheet(TWindow *parent, LPCTSTR title, uint startPage=0, bool isWizard=false, uint32 flags=PSH_DEFAULT, TModule *module=0)
Constructs a PropertySheet object.
void SetTitle(LPCTSTR text, uint32 style=PSH_PROPTITLE)
Sets the title of a property sheet.
void CleanupWindow() override
PROPSHEETHEADER HeaderInfo
void RestartWindows()
Indicates that the system needs to be restarted for the changes to take effect.
void PressButton(int button)
Simulates the choice of a property sheet button.
auto PreProcessMsg(MSG &) -> bool override
bool IsDialogMessage(MSG &msg)
Passes a message to a property sheet dialog box and indicates whether the dialog processed the messag...
void SetFinishText(LPCTSTR text)
Sets the text for the 'Finish' button in a Wizard property sheet.
void RebootSystem()
Indicates that the system needs to be restarted for the changes to take effect.
void RemovePage(TPropertyPage &)
Removes the specified page from the property sheet.
~TPropertySheet() override
void PageChanged(const TPropertyPage &)
Informs the sheet that information in a sheet has changed.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
bool KillTimer(UINT_PTR timerId)
Gets rid of the timer and removes any WM_TIMER messages from the message queue.
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
TWindow * GetLastChild()
Returns a pointer to the last child window in the interface object's child list.
void GetHWndState(bool forceStyleSync=false)
Copies the style, coordinate, and the resource id (but not the title) from the existing HWnd into the...
virtual bool PreProcessMsg(MSG &msg)
Called from TApplication::ProcessAppMsg() to give the window an opportunity to perform preprocessing ...
TWindow * GetParent() const
Retrieves the OWL object of the parent window. If none exists, returns 0.
void PerformSetupAndTransfer()
Ensures that the window is fully set up; then transfers data into the window.
void SetHandle(THandle)
Sets the window handle in a derived class.
long GetWindowLong(int index) const
Retrieves information about the window depending on the value stored in index.
TWindow * GetParentO() const
Return the OWL's parent for this window.
TModule * GetModule() const
Returns a pointer to the module object.
bool IsWindow() const
Returns true if an HWND is being used.
void SetCaption(LPCTSTR title)
Copies title to an allocated string pointed to by title.
bool IsChild(HWND hWnd) const
Returns true if the window is a child window or a descendant window of this window.
virtual void CleanupWindow()
Always called immediately before the HWindow becomes invalid, CleanupWindow gives derived classes an ...
virtual bool IdleAction(long idleCount)
Called when no messages are waiting to be processed, IdleAction performs idle processing as long as t...
void SubclassWindowFunction()
Installs the instance thunk as the WindowProc and saves the old window function in DefaultProc.
LPCTSTR GetCaption() const
Returns the Title member of TWindow.
UINT_PTR SetTimer(UINT_PTR timerId, uint timeout, TIMERPROC proc=0)
Creates a timer object associated with this window.
virtual bool CanClose()
Use this function to determine if it is okay to close a window.
virtual void TransferData(TTransferDirection direction)
Transfers data between the TWindow's data buffer and the child windows in its ChildList (data is not ...
virtual TResult EvNotify(uint id, TNotify ¬ifyInfo)
Handles WM_NOTIFY and subdispatch messages from child controls.
bool PostMessage(TMsgId, TParam1=0, TParam2=0)
Posts a message (msg) to the window in the application's message queue.
TWindow * Next()
Returns a pointer to the next sibling window in the window's sibling list.
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
virtual void SetupWindow()
Performs setup following creation of an associated MS-Windows window.
static HWND GetFocus()
Gets a handle to the window that has the focus.
HWND GetHandle() const
Returns the handle of the window.
virtual void CloseWindow(int retVal=0)
Determines if it is okay to close a window before actually closing the window.
TXOwl is root class of the ObjectWindows exception hierarchy.
Definition of classes for CommonControl encapsulation.
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
bool(* TCondPageFunc)(TPropertyPage *pPage, void *param)
void(* TActionPageFunc)(TPropertyPage *pPage, void *param)
virtual int Unhandled(TModule *appModule, uint promptResId)
Per-exception class unhandled-handler, will default to the per-module unhandled-handler.
@ tdGetData
Get data from the window into the buffer.
Object Windows Library (OWLNext Core)
const uint PropSheetTimerID
UINT TMsgId
Message ID type.
const uint PropSheetTimeOut
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
const int PropPageID
Property sheets notify property pages of events via the standard WM_NOTIFY message.
LRESULT TResult
Result type.
#define CONST_CAST(targetType, object)
#define REINTERPRET_CAST(targetType, object)
#define TYPESAFE_DOWNCAST(object, toClass)
Definition of classes encapsulating PropertySheets and PropertyPages.
#define EV_PSN_SETACTIVE(method)
int method(TPshNotify&)
#define EV_PSN_KILLACTIVE(method)
bool method(TPshNotify&)
#define EV_PSN_QUERYCANCEL(method)
bool method(TPshNotify&)
#define EV_PSN_APPLY(method)
void method(TPshNotify&)
#define EV_PSN_HELP(method)
void method(TPshNotify&)
#define EV_PSN_RESET(method)
void method(TPshNotify&)
#define EV_PSN_WIZFINISH(method)
bool method(TPshNotify&)
#define EV_PSN_WIZNEXT(method)
int method(TPshNotify&)
#define EV_PSN_WIZBACK(method)
int method(TPshNotify&)
Defines classes handling Windows resources.
Definition of class TTabItem and TTabControl.
Definition of TUIMetric, a UI metrics provider class.