SkinUI5.0官方文档

SkinUI5.0官方文档


提示消息框

<h4>效果图</h4> <p><img src="http://www.skinui.cn/doc/img/5.0/4/Alert.png" alt="非模态消息框" /></p> <ul> <li>调用以下接口弹出提示消息框:</li> </ul> <pre><code class="language-c">int Alert(const String&amp; strMessage, const String&amp; strCaption = _T(""), const String&amp; strButtonName = _T(""));</code></pre> <h4>示例代码</h4> <ul> <li>h文件</li> </ul> <pre><code class="language-c">#pragma once class CDemoAlertLayout : public CFlexLayout { public: enum { IDC_BUTTON_CLICK_ME = 1001, }; public: CDemoAlertLayout(CView* pParent); public: virtual void OnBuildFinish(); protected: void OnBtnClickedClickMe(UINT uNotifyCode, int nID, CView* pView); SKINUI_DECLARE_MESSAGE_MAP() SKINUI_DECLARE_DYNCREATE(CDemoAlertLayout, CFlexLayout) };</code></pre> <ul> <li>cpp文件</li> </ul> <pre><code class="language-c">#include &lt;stdafx.h&gt; #include "DemoAlertLayout.h" SKINUI_BEGIN_MESSAGE_MAP(CDemoAlertLayout, CFlexLayout) ON_SKINUI_COMMAND(IDC_BUTTON_CLICK_ME, OnBtnClickedClickMe) SKINUI_END_MESSAGE_MAP() CDemoAlertLayout::CDemoAlertLayout(CView* pParent) : CFlexLayout(pParent) { } void CDemoAlertLayout::OnBuildFinish() { CFlexLayout::OnBuildFinish(); } void CDemoAlertLayout::OnBtnClickedClickMe(UINT uNotifyCode, int nID, CView* pView) { String strCaption = _T("提示"); String strMessage = _T("这是一个提示信息!"); String strButtonName = _T("确定"); int nButtonIndex = GetOwner()-&gt;Alert(strMessage, strCaption, strButtonName); }</code></pre>

页面列表

ITEM_HTML