Dialog host window class. More...
#include <SHostDialog.h>
Public Member Functions | |
SHostDialog (LPCWSTR pszXmlName=NULL) | |
Constructor. | |
SHostDialog (LPCSTR pszXmlName) | |
Constructor. | |
~SHostDialog (void) | |
Destructor. | |
IMessageLoop * | GetMsgLoop () OVERRIDE |
Gets the message loop for the dialog. | |
INT_PTR | DoModal (HWND hParent=0, DWORD dwStyle=WS_POPUP|WS_CLIPCHILDREN, DWORD dwExStyle=0) OVERRIDE |
Displays the dialog as a modal window. | |
void | EndDialog (INT_PTR nResult) OVERRIDE |
Ends the dialog. | |
SHostWnd * | toSHostWnd () |
Casts the object to SHostWnd. | |
Protected Member Functions | |
void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) |
Handles the key down event. | |
void | OnOK () |
Handles the OK button click event. | |
void | OnCancel () |
Handles the Cancel button click event. | |
Protected Attributes | |
INT_PTR | m_nRetCode |
SAutoRefPtr< IMessageLoop > | m_MsgLoop |
Dialog host window class.
This class manages dialog windows in the SOUI framework. It inherits from THostWndProxy<IHostDialog>
and provides methods for handling dialog messages and events.
Definition at line 30 of file SHostDialog.h.
SHostDialog::SHostDialog | ( | LPCWSTR | pszXmlName = NULL | ) |
Constructor.
pszXmlName | Name of the XML file for the dialog layout (wide character version) |
Initializes the dialog with the specified XML layout file.
Definition at line 9 of file SHostDialog.cpp.
SHostDialog::SHostDialog | ( | LPCSTR | pszXmlName | ) |
Constructor.
pszXmlName | Name of the XML file for the dialog layout (narrow character version) |
Initializes the dialog with the specified XML layout file.
Definition at line 15 of file SHostDialog.cpp.
SHostDialog::~SHostDialog | ( | void | ) |
INT_PTR SHostDialog::DoModal | ( | HWND | hParent = 0, |
DWORD | dwStyle = WS_POPUP | WS_CLIPCHILDREN, | ||
DWORD | dwExStyle = 0 ) |
Displays the dialog as a modal window.
hParent | Handle to the parent window |
dwStyle | Window style |
dwExStyle | Extended window style |
Displays the dialog as a modal window and returns the result code.
Definition at line 26 of file SHostDialog.cpp.
void SHostDialog::EndDialog | ( | INT_PTR | nResult | ) |
Ends the dialog.
nResult | Result code to return from the dialog |
Ends the dialog and sets the result code.
Definition at line 91 of file SHostDialog.cpp.
IMessageLoop * SHostDialog::GetMsgLoop | ( | ) |
Gets the message loop for the dialog.
Returns the message loop associated with the dialog.
Definition at line 106 of file SHostDialog.cpp.
|
protected |
Handles the Cancel button click event.
Handles the click event for the Cancel button, typically ending the dialog with a result code. Maps the IDOK command to the OnOK method. Maps the IDCANCEL command to the OnCancel method. Maps the WM_CLOSE message to the OnCancel method. Maps the WM_KEYDOWN message to the OnKeyDown method. Chains message map to the base class SHostWnd. Reflects notifications to the dialog.
Definition at line 119 of file SHostDialog.cpp.
|
protected |
Handles the key down event.
nChar | Virtual key code |
nRepCnt | Repeat count |
nFlags | Flags associated with the key event |
Handles the key down event for the dialog.
Definition at line 124 of file SHostDialog.cpp.
|
protected |
Handles the OK button click event.
Handles the click event for the OK button, typically ending the dialog with a result code.
Definition at line 114 of file SHostDialog.cpp.
|
inline |
Casts the object to SHostWnd.
Casts the SHostDialog object to an SHostWnd object.
Definition at line 89 of file SHostDialog.h.
|
protected |
Message loop for the dialog.
Definition at line 133 of file SHostDialog.h.
|
protected |
Result code of the dialog.
Definition at line 132 of file SHostDialog.h.