Skip to content

Commit

Permalink
所有demo解决方案增加duilib项目
Browse files Browse the repository at this point in the history
统一demo项目配置选项,与最新库对应
  • Loading branch information
redrain committed Jan 13, 2017
1 parent 91b1b03 commit 52dbddf
Show file tree
Hide file tree
Showing 145 changed files with 613 additions and 1,069 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Window size="840,600" sizebox="4,4,4,4" caption="0,0,0,75" mininfo="840,600" >
<Window size="840,600" sizebox="4,4,4,4" caption="0,0,0,75" mininfo="840,600" showshadow="true" shadowsize="4">
<Font name="微软雅黑" size="13"/>
<Font name="微软雅黑" size="16"/>
<Font name="微软雅黑" size="22"/>
<Default name="VScrollBar" value="width=&quot;13&quot; button1normalimage=&quot;file='CustomList\vscroll_up.png'&quot; button1hotimage=&quot;file='CustomList\vscroll_up.png'&quot; button1pushedimage=&quot;file='CustomList\vscroll_up.png' &quot; button1disabledimage=&quot;file='CustomList\vscroll_up.png'&quot; button2normalimage=&quot;file='CustomList\vscroll_down.png'&quot; button2hotimage=&quot;file='CustomList\vscroll_down.png'&quot; button2pushedimage=&quot;file='CustomList\vscroll_down.png'&quot; button2disabledimage=&quot;file='CustomList\vscroll_down.png'&quot; thumbnormalimage=&quot;file='CustomList\vscrollThums.png' corner='4,12,4,12' &quot; thumbhotimage=&quot;file='CustomList\vscrollThums.png' corner='4,12,4,12' &quot; thumbpushedimage=&quot;file='CustomList\vscrollThums.png' corner='4,12,4,12' &quot; thumbdisabledimage=&quot;file='CustomList\vscrollThums.png' corner='4,12,4,12' &quot; railnormalimage=&quot;file='CustomList\vscrollRail.png' &quot; railhotimage=&quot;file='CustomList\vscrollRail.png' &quot; railpushedimage=&quot;file='CustomList\vscrollRail.png' &quot; raildisabledimage=&quot;file='CustomList\vscrollRail.png' &quot; bknormalimage=&quot;file='CustomList\vscrollBK.png' corner='4,20,4,20'&quot; bkhotimage=&quot;file='CustomList\vscrollBK.png' corner='4,20,4,20'&quot; bkpushedimage=&quot;file='CustomList\vscrollBK.png' corner='4,20,4,20'&quot; bkdisabledimage=&quot;file='CustomList\vscrollBK.png' corner='4,20,4,20'&quot; showbutton1=&quot; false&quot; showbutton2=&quot; false&quot; " />

<VerticalLayout name="background" width="840" height="320" bkimage="file='SKIN_BK.png' corner='0,320,0,0'" bkcolor="#FFA0A0A4" bordercolor="#00969696" bordersize="1">
<VerticalLayout bkimage="file='WindowsBack.png' corner='2,120,2,35'" inset="1,1,1,1">
<HorizontalLayout height="74">
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "duilib.h"

#include "stdafx.h"
#include "FrameWnd.h"

jsValue JS_CALL js_msgBox(jsExecState es)
{
Expand Down Expand Up @@ -65,25 +65,11 @@ CDuiString CFrameWnd::GetSkinFile()
return m_strXMLPath;
}

CDuiString CFrameWnd::GetSkinFolder()
{
return _T("");
}

// UILIB_RESOURCETYPE CFrameWnd::GetResourceType() const
// {
// return UILIB_ZIPRESOURCE;
// }
//
//
// LPCTSTR CFrameWnd::GetResourceID() const
// {
// return MAKEINTRESOURCE(IDR_ZIPRES1);
// }

CControlUI* CFrameWnd::CreateControl( LPCTSTR pstrClassName )
{
if (_tcsicmp(pstrClassName, _T("wkeWebkit")) == 0) return new CWkeWebkitUI;
if (_tcsicmp(pstrClassName, _T("wkeWebkit")) == 0)
return new CWkeWebkitUI;

return NULL;
}

Expand All @@ -105,12 +91,6 @@ void CFrameWnd::InitWindow()
//m_pWke->SetURL(L"http://mudcu.be/sketchpad/"); //一个漂亮的网站,大家可以自己试试

}

CWndShadow::Initialize(m_PaintManager.GetInstance());
m_WndShadow.Create(m_hWnd);
m_WndShadow.SetSize(4);
m_WndShadow.SetPosition(0, 0);

}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
#pragma once

#ifdef _DEBUG
# ifdef _UNICODE
# pragma comment(lib, "DuiLib_ud.lib")
# else
# pragma comment(lib, "DuiLib_d.lib")
# endif
#else
# ifdef _UNICODE
# pragma comment(lib, "DuiLib_u.lib")
# else
# pragma comment(lib, "DuiLib.lib")
# endif
#endif
#include "WkeWebkit.h"

#define WM_USER_TITLE_CHANGE WM_USER + 289 // 浏览器标题改变
#define WM_USER_URL_CHANGE WM_USER + 290 // 浏览器URL改变
Expand All @@ -21,26 +8,25 @@
class CFrameWnd: public WindowImplBase
{
public:
explicit CFrameWnd(LPCTSTR pszXMLPath);

static CFrameWnd * CFrameWnd::MainWnd();
LPCTSTR GetWindowClassName() const;
CDuiString GetSkinFile();
CDuiString GetSkinFolder();
//UILIB_RESOURCETYPE GetResourceType() const;
//LPCTSTR GetResourceID() const;
static CFrameWnd* CFrameWnd::MainWnd();
LPCTSTR GetWindowClassName() const override;
CDuiString GetSkinFile() override;

void InitWindow();
void Notify(TNotifyUI& msg);
CControlUI* CreateControl(LPCTSTR pstrClassName);
LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
CControlUI* CreateControl(LPCTSTR pstrClassName) override;
LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) override;

LRESULT OnTitleChanged(HWND hwnd, WPARAM wParam, LPARAM lParam);
LRESULT OnURLChanged(HWND hwnd, WPARAM wParam, LPARAM lParam);
LRESULT OnJsNotify(HWND hwnd, WPARAM wParam, LPARAM lParam);
private:

explicit CFrameWnd(LPCTSTR pszXMLPath);
~CFrameWnd() {};

private:
CDuiString m_strXMLPath;
CWndShadow m_WndShadow;

CWkeWebkitUI *m_pWke;
CEditUI *m_pURLEdit;
Expand Down
Loading

0 comments on commit 52dbddf

Please sign in to comment.