跳转到帖子

搜索论坛

显示结果为标签'close'。



更多搜索选项

  • 用标签来搜索

    用逗号分隔标签类型
  • 用作者来搜索

内容类型


论坛

  • 编程技术
    • C/C++
    • C#
    • PHP
    • JAVA
    • Linux
    • React
    • 编程QA
    • 武林秘籍
    • go语言
    • 开源框架
  • 交流
    • 转贴交流
    • 酷站分享
    • 游戏素材
    • 软件下载
    • 视频教程资料

Product Groups

没有可显示的结果。

博客

  • 墨香年少的博客

查找结果在...

查找包含的结果...


创建日期

  • 开始

    结束


最后更新

  • 开始

    结束


用数量来过滤...

注册日期

  • 开始

    结束


用户组


找到1个结果

  1. you may be find you cannot realy cose the exe only close it in task manager. so we create a button and when we click the close button to real close the exe. the xml code: <?xml version="1.0" encoding="UTF-8"?> <Window size="340,280" caption="0,0,0,35"> <Font id="0" name="Courier New Bold" size="22" bold="false"/> <VerticalLayout> <HorizontalLayout bkcolor="#FFff1a1a"/> <HorizontalLayout> <Button name="btn_close" font="0" text="close app" bkcolor="#FF00b33c"/> </HorizontalLayout> <HorizontalLayout bkcolor="#FFffd633"/> </VerticalLayout> </Window> the app.cpp code: #include "app.h" class MainWndFrame : public WindowImplBase { protected: virtual CDuiString GetSkinFolder() override; virtual CDuiString GetSkinFile() override; virtual LPCTSTR GetWindowClassName(void) const override; virtual DuiLib::UILIB_RESOURCETYPE GetResourceType() const override; virtual LPCTSTR GetResourceID() const override; virtual void InitWindow(); virtual void Notify(TNotifyUI& msg); public: static const LPCTSTR kClassName; static const LPCTSTR kMainWndFrame; CPaintManagerUI m_pm; private: CButtonUI* m_pCloseBtn; }; DuiLib::CDuiString MainWndFrame::GetSkinFolder() { return m_PaintManager.GetInstancePath(); } DuiLib::CDuiString MainWndFrame::GetSkinFile() { return kMainWndFrame; } LPCTSTR MainWndFrame::GetWindowClassName(void) const { return kClassName; } DuiLib::UILIB_RESOURCETYPE MainWndFrame::GetResourceType() const { return UILIB_FILE; } LPCTSTR MainWndFrame::GetResourceID() const { return MAKEINTRESOURCE(101); } void MainWndFrame::InitWindow() { m_pCloseBtn = dynamic_cast<CButtonUI*>(m_pm.FindControl(_T("btn_close"))); } void MainWndFrame::Notify(TNotifyUI& msg) { if (msg.sType == DUI_MSGTYPE_CLICK) { CDuiString strName = msg.pSender->GetName(); if (strName == _T("btn_close")) { PostQuitMessage(0); } } __super::Notify(msg); } const LPCTSTR MainWndFrame::kClassName = _T("main_wnd"); const LPCTSTR MainWndFrame::kMainWndFrame = _T("main_wnd.xml"); int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // 设置窗口关联的实例 CPaintManagerUI::SetInstance(hInstance); // 设置皮肤的默认路径 CPaintManagerUI::SetCurrentPath(CPaintManagerUI::GetInstancePath()); CPaintManagerUI::SetResourcePath(_T("theme")); // 创建窗口 MainWndFrame* pMainWndFrame = new MainWndFrame; pMainWndFrame->Create(nullptr, MainWndFrame::kClassName, UI_WNDSTYLE_DIALOG, 0); pMainWndFrame->CenterWindow(); pMainWndFrame->ShowWindow(); CPaintManagerUI::MessageLoop(); if (nullptr != pMainWndFrame) { delete pMainWndFrame; } return 0; }
×
×
  • 创建新的...

重要信息

注册必须使用2-8个中文汉字作为账号