• 大小: 15.18MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-28
  • 语言: 其他
  • 标签: duilib  

资源简介

Duilib最新完整界面库,带360、QQ、List、Menu等众多Demo。

资源截图

代码片段和文件信息

#include “stdafx.h“
#include 
#include 
#include “ControlEx.h“

class C360SafeframeWnd : public CWindowWnd public INotifyUI
{
public:
C360SafeframeWnd() { };
LPCTSTR GetWindowClassName() const { return _T(“UIMainframe“); };
UINT GetClassstyle() const { return CS_DBLCLKS; };
void OnFinalMessage(HWND /*hWnd*/) { delete this; };

void Init() {
m_pCloseBtn = static_cast(m_pm.FindControl(_T(“closebtn“)));
m_pMaxBtn = static_cast(m_pm.FindControl(_T(“maxbtn“)));
m_pRestoreBtn = static_cast(m_pm.FindControl(_T(“restorebtn“)));
m_pMinBtn = static_cast(m_pm.FindControl(_T(“minbtn“)));
}

void OnPrepare() {
}

void Notify(TNotifyUI& msg)
{
if( msg.sType == _T(“windowinit“) ) OnPrepare();
else if( msg.sType == _T(“click“) ) {
if( msg.pSender == m_pCloseBtn ) {
PostQuitMessage(0);
return; 
}
else if( msg.pSender == m_pMinBtn ) { 
SendMessage(WM_SYSCOMMAND SC_MINIMIZE 0); return; }
else if( msg.pSender == m_pMaxBtn ) { 
SendMessage(WM_SYSCOMMAND SC_MAXIMIZE 0); return; }
else if( msg.pSender == m_pRestoreBtn ) { 
SendMessage(WM_SYSCOMMAND SC_RESTORE 0); return; }
}
else if(msg.sType==_T(“selectchanged“))
{
CDuiString name = msg.pSender->GetName();
CTabLayoutUI* pControl = static_cast(m_pm.FindControl(_T(“switch“)));
if(name==_T(“examine“))
 pControl->SelectItem(0);
else if(name==_T(“trojan“))
 pControl->SelectItem(1);
else if(name==_T(“plugins“))
pControl->SelectItem(2);
else if(name==_T(“vulnerability“))
pControl->SelectItem(3);
else if(name==_T(“rubbish“))
pControl->SelectItem(4);
else if(name==_T(“cleanup“))
pControl->SelectItem(5);
else if(name==_T(“fix“))
pControl->SelectItem(6);
else if(name==_T(“tool“))
pControl->SelectItem(7);
}
}

LRESULT OnCreate(UINT uMsg WPARAM wParam LPARAM lParam BOOL& bHandled)
{
LONG styleValue = ::GetWindowLong(*this GWL_style);
styleValue &= ~WS_CAPTION;
::SetWindowLong(*this GWL_style styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);

m_pm.Init(m_hWnd);
CDialogBuilder builder;
CDialogBuilderCallbackEx cb;
CControlUI* pRoot = builder.Create(_T(“skin.xml“) (UINT)0  &cb &m_pm);
ASSERT(pRoot && “Failed to parse xml“);
m_pm.AttachDialog(pRoot);
m_pm.AddNotifier(this);

Init();
return 0;
}

LRESULT OnClose(UINT uMsg WPARAM wParam LPARAM lParam BOOL& bHandled)
{
bHandled = FALSE;
return 0;
}

LRESULT OnDestroy(UINT uMsg WPARAM wParam LPARAM lParam BOOL& bHandled)
{
::PostQuitMessage(0L);

bHandled = FALSE;
return 0;
}

LRESULT OnNcActivate(UINT uMsg WPARAM wParam LPARAM lParam BOOL& bHandled)
{
        if( ::IsIconic(*this) ) bHandled = FALSE;
        return (wParam == 0) ? TRUE : FALSE;
}

LRESULT OnNcCalcSize(UINT uMsg WPARAM wParam LPARAM lParam BOOL&

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-09-13 01:39  duilib-master\
     文件         126  2014-09-13 01:39  duilib-master\.gitignore
     目录           0  2014-09-13 01:39  duilib-master\360SafeDemo\
     文件        8858  2014-09-13 01:39  duilib-master\360SafeDemo\360Safe.cpp
     文件       10547  2014-09-13 01:39  duilib-master\360SafeDemo\360SafeDemo.vcproj
     文件         590  2014-09-13 01:39  duilib-master\360SafeDemo\CMakeLists.txt
     文件         606  2014-09-13 01:39  duilib-master\360SafeDemo\ControlEx.h
     文件        1079  2014-09-13 01:39  duilib-master\360SafeDemo\StdAfx.cpp
     文件         900  2014-09-13 01:39  duilib-master\360SafeDemo\StdAfx.h
     文件         657  2014-09-13 01:39  duilib-master\CMakeLists.txt
     文件        1650  2014-09-13 01:39  duilib-master\DuiDesigner.sln
     目录           0  2014-09-13 01:39  duilib-master\DuiDesigner\
     文件        1057  2014-09-13 01:39  duilib-master\DuiDesigner\CMakeLists.txt
     文件         895  2014-09-13 01:39  duilib-master\DuiDesigner\ChildFrm.cpp
     文件         483  2014-09-13 01:39  duilib-master\DuiDesigner\ChildFrm.h
     文件        7744  2014-09-13 01:39  duilib-master\DuiDesigner\ClassView.cpp
     文件        1527  2014-09-13 01:39  duilib-master\DuiDesigner\ClassView.h
     文件        2606  2014-09-13 01:39  duilib-master\DuiDesigner\DialogCheckUpdate.cpp
     文件         559  2014-09-13 01:39  duilib-master\DuiDesigner\DialogCheckUpdate.h
     文件        5714  2014-09-13 01:39  duilib-master\DuiDesigner\DialogCustomFonts.cpp
     文件         694  2014-09-13 01:39  duilib-master\DuiDesigner\DialogCustomFonts.h
     文件        9383  2014-09-13 01:39  duilib-master\DuiDesigner\DialogDefaultAttribList.cpp
     文件        1165  2014-09-13 01:39  duilib-master\DuiDesigner\DialogDefaultAttribList.h
     文件        2540  2014-09-13 01:39  duilib-master\DuiDesigner\DialogProjectNew.cpp
     文件         639  2014-09-13 01:39  duilib-master\DuiDesigner\DialogProjectNew.h
     文件         659  2014-09-13 01:39  duilib-master\DuiDesigner\DialogSaveAsName.cpp
     文件         503  2014-09-13 01:39  duilib-master\DuiDesigner\DialogSaveAsName.h
     文件        2801  2014-09-13 01:39  duilib-master\DuiDesigner\DialogSkinFileNew.cpp
     文件         805  2014-09-13 01:39  duilib-master\DuiDesigner\DialogSkinFileNew.h
     文件        3447  2014-09-13 01:39  duilib-master\DuiDesigner\DialogTemplateOpen.cpp
     文件         711  2014-09-13 01:39  duilib-master\DuiDesigner\DialogTemplateOpen.h
............此处省略521个文件信息

评论

共有 条评论