diff --git a/Demos/bdwallpaper/controlex/UIButtonEx.h b/Demos/bdwallpaper/controlex/UIButtonEx.h index c5bb1823..c4aeb844 100644 --- a/Demos/bdwallpaper/controlex/UIButtonEx.h +++ b/Demos/bdwallpaper/controlex/UIButtonEx.h @@ -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}; diff --git a/Demos/duidemo/MainWnd.h b/Demos/duidemo/MainWnd.h index bbd34a48..4601c184 100644 --- a/Demos/duidemo/MainWnd.h +++ b/Demos/duidemo/MainWnd.h @@ -1,5 +1,6 @@ #pragma once #include "PopWnd.h" +#include "ShlObj.h" class CDemoFrame : public WindowImplBase, public CWebBrowserEventHandler, public SkinChangedReceiver { @@ -23,7 +24,7 @@ class CDemoFrame : public WindowImplBase, public CWebBrowserEventHandler, public pBrowser1->SetWebBrowserEventHandler(this); CWebBrowserUI* pBrowser2 = static_cast(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(m_PaintManager.FindControl(_T("font_size"))); @@ -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); } } diff --git a/Demos/duidemo/Res/duidemo.zip b/Demos/duidemo/Res/duidemo.zip index bb7124dd..1cad5ac5 100644 Binary files a/Demos/duidemo/Res/duidemo.zip and b/Demos/duidemo/Res/duidemo.zip differ diff --git a/Demos/duidemo/duidemo.cpp b/Demos/duidemo/duidemo.cpp index c85e8299..8f7fb538 100644 --- a/Demos/duidemo/duidemo.cpp +++ b/Demos/duidemo/duidemo.cpp @@ -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; diff --git a/Demos/duidemo/duidemo.vcxproj b/Demos/duidemo/duidemo.vcxproj index 17456b30..34a4a412 100644 --- a/Demos/duidemo/duidemo.vcxproj +++ b/Demos/duidemo/duidemo.vcxproj @@ -121,7 +121,6 @@ MultiThreadedDebug Use stdafx.h - true Level3 true ProgramDatabase @@ -137,9 +136,7 @@ Windows MachineX86 - - true - + diff --git a/bin/skin/duidemo/main.xml b/bin/skin/duidemo/main.xml index 04af1b06..885f6ae8 100644 --- a/bin/skin/duidemo/main.xml +++ b/bin/skin/duidemo/main.xml @@ -13,9 +13,10 @@