|
The PegDialog class provides a decorated window
for use as a dialog window. A dialog window is usually drawn with a
frame and client area color which distinguishes it from other windows.
The dialog window can have an optional title bar.
The PegDialog class supports modal and non-modal execution.
A dialog window executes as a modal window when your application
calls the window's Execute() member function.
If the dialog window has no parent, it will be added to the
invisible window maintained by the KwikPeg Presentation Manager,
making the dialog window a top-level window.
Because dialog windows are intended for interactive dialog
with a user, they attach special significance to buttons (objects)
with the following reserved KwikPeg object IDs:
IDB_CLOSE
IDB_OK
IDB_CANCEL
IDB_ABORT
IDB_RETRY
IDB_YES
IDB_NO
IDB_APPLY
When an object with one of these reserved object IDs is selected,
the dialog window will be closed.
When defining a dialog window, you should ensure that at least one button
added to the dialog is constructed with one of these object ID values.
Otherwise, the dialog window will remain active forever unless some
custom object added to the window forces the window to close.
When the dialog window is signalled by an object with one of these
reserved object IDs, it sends a
PM_DIALOG_NOTIFY message to its parent window to indicate
that the dialog has been completed. The message iData member
will contain the object ID of the object that terminated the dialog.
In all cases (except for object ID IDB_APPLY),
the dialog window will be closed after the parent window has received
the PM_DIALOG_NOTIFY message.
If the dialog window is being executed modally, the
Execute() member function will return to its caller,
passing it the object ID of the button (object) that forced the
dialog window to close.
When the IDB_APPLY object ID is detected,
the dialog window sends the PM_DIALOG_NOTIFY
message to its parent but the dialog window does not close.
When a dialog window is closed, the PM_DIALOG_NOTIFY
message is normally directed to the dialog window's parent.
However, when a dialog window is created, you can specify
an alternate ReportTo window which will receive the closure
notification instead of the parent.
|