uxthemewrapper.hpp
来自「j2me is based on j2mepolish, client & se」· HPP 代码 · 共 55 行
HPP
55 行
// Copyright E骾n O'Callaghan 2006 - 2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef UXTHEME_WRAPPER_HPP_INCLUDED
#define UXTHEME_WRAPPER_HPP_INCLUDED
#include "stdAfx.hpp"
namespace WTLx
{
class uxthemeWrapper
{
public:
typedef BOOL (WINAPI *ISAPPTHEMEDPROC)();
typedef HRESULT (WINAPI *DRAWPARENTTHEMEBACKGROUND)(HWND, HDC, RECT*);
uxthemeWrapper() :
pIsAppThemed(0),
pDrawThemeParentBackground(0)
{
hinstDll = ::LoadLibrary(_T("UxTheme.dll"));
if (hinstDll)
{
pIsAppThemed =
(ISAPPTHEMEDPROC) ::GetProcAddress(hinstDll, "IsAppThemed");
pDrawThemeParentBackground =
(DRAWPARENTTHEMEBACKGROUND) ::GetProcAddress(hinstDll, "DrawThemeParentBackground");
// ::MessageBox(0, (wformat(L"%1%, %2%") % pIsAppThemed % pDrawThemeParentBackground).str().c_str(), L"Result", 0);
}
}
~uxthemeWrapper()
{
::FreeLibrary(hinstDll);
}
ISAPPTHEMEDPROC pIsAppThemed;
DRAWPARENTTHEMEBACKGROUND pDrawThemeParentBackground;
private:
HMODULE hinstDll;
};
uxthemeWrapper& uxtheme();
};
#endif // UXTHEME_WRAPPER_HPP_INCLUDED
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?