资源简介
Alberl的教程项目完全版(整合387版本duilib)
Alberl用的duilib版本是SVN上第387个版本,时间是2013.08.15~
https://www.cnblogs.com/Alberl/p/3354459.html
代码片段和文件信息
#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 2018-02-28 00:34 duilib\
文件 221646 2018-02-28 00:33 duilib\2013 duilib入门简明教程 整个工程(含资源、代码) .7z
目录 0 2018-02-28 01:12 duilib\duilib\
目录 0 2018-02-27 23:19 duilib\duilib\.git\
文件 126 2018-02-27 22:10 duilib\duilib\.gitignore
目录 0 2018-02-27 21:23 duilib\duilib\.git\branches\
文件 302 2018-02-27 22:06 duilib\duilib\.git\config
文件 73 2018-02-27 21:23 duilib\duilib\.git\desc
文件 41 2018-02-27 23:18 duilib\duilib\.git\HEAD
目录 0 2018-02-27 23:19 duilib\duilib\.git\hooks\
文件 478 2018-02-27 21:23 duilib\duilib\.git\hooks\applypatch-msg.sample
文件 896 2018-02-27 21:23 duilib\duilib\.git\hooks\commit-msg.sample
文件 189 2018-02-27 21:23 duilib\duilib\.git\hooks\post-update.sample
文件 424 2018-02-27 21:23 duilib\duilib\.git\hooks\pre-applypatch.sample
文件 1642 2018-02-27 21:23 duilib\duilib\.git\hooks\pre-commit.sample
文件 1348 2018-02-27 21:23 duilib\duilib\.git\hooks\pre-push.sample
文件 4951 2018-02-27 21:23 duilib\duilib\.git\hooks\pre-reba
文件 1239 2018-02-27 21:23 duilib\duilib\.git\hooks\prepare-commit-msg.sample
文件 3611 2018-02-27 21:23 duilib\duilib\.git\hooks\update.sample
文件 49617 2018-02-27 23:18 duilib\duilib\.git\index
目录 0 2018-02-27 23:19 duilib\duilib\.git\info\
文件 240 2018-02-27 21:23 duilib\duilib\.git\info\exclude
目录 0 2018-02-27 23:19 duilib\duilib\.git\logs\
文件 669 2018-02-27 23:18 duilib\duilib\.git\logs\HEAD
目录 0 2018-02-27 23:19 duilib\duilib\.git\logs\refs\
目录 0 2018-02-27 23:19 duilib\duilib\.git\logs\refs\heads\
文件 193 2018-02-27 22:06 duilib\duilib\.git\logs\refs\heads\master
目录 0 2018-02-27 23:19 duilib\duilib\.git\logs\refs\remotes\
目录 0 2018-02-27 23:19 duilib\duilib\.git\logs\refs\remotes\origin\
文件 193 2018-02-27 22:06 duilib\duilib\.git\logs\refs\remotes\origin\HEAD
目录 0 2018-02-27 23:19 duilib\duilib\.git\ob
............此处省略761个文件信息
评论
共有 条评论