- xtimer_demo.zip
- src
- vs2005
- vs6
- Release
- XTimer.exe
- XTimer.dsp
- XTimer.dsw
- wav files
- 4beeps.wav
- alarm1.wav
- alarm2.wav
- alarmclock.wav
- alert.wav
- beeps.wav
- bell.wav
- buzzer.wav
- chirp.wav
- ding.wav
- dingdong.wav
- fanfare.wav
- gong.wav
- ohoh.wav
- onebell.wav
- quackquack.wav
- ringer.wav
- the_timer_has_expired_f.wav
- the_timer_has_expired_m.wav
- trumpet.wav
- xtimer_sounds.zip
- alarmclock.wav
- alert.wav
- buzzer.wav
- divedive.wav
- europolice.wav
- quackquack.wav
- siren.wav
|
// XThemeHelper.h Version 1.0
//
// Author: Hans Dietrich
// hdietrich@gmail.com
//
// This software is released into the public domain. You are free to use
// it in any way you like, except that you may not sell this source code.
//
// This software is provided "as is" with no expressed or implied warranty.
// I accept no liability for any damage or loss of business that this
// software may cause.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef XTHEMEHELPER_H
#define XTHEMEHELPER_H
#include "uxtheme.h"
#include "tmschema.h"
///////////////////////////////////////////////////////////////////////////////
//
// typedefs for uxtheme functions
//
typedef HRESULT (__stdcall *PFNCLOSETHEMEDATA)(HTHEME hTheme);
typedef HRESULT (__stdcall *PFNDRAWTHEMEBACKGROUND)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId,
const RECT *pRect, const RECT *pClipRect);
typedef HRESULT (__stdcall *PFNDRAWTHEMETEXT)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, LPCWSTR pszText,
int iCharCount, DWORD dwTextFlags,
DWORD dwTextFlags2, const RECT *pRect);
typedef HRESULT (__stdcall *PFNGETTHEMEBACKGROUNDCONTENTRECT)(HTHEME hTheme,
HDC hdc, int iPartId, int iStateId,
const RECT *pBoundingRect,
RECT *pContentRect);
typedef BOOL (__stdcall *PFNISAPPTHEMED)();
typedef BOOL (__stdcall *PFNISTHEMEACTIVE)();
typedef HTHEME (__stdcall *PFNOPENTHEMEDATA)(HWND hwnd,
LPCWSTR pszClassList);
///////////////////////////////////////////////////////////////////////////////
//
// CXThemeHelper class definition
//
class CXThemeHelper
{
// Construction
public:
CXThemeHelper();
virtual ~CXThemeHelper();
// Attributes
public:
BOOL IsAppThemed();
BOOL IsThemeActive();
BOOL IsThemeLibAvailable() { return m_bThemeLibLoaded; }
// Operations
public:
BOOL CloseThemeData(HTHEME hTheme);
BOOL DrawThemeBackground(HTHEME hTheme,
HDC hdc,
int iPartId,
int iStateId,
const RECT *pRect,
const RECT *pClipRect);
BOOL DrawThemeText(HTHEME hTheme,
HDC hdc,
int iPartId,
int iStateId,
LPCTSTR lpszText,
DWORD dwTextFlags,
DWORD dwTextFlags2,
const RECT *pRect);
BOOL GetThemeBackgroundContentRect(HTHEME hTheme,
HDC hdc,
int iPartId,
int iStateId,
const RECT *pBoundingRect,
RECT *pContentRect);
HTHEME OpenThemeData(HWND hWnd, LPCTSTR lpszClassList);
// Implementation
private:
static PFNCLOSETHEMEDATA m_CloseThemeData;
static PFNDRAWTHEMEBACKGROUND m_DrawThemeBackground;
static PFNDRAWTHEMETEXT m_DrawThemeText;
static PFNGETTHEMEBACKGROUNDCONTENTRECT m_GetThemeBackgroundContentRect;
static PFNISAPPTHEMED m_IsAppThemed;
static PFNISTHEMEACTIVE m_IsThemeActive;
static PFNOPENTHEMEDATA m_OpenThemeData;
static HMODULE m_hThemeLib;
static BOOL m_bThemeLibLoaded;
static int m_nUseCount;
void Init();
};
///////////////////////////////////////////////////////////////////////////////
//
// CXThemeHelper instance
//
#ifndef XTHEMEHELPER_CPP
// include an instance in each file; the namespace insures uniqueness
namespace { CXThemeHelper ThemeHelper; }
#endif
#endif // XTHEMEHELPER_H
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I attended St. Michael's College of the University of Toronto, with the intention of becoming a priest. A friend in the University's Computer Science Department got me interested in programming, and I have been hooked ever since.
Recently, I have moved to Los Angeles where I am doing consulting and development work.
For consulting and custom software development, please see
www.hdsoft.org.