SkinUI5.0官方文档

SkinUI5.0官方文档


非模态消息框

<h4>效果图</h4> <p><img src="http://www.skinui.cn/doc/img/5.0/4/MsgBox.png" alt="非模态消息框" /></p> <ul> <li>调用以下接口弹出非模态消息框:</li> </ul> <pre><code class="language-c">LONG MsgBoxModeless(const String&amp; strText, const String&amp; strCaption = _T(""), UINT nType = MB_OK, const String&amp; strOk = _T(""), const String&amp; strCancel = _T(""), const String&amp; strCheckBox = _T(""), BOOL bChecked = FALSE, String&amp; strEditText = String(), String&amp; strEditTips = String(), BOOL bEditView = FALSE, LONG nEditViewLimit = 0, UINT nId = 0, LPARAM lParam = NULL);</code></pre> <ul> <li>nType仅支持以下类型:</li> </ul> <pre><code class="language-c">MB_OK MB_YESNO MB_ICONWARNING MB_ICONERROR</code></pre> <h4>示例代码</h4> <pre><code class="language-c">#pragma once class CDemoMsgBoxModelessLayout : public CFlexLayout { public: enum { IDC_BUTTON_CLICK_ME = 1001, }; public: CDemoMsgBoxModelessLayout(CView* pParent); public: virtual void OnBuildFinish(); protected: void OnBtnClickedClickMe(UINT uNotifyCode, int nID, CView* pView); SKINUI_DECLARE_MESSAGE_MAP() SKINUI_DECLARE_DYNCREATE(CDemoMsgBoxModelessLayout, CFlexLayout) };</code></pre> <pre><code class="language-c">#include &lt;stdafx.h&gt; #include "DemoMsgBoxModelessLayout.h" SKINUI_BEGIN_MESSAGE_MAP(CDemoMsgBoxModelessLayout, CFlexLayout) ON_SKINUI_COMMAND(IDC_BUTTON_CLICK_ME, OnBtnClickedClickMe) SKINUI_END_MESSAGE_MAP() CDemoMsgBoxModelessLayout::CDemoMsgBoxModelessLayout(CView* pParent) : CFlexLayout(pParent) { } void CDemoMsgBoxModelessLayout::OnBuildFinish() { CFlexLayout::OnBuildFinish(); } void CDemoMsgBoxModelessLayout::OnBtnClickedClickMe(UINT uNotifyCode, int nID, CView* pView) { GetOwner()-&gt;MsgBoxModeless(_T("非模态模态消息框!")); }</code></pre>

页面列表

ITEM_HTML