Message Box Implementation. More...
#include <SMessageBox.h>
Public Member Functions | |
SMessageBoxImpl () | |
Constructor. | |
INT_PTR | MessageBox (HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType) |
Display a message box. | |
BOOL | IsMsgHandled () const |
void | SetMsgHandled (BOOL bHandled) |
BOOL | ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID=0) |
Processes a window message. | |
BOOL | _ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID) |
![]() | |
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. | |
![]() | |
BOOL | ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID=0) |
处理窗口消息 | |
Public Attributes | |
BOOL | m_bMsgHandled |
Protected Member Functions | |
SXmlNode | OnGetInitXmlNode (SXmlDoc &xmlDoc) override |
Get the initialization XML node. | |
BOOL | OnInitDialog (HWND wnd, LPARAM lInitParam) |
Initialize the dialog. | |
virtual BOOL | OnSetIcon (UINT uType) |
Set the icon. | |
virtual SStringT | OnGetButtonText (int nBtnID) const |
Get the button text. | |
void | OnBtnClick (int uID) |
Handle button click event. | |
![]() | |
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. | |
![]() | |
virtual bool | IsDpiAware () const |
检查是否支持DPI感知 | |
void | OnDpiChanged (WORD dpi, const RECT *desRect) |
处理DPI变化事件 | |
virtual void | HandleScaleChange (WORD nScale, const RECT *desRect) |
处理缩放变化 | |
void | ScaleHost (HWND hWnd) |
根据DPI缩放窗口 | |
Additional Inherited Members | |
![]() | |
INT_PTR | m_nRetCode |
SAutoRefPtr< IMessageLoop > | m_MsgLoop |
Message Box Implementation.
Implementation class for message boxes. If more personalized message boxes are needed, derive from this class.
Definition at line 24 of file SMessageBox.h.
SNSBEGIN SMessageBoxImpl::SMessageBoxImpl | ( | ) |
Constructor.
Definition at line 10 of file SMessageBox.cpp.
|
inline |
Definition at line 88 of file SMessageBox.h.
|
inline |
Definition at line 88 of file SMessageBox.h.
INT_PTR SMessageBoxImpl::MessageBox | ( | HWND | hWnd, |
LPCTSTR | lpText, | ||
LPCTSTR | lpCaption, | ||
UINT | uType ) |
Display a message box.
hWnd | Parent window handle |
lpText | Message content |
lpCaption | Window title |
uType | Window type |
Definition at line 22 of file SMessageBox.cpp.
|
inlineprotected |
Handle button click event.
uID | Control ID |
Message handler for button clicks.
Definition at line 79 of file SMessageBox.h.
|
protectedvirtual |
Get the button text.
nBtnID | Button ID |
Definition at line 87 of file SMessageBox.cpp.
Get the initialization XML node.
xmlDoc | XML document |
Reimplemented from SHostWnd.
Definition at line 92 of file SMessageBox.cpp.
|
protected |
Initialize the dialog.
wnd | Host window handle |
lInitParam | Initialization parameter (not used) |
Definition at line 97 of file SMessageBox.cpp.
|
protectedvirtual |
Set the icon.
uType | Icon type |
Set the icon. This method can be overridden to display custom icons.
Definition at line 33 of file SMessageBox.cpp.
|
inlinevirtual |
Processes a window message.
hWnd | Handle to the window. |
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
lResult | Result of the message processing. |
dwMsgMapID | Message map ID. |
Reimplemented from SNativeWnd.
Definition at line 88 of file SMessageBox.h.
|
inline |
Definition at line 88 of file SMessageBox.h.
BOOL SMessageBoxImpl::m_bMsgHandled |
Definition at line 88 of file SMessageBox.h.