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 MsgBox(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);</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 CDemoMsgBoxLayout : public CFlexLayout { public: enum { IDC_BUTTON_CLICK_ME = 1001, }; public: CDemoMsgBoxLayout(CView* pParent); public: virtual void OnBuildFinish(); protected: void OnBtnClickedClickMe(UINT uNotifyCode, int nID, CView* pView); SKINUI_DECLARE_MESSAGE_MAP() SKINUI_DECLARE_DYNCREATE(CDemoMsgBoxLayout, CFlexLayout) };</code></pre> <pre><code class="language-c">#include &lt;stdafx.h&gt; #include "DemoMsgBoxLayout.h" SKINUI_BEGIN_MESSAGE_MAP(CDemoMsgBoxLayout, CFlexLayout) ON_SKINUI_COMMAND(IDC_BUTTON_CLICK_ME, OnBtnClickedClickMe) SKINUI_END_MESSAGE_MAP() CDemoMsgBoxLayout::CDemoMsgBoxLayout(CView* pParent) : CFlexLayout(pParent) { } void CDemoMsgBoxLayout::OnBuildFinish() { CFlexLayout::OnBuildFinish(); } void CDemoMsgBoxLayout::OnBtnClickedClickMe(UINT uNotifyCode, int nID, CView* pView) { GetOwner()-&gt;MsgBox(_T("模态消息框!")); }</code></pre>

页面列表

ITEM_HTML