Skip to content

Commit

Permalink
日常维护
Browse files Browse the repository at this point in the history
  • Loading branch information
Troy committed Aug 25, 2015
1 parent e8d14c5 commit 3e190cb
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Demos/bdwallpaper/controlex/UIButtonEx.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ namespace DuiLib
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER, IID_IActiveDesktop, (void**)&pIAD);
if( !SUCCEEDED(hr) ) return;

#ifdef UNICODE
hr = pIAD->SetWallpaper(sWPImage, 0);
#endif
if( !SUCCEEDED(hr) ) return;

WALLPAPEROPT wp = {0};
Expand Down
17 changes: 15 additions & 2 deletions Demos/duidemo/MainWnd.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include "PopWnd.h"
#include "ShlObj.h"

class CDemoFrame : public WindowImplBase, public CWebBrowserEventHandler, public SkinChangedReceiver
{
Expand All @@ -23,7 +24,7 @@ class CDemoFrame : public WindowImplBase, public CWebBrowserEventHandler, public
pBrowser1->SetWebBrowserEventHandler(this);
CWebBrowserUI* pBrowser2 = static_cast<CWebBrowserUI*>(m_PaintManager.FindControl(_T("oneclick_browser2")));
pBrowser2->SetWebBrowserEventHandler(this);
pBrowser1->NavigateUrl(_T("http://blog.csdn.net/duisharp"));
pBrowser1->NavigateUrl(_T("http://member.yw26.com/c_register.aspx"));
pBrowser2->NavigateUrl(_T("https://github.com/duisharp/DuiLib_Ultimate"));

CComboUI* pFontSize = static_cast<CComboUI*>(m_PaintManager.FindControl(_T("font_size")));
Expand Down Expand Up @@ -188,9 +189,21 @@ class CDemoFrame : public WindowImplBase, public CWebBrowserEventHandler, public
m_pPopWnd->CenterWindow();
::ShowWindow(*m_pPopWnd, SW_SHOW);
}
else if(sName.CompareNoCase(_T("qqgroup_btn")) == 0)
{
TCHAR szPath[MAX_PATH] ={0};
SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES | CSIDL_FLAG_CREATE, NULL, 0, szPath);
CDuiString sIEPath;
sIEPath.Format(_T("%s\\Internet Explorer\\iexplore.exe"), szPath);
ShellExecute(NULL, _T("open"), sIEPath, _T("http://jq.qq.com/?_wv=1027&k=cDTUzr"), NULL, SW_SHOW);
}
else if(sName.CompareNoCase(_T("qq_btn")) == 0)
{
ShellExecute(NULL, _T("open"), NULL, _T("tencent://Message/?Uin=656067418&Menu=yes"), NULL, SW_SHOW);
TCHAR szPath[MAX_PATH] ={0};
SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES | CSIDL_FLAG_CREATE, NULL, 0, szPath);
CDuiString sIEPath;
sIEPath.Format(_T("%s\\Internet Explorer\\iexplore.exe"), szPath);
ShellExecute(NULL, _T("open"), sIEPath, _T("tencent://Message/?Uin=656067418&Menu=yes"), NULL, SW_SHOW);
}
}

Expand Down
Binary file modified Demos/duidemo/Res/duidemo.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions Demos/duidemo/duidemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

static LPBYTE resource_zip_buffer_ = NULL;

//#define USE_EMBEDED_RESOURCE
#define USE_EMBEDED_RESOURCE

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow)
{
CPaintManagerUI::SetInstance(hInstance);

#ifdef USE_EMBEDED_RESOURCE
HRSRC hResource = ::FindResource(CPaintManagerUI::GetResourceDll(), MAKEINTRESOURCE(IDR_ZIPRES), _T("ZIPRES"));
HRSRC hResource = ::FindResource(CPaintManagerUI::GetResourceDll(), _T("IDR_ZIPRES"), _T("ZIPRES"));
if( hResource == NULL )
return 0L;
DWORD dwSize = 0;
Expand Down
5 changes: 1 addition & 4 deletions Demos/duidemo/duidemo.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand All @@ -137,9 +136,7 @@
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Bscmake />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugA|Win32'">
<Midl>
Expand Down
7 changes: 4 additions & 3 deletions bin/skin/duidemo/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
<Container width="64" height="64" bkimage="logo.jpg" />
<VerticalLayout inset="0,10,0,0" childpadding="5">
<Label text="Duilib 使用演示 v1.1" width="300" align="vcenter" align="left" textcolor="#FFEEEEEE" font="3" tooltip="官网"/>
<HorizontalLayout height="20" >
<Button name="homepage_btn" text="演示官网" width="60" align="vcenter" align="left" textcolor="#FFEEEEEE" hottextcolor="#FF0000FF" font="1" tooltip="官网"/>
<Label text="duilib开源项目圈(261675375)- Troy(QQ:656067418)" align="left" wordbreak="true" />
<HorizontalLayout height="20" childpadding="20">
<Button name="homepage_btn" text="演示官网" width="60" valign="vcenter" align="left" textcolor="#FFEEEEEE" hottextcolor="#FF0000FF" font="1" tooltip="官网"/>
<Button name="qqgroup_btn" text="duilib开源项目圈(261675375)" width="200" autocalcwidth="true" valign="vcenter" align="left" textcolor="#FFEEEEEE" hottextcolor="#FF0000FF" font="1" tooltip="加入duilib大家庭" />
<Button name="qq_btn" text="Troy(QQ:656067418)" width="150" valign="vcenter" align="left" textcolor="#FFEEEEEE" hottextcolor="#FF0000FF" font="1" tooltip="添加Troy为好友" />
</HorizontalLayout>
</VerticalLayout>
</HorizontalLayout>
Expand Down

0 comments on commit 3e190cb

Please sign in to comment.