win32visualstyleswrapper.h

来自「这是VCF框架的代码」· C头文件 代码 · 共 861 行 · 第 1/3 页

H
861
字号
			Instance.funcs_.isThemeBackgroundPartiallyTransparentFunc = (PFNISTHEMEBACKGROUNDPARTIALLYTRANSPARENT)Instance.getProc("IsThemeBackgroundPartiallyTransparent", (FARPROC)IsThemeBackgroundPartiallyTransparentFail);		}		return (*Instance.funcs_.isThemeBackgroundPartiallyTransparentFunc)(hTheme, iPartId, iStateId);	}	static HRESULT GetThemeColor(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  COLORREF *pColor)	{		if ( NULL == Instance.funcs_.getThemeColorFunc ) {			Instance.funcs_.getThemeColorFunc = (PFNGETTHEMECOLOR)Instance.getProc("GetThemeColor", (FARPROC)GetThemeColorFail);		}		return (*Instance.funcs_.getThemeColorFunc)(hTheme, iPartId, iStateId, iPropId, pColor);	}	static HRESULT GetThemeMetric(HTHEME hTheme,  HDC hdc, int iPartId,		int iStateId, int iPropId,  int *piVal)	{		if ( NULL == Instance.funcs_.getThemeMetricFunc ) {			Instance.funcs_.getThemeMetricFunc = (PFNGETTHEMEMETRIC)Instance.getProc("GetThemeMetric", (FARPROC)GetThemeMetricFail);		}		return (*Instance.funcs_.getThemeMetricFunc)(hTheme, hdc, iPartId, iStateId, iPropId, piVal);	}	static HRESULT GetThemeString(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  LPWSTR pszBuff, int cchMaxBuffChars)	{		if ( NULL == Instance.funcs_.getThemeStringFunc ) {			Instance.funcs_.getThemeStringFunc = (PFNGETTHEMESTRING)Instance.getProc("GetThemeString", (FARPROC)GetThemeStringFail);		}		return (*Instance.funcs_.getThemeStringFunc)(hTheme, iPartId, iStateId, iPropId, pszBuff, cchMaxBuffChars);	}	static HRESULT GetThemeBool(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  BOOL *pfVal)	{		if ( NULL == Instance.funcs_.getThemeBoolFunc ) {			Instance.funcs_.getThemeBoolFunc = (PFNGETTHEMEBOOL)Instance.getProc("GetThemeBool", (FARPROC)GetThemeBoolFail);		}		return (*Instance.funcs_.getThemeBoolFunc)(hTheme, iPartId, iStateId, iPropId, pfVal);	}	static HRESULT GetThemeInt(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  int *piVal)	{		if ( NULL == Instance.funcs_.getThemeIntFunc ) {			Instance.funcs_.getThemeIntFunc = (PFNGETTHEMEINT)Instance.getProc("GetThemeInt", (FARPROC)GetThemeIntFail);		}		return (*Instance.funcs_.getThemeIntFunc)(hTheme, iPartId, iStateId, iPropId, piVal);	}	static HRESULT GetThemeEnumValue(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  int *piVal)	{		if ( NULL == Instance.funcs_.getThemeEnumValueFunc ) {			Instance.funcs_.getThemeEnumValueFunc = (PFNGETTHEMEENUMVALUE)Instance.getProc("GetThemeEnumValue", (FARPROC)GetThemeEnumValueFail);		}		return (*Instance.funcs_.getThemeEnumValueFunc)(hTheme, iPartId, iStateId, iPropId, piVal);	}	static HRESULT GetThemePosition(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  POINT *pPoint)	{		if ( NULL == Instance.funcs_.getThemePositionFunc ) {			Instance.funcs_.getThemePositionFunc = (PFNGETTHEMEPOSITION)Instance.getProc("GetThemePosition", (FARPROC)GetThemePositionFail);		}		return (*Instance.funcs_.getThemePositionFunc)(hTheme, iPartId, iStateId, iPropId, pPoint);	}	static HRESULT GetThemeFont(HTHEME hTheme,  HDC hdc, int iPartId,		int iStateId, int iPropId,  LOGFONT *pFont)	{		if ( NULL == Instance.funcs_.getThemeFontFunc ) {			Instance.funcs_.getThemeFontFunc = (PFNGETTHEMEFONT)Instance.getProc("GetThemeFont", (FARPROC)GetThemeFontFail);		}		return (*Instance.funcs_.getThemeFontFunc)(hTheme, hdc, iPartId, iStateId, iPropId, pFont);	}	static HRESULT GetThemeRect(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  RECT *pRect)	{		if ( NULL == Instance.funcs_.getThemeRectFunc ) {			Instance.funcs_.getThemeRectFunc = (PFNGETTHEMERECT)Instance.getProc("GetThemeRect", (FARPROC)GetThemeRectFail);		}		return (*Instance.funcs_.getThemeRectFunc)(hTheme, iPartId, iStateId, iPropId, pRect);	}	static HRESULT GetThemeMargins(HTHEME hTheme,  HDC hdc, int iPartId,		int iStateId, int iPropId,  RECT *prc,  MARGINS *pMargins)	{		if ( NULL == Instance.funcs_.getThemeMarginsFunc ) {			Instance.funcs_.getThemeMarginsFunc = (PFNGETTHEMEMARGINS)Instance.getProc("GetThemeMargins", (FARPROC)GetThemeMarginsFail);		}		return (*Instance.funcs_.getThemeMarginsFunc)(hTheme, hdc, iPartId, iStateId, iPropId, prc, pMargins);	}	static HRESULT GetThemeIntList(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  INTLIST *pIntList)	{		if ( NULL == Instance.funcs_.getThemeIntListFunc ) {			Instance.funcs_.getThemeIntListFunc = (PFNGETTHEMEINTLIST)Instance.getProc("GetThemeIntList", (FARPROC)GetThemeIntListFail);		}		return (*Instance.funcs_.getThemeIntListFunc)(hTheme, iPartId, iStateId, iPropId, pIntList);	}	static HRESULT GetThemePropertyOrigin(HTHEME hTheme, int iPartId,		int iStateId, int iPropId, PROPERTYORIGIN *pOrigin)	{		if ( NULL == Instance.funcs_.getThemePropertyOriginFunc ) {			Instance.funcs_.getThemePropertyOriginFunc = (PFNGETTHEMEPROPERTYORIGIN)Instance.getProc("GetThemePropertyOrigin", (FARPROC)GetThemePropertyOriginFail);		}		return (*Instance.funcs_.getThemePropertyOriginFunc)(hTheme, iPartId, iStateId, iPropId, pOrigin);	}	static HRESULT SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,		LPCWSTR pszSubIdList)	{		if ( NULL == Instance.funcs_.setWindowThemeFunc ) {			Instance.funcs_.setWindowThemeFunc = (PFNSETWINDOWTHEME)Instance.getProc("SetWindowTheme", (FARPROC)SetWindowThemeFail);		}		return (*Instance.funcs_.setWindowThemeFunc)(hwnd, pszSubAppName, pszSubIdList);	}	static HRESULT GetThemeFilename(HTHEME hTheme, int iPartId,		int iStateId, int iPropId,  LPWSTR pszThemeFileName, int cchMaxBuffChars)	{		if ( NULL == Instance.funcs_.getThemeFilenameFunc ) {			Instance.funcs_.getThemeFilenameFunc = (PFNGETTHEMEFILENAME)Instance.getProc("GetThemeFilename", (FARPROC)GetThemeFilenameFail);		}		return (*Instance.funcs_.getThemeFilenameFunc)(hTheme, iPartId, iStateId, iPropId,  pszThemeFileName, cchMaxBuffChars);	}	static COLORREF GetThemeSysColor(HTHEME hTheme, int iColorId)	{		if ( NULL == Instance.funcs_.getThemeSysColorFunc ) {			Instance.funcs_.getThemeSysColorFunc = (PFNGETTHEMESYSCOLOR)Instance.getProc("GetThemeSysColor", (FARPROC)GetThemeSysColorFail);		}		return (*Instance.funcs_.getThemeSysColorFunc)(hTheme, iColorId);	}	static HBRUSH GetThemeSysColorBrush(HTHEME hTheme, int iColorId)	{		if ( NULL == Instance.funcs_.getThemeSysColorBrushFunc ) {			Instance.funcs_.getThemeSysColorBrushFunc = (PFNGETTHEMESYSCOLORBRUSH)Instance.getProc("GetThemeSysColorBrush", (FARPROC)GetThemeSysColorBrushFail);		}		return (*Instance.funcs_.getThemeSysColorBrushFunc)(hTheme, iColorId);	}	static BOOL GetThemeSysBool(HTHEME hTheme, int iBoolId)	{		if ( NULL == Instance.funcs_.getThemeSysBoolFunc ) {			 Instance.funcs_.getThemeSysBoolFunc = (PFNGETTHEMESYSBOOL)Instance.getProc("GetThemeSysBool", (FARPROC)GetThemeSysBoolFail);		}		return (* Instance.funcs_.getThemeSysBoolFunc)(hTheme, iBoolId);	}	static int GetThemeSysSize(HTHEME hTheme, int iSizeId)	{		if ( NULL == Instance.funcs_.getThemeSysSizeFunc ) {			Instance.funcs_.getThemeSysSizeFunc = (PFNGETTHEMESYSSIZE)Instance.getProc("GetThemeSysSize", (FARPROC)GetThemeSysSizeFail);		}		return (*Instance.funcs_.getThemeSysSizeFunc)(hTheme, iSizeId);	}	static HRESULT GetThemeSysFont(HTHEME hTheme, int iFontId,  LOGFONT *plf)	{		if ( NULL == Instance.funcs_.getThemeSysFontFunc ) {			Instance.funcs_.getThemeSysFontFunc = (PFNGETTHEMESYSFONT)Instance.getProc("GetThemeSysFont", (FARPROC)GetThemeSysFontFail);		}		return (*Instance.funcs_.getThemeSysFontFunc)(hTheme, iFontId, plf);	}	static HRESULT GetThemeSysString(HTHEME hTheme, int iStringId,		LPWSTR pszStringBuff, int cchMaxStringChars)	{		if ( NULL == Instance.funcs_.getThemeSysStringFunc ) {			Instance.funcs_.getThemeSysStringFunc = (PFNGETTHEMESYSSTRING)Instance.getProc("GetThemeSysString", (FARPROC)GetThemeSysStringFail);		}		return (*Instance.funcs_.getThemeSysStringFunc)(hTheme, iStringId, pszStringBuff, cchMaxStringChars);	}	static HRESULT GetThemeSysInt(HTHEME hTheme, int iIntId, int *piValue)	{		if ( NULL == Instance.funcs_.getThemeSysIntFunc ) {			 Instance.funcs_.getThemeSysIntFunc = (PFNGETTHEMESYSINT)Instance.getProc("GetThemeSysInt", (FARPROC)GetThemeSysIntFail);		}		return (*Instance.funcs_.getThemeSysIntFunc)(hTheme, iIntId, piValue);	}	static BOOL IsThemeActive()	{		if ( NULL == Instance.funcs_.isThemeActiveFunc ) {			Instance.funcs_.isThemeActiveFunc = (PFNISTHEMEACTIVE)Instance.getProc("IsThemeActive", (FARPROC)IsThemeActiveFail);		}		return (*Instance.funcs_.isThemeActiveFunc)();	}	static BOOL IsAppThemed()	{		if ( NULL == Instance.funcs_.isAppThemedFunc ) {			Instance.funcs_.isAppThemedFunc = (PFNISAPPTHEMED)Instance.getProc("IsAppThemed", (FARPROC)IsAppThemedFail);		}		return (*Instance.funcs_.isAppThemedFunc)();	}	static HTHEME GetWindowTheme(HWND hwnd)	{		if ( NULL == Instance.funcs_.getWindowThemeFunc ) {			 Instance.funcs_.getWindowThemeFunc = (PFNGETWINDOWTHEME)Instance.getProc("GetWindowTheme", (FARPROC)GetWindowThemeFail);		}		return (* Instance.funcs_.getWindowThemeFunc)(hwnd);	}	static HRESULT EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)	{		if ( NULL == Instance.funcs_.enableThemeDialogTextureFunc ) {			Instance.funcs_.enableThemeDialogTextureFunc = (PFNENABLETHEMEDIALOGTEXTURE)Instance.getProc("EnableThemeDialogTexture", (FARPROC)EnableThemeDialogTextureFail);		}		return (*Instance.funcs_.enableThemeDialogTextureFunc)(hwnd, dwFlags);	}	static BOOL IsThemeDialogTextureEnabled(HWND hwnd)	{		if ( NULL == Instance.funcs_.isThemeDialogTextureEnabledFunc ) {			Instance.funcs_.isThemeDialogTextureEnabledFunc = (PFNISTHEMEDIALOGTEXTUREENABLED)Instance.getProc("IsThemeDialogTextureEnabled", (FARPROC)IsThemeDialogTextureEnabledFail);		}		return (*Instance.funcs_.isThemeDialogTextureEnabledFunc)(hwnd);	}	static DWORD GetThemeAppProperties()	{		if ( NULL == Instance.funcs_.getThemeAppPropertiesFunc ) {			Instance.funcs_.getThemeAppPropertiesFunc = (PFNGETTHEMEAPPPROPERTIES)Instance.getProc("GetThemeAppProperties", (FARPROC)GetThemeAppPropertiesFail);		}		return (*Instance.funcs_.getThemeAppPropertiesFunc)();	}	static void SetThemeAppProperties(DWORD dwFlags)	{		if ( NULL == Instance.funcs_.setThemeAppPropertiesFunc ) {			Instance.funcs_.setThemeAppPropertiesFunc = (PFNSETTHEMEAPPPROPERTIES)Instance.getProc("SetThemeAppProperties", (FARPROC)SetThemeAppPropertiesFail);		}		(*Instance.funcs_.setThemeAppPropertiesFunc)(dwFlags);	}	static HRESULT GetCurrentThemeName(		LPWSTR pszThemeFileName, int cchMaxNameChars,		LPWSTR pszColorBuff, int cchMaxColorChars,		LPWSTR pszSizeBuff, int cchMaxSizeChars)	{		if ( NULL == Instance.funcs_.getCurrentThemeNameFunc ) {			Instance.funcs_.getCurrentThemeNameFunc = (PFNGETCURRENTTHEMENAME)Instance.getProc("GetCurrentThemeName", (FARPROC)GetCurrentThemeNameFail);		}		return (*Instance.funcs_.getCurrentThemeNameFunc)(pszThemeFileName, cchMaxNameChars, pszColorBuff, cchMaxColorChars, pszSizeBuff, cchMaxSizeChars);	}	static HRESULT GetThemeDocumentationProperty(LPCWSTR pszThemeName,		LPCWSTR pszPropertyName,  LPWSTR pszValueBuff, int cchMaxValChars)	{		if ( NULL == Instance.funcs_.getThemeDocumentationPropertyFunc ) {			Instance.funcs_.getThemeDocumentationPropertyFunc = (PFNGETTHEMEDOCUMENTATIONPROPERTY)Instance.getProc("GetThemeDocumentationProperty", (FARPROC)GetThemeDocumentationPropertyFail);		}		return (*Instance.funcs_.getThemeDocumentationPropertyFunc)(pszThemeName, pszPropertyName, pszValueBuff, cchMaxValChars);	}	static HRESULT DrawThemeParentBackground(HWND hwnd, HDC hdc,  RECT* prc)	{		if ( NULL == Instance.funcs_.drawThemeParentBackgroundFunc ) {			Instance.funcs_.drawThemeParentBackgroundFunc = (PFNDRAWTHEMEPARENTBACKGROUND)Instance.getProc("DrawThemeParentBackground", (FARPROC)DrawThemeParentBackgroundFail);		}		return (*Instance.funcs_.drawThemeParentBackgroundFunc)(hwnd, hdc, prc);	}	static HRESULT EnableTheming(BOOL fEnable)	{		if ( NULL == Instance.funcs_.enableThemingFunc ) {			Instance.funcs_.enableThemingFunc = (PFNENABLETHEMING)Instance.getProc("EnableTheming", (FARPROC)EnableThemingFail);		}		return (*Instance.funcs_.enableThemingFunc)(fEnable);	}};#endif // _VCF_WIN32VISUALSTYLESWRAPPER_H__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?