⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uskin.h

📁 仿QQ的聊天程序vc++/mfc来学习的简易聊天室代码功能较全
💻 H
📖 第 1 页 / 共 2 页
字号:
		[in] property name 
	lpString 
		[out] pointer to the buffer 
	nMaxSize 
		[in] string buffer size 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinGetEnumString(HUSKIN hUSkin,LPCTSTR lpszSkinPropName,LPTSTR  lpString,UINT nMaxSize);

/*----------------------------------------------------------------------------
Function Name	:USkinGetEnumValue
Description		:Get custom define skin object DWORD property value. 
ProtoType		:
	BOOL USkinGetEnumValue(  HUSKIN hUSkin    // The handle to the uskin object
		LPCTSTR lpszSkinPropName    // property name
		DWORD* lpValue    // 
	);
Parameters		:
	hUSkin 
		[in] The handle to the uskin object 
	lpszSkinPropName 
		[in] property name 
	lpValue 
		[out] DWORD value pointer 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinGetEnumValue(HUSKIN hUSkin,LPCTSTR lpszSkinPropName,DWORD* lpValue);

/*----------------------------------------------------------------------------
Function Name	:USkinGetFont
Description		:Get custom define skin object font property vaule. 
ProtoType		:
	BOOL USkinGetFont(  HUSKIN hUSkin    // The handle to the uskin object
		LPCTSTR lpszSkinPropName    // property name
		LOGFONT* lpFont    // 
	);
Parameters		:
	hUSkin 
		[in] The handle to the uskin object 
	lpszSkinPropName 
		[in] property name 
	lpFont 
		[out] LOGFONT value pointer 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinGetFont(HUSKIN hUSkin,LPCTSTR lpszSkinPropName,LOGFONT* lpLogFont);

/*----------------------------------------------------------------------------
Function Name	:USkinGetColor
Description		:Get custom define object color property value. 
ProtoType		:
	BOOL USkinGetColor(  HUSKIN hUSkin    // The handle to the uskin object
		LPCTSTR lpszSkinPropName    // property name
		COLORREF* lpColor    // 
	);
Parameters		:
	hUSkin 
		[in] The handle to the uskin object 
	lpszSkinPropName 
		[in] property name 
	lpColor 
		[out] COLORREF value pointer 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinGetColor(HUSKIN hUSkin,LPCTSTR lpszSkinPropName,COLORREF* lpColor);

/*----------------------------------------------------------------------------
Function Name	:USkinDrawSkinImageSection
Description		:Draw special skinimagesection with skinpaintoption on DC. 
ProtoType		:
	BOOL USkinDrawSkinImageSection(  HUSKIN hUSkin    // Handle to the USkin object
		LPCTSTR lpszSkinPaintOptionResName    // custom skinpaintoption property name
		LPCTSTR lpszSkinImageSectionResName    // custom skinimagesection property name
		HDC hDC    // handle to the device context
		LPRECT lpDrawRect    // rectangle of skinimagesection to be drawn
	);
Parameters		:
	hUSkin 
		[in] The handle of uskin object 
	lpszSkinPaintOptionResName 
		[in] custom skinpaintoption property name 
	lpszSkinImageSectionResName 
		[in] custom skinimagesection property name 
	hDC 
		[in] Handle to the device context 
	lpDrawRect 
		[in] Pointer to a RECT structure that contains the rectangle (in logical coordinates) in which the property is to be drawn 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero 
*/
USKIN_API BOOL __stdcall USkinDrawSkinImageSection(HUSKIN hUSkin,LPCTSTR lpszSkinPaintOptionResName,LPCTSTR lpszSkinImageSectionResName,HDC hDC,LPRECT lpDrawRect);

/*----------------------------------------------------------------------------
Function Name	:USkinDrawText
Description		:Draw special textstyle within a rectangle on DC. 
ProtoType		:
	BOOL USkinDrawText(  HUSKIN hUSkin    // The handle of USkin object
		LPCTSTR lpszSkinTextStyleResName    // The textstyle property name
		HDC hDC    // handle to the device context
		LPRECT lpTextRect    // text rectangle
		LPCTSTR lpszText    // texted to be drawn,must to a null-terminated string 
	);
Parameters		:
	hUSkin 
		[in] The handle of USkin object 
	lpszSkinTextStyleResName 
		[in] The property name. which type must be TEXTEFFECT 
	hDC 
		[in] Handle to the device context 
	lpTextRect 
		[in] Pointer to a RECT structure that contains the rectangle (in logical coordinates) in which the text is to be draw 
	lpszText 
		[in] pointer to the string to be drawn 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinDrawText(HUSKIN hUSkin,LPCTSTR lpszSkinTextStyleResName,HDC hDC,LPRECT lpTextRect,LPCTSTR lpszText);

/*----------------------------------------------------------------------------
Function Name	:USkinSetWindowSkin
Description		:Set windows skin. 
ProtoType		:
	BOOL USkinSetWindowSkin(  HWND hWnd    // The handle to the window
		LPCTSTR lpszSkinObjectName    // uskin object name
	);
Parameters		:
	hWnd 
		[in] The handle to the window 
	lpszSkinObjectName 
		[in] uskin object name 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero 
*/
USKIN_API BOOL __stdcall USkinSetWindowSkin(HWND hWnd,LPCTSTR lpszSkinObjectName);

/*----------------------------------------------------------------------------
Function Name	:USkinEnableWindowSkin
Description		:Enable window support skin. 
ProtoType		:
	BOOL USkinEnableWindowSkin(  HWND hWnd    // The handle of window
		BOOL bEnabled    // using uskin
	);
Parameters		:
	hWnd 
		[in] The handle of window 
	bEnabled 
		[in] is window supported uskin 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero
*/
USKIN_API BOOL __stdcall USkinEnableWindowSkin(HWND hWnd,BOOL bEnabled);

/*----------------------------------------------------------------------------
Function Name	:USkinApplyThread
Description		:Apply uskin to thread UI. 
ProtoType		:
	BOOL USkinApplyThread(  DWORD dwThreadID    // thread id
	);
Parameters		:
	dwThreadID 
		[in] thread id 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinApplyThread(DWORD dwThreadID);

/*----------------------------------------------------------------------------
Function Name	:USkinGetSysColor
Description		:Get uskin define system color. 
ProtoType		:
	COLORREF USkinGetSysColor(  int nIndex    // color index
	);
Parameters		:
	nIndex 
		[in] Color Index Value Meaning 
Return values	:
	If the function succeeds, the return value is RGB color. If the function fails, the return value is 0. 
*/
USKIN_API COLORREF __stdcall USkinGetSysColor(int nIndex);

/*----------------------------------------------------------------------------
Function Name	:USkinGetSysColorBrush
Description		:Get uskin define system color brush. 
ProtoType		:
	HBRUSH USkinGetSysColorBrush(  int nIndex    // index of brush
	);
Parameters		:
	nIndex 
		[in] index of brush Value Meaning 

Return values	:
	If the function succeeds, the return value is handle to the brush. If the function fails, the return value is NULL. 
*/
USKIN_API HBRUSH __stdcall USkinGetSysColorBrush(int nIndex);

/*----------------------------------------------------------------------------
Function Name	:USkinGetWinColor
Description		:Get system color. 
ProtoType		:
	COLORREF USkinGetWinColor(  int nIndex    // color index
	);
Parameters		:
	nIndex 
		[in] color index Value Meaning 
Return values	:
	If the function succeeds, the return value is RGB color. If the function fails, the return value is zero. 
*/
USKIN_API COLORREF __stdcall USkinGetWinColor(int nIndex);

/*----------------------------------------------------------------------------
Function Name	:USkinGetWinColorBrush
Description		:Get windows system color brush. 
ProtoType		:
	HBRUSH USkinGetWinColorBrush(  int nIndex    // index
	);
Parameters		:
	nIndex 
		[in] color brush index Value Meaning 

Return values	:
	If the function succeeds, the return value is handle to the brush. If the function fails, the return value is NULL 
*/

USKIN_API HBRUSH __stdcall USkinGetWinColorBrush(int nIndex);
/*----------------------------------------------------------------------------
Function Name	:USkinDrawFrameControl
Description		:Same as DrawFrameControl, you can see detail in msdn. 
ProtoType		:
	BOOL USkinDrawFrameControl(  HDC hDC    // device context
		LPRECT lpRect    // draw rect
		UINT uType    // draw type
		UINT uState    // draw state
	);
Parameters		:
	hDC 
		[in] device context 
	lpRect 
		[in] draw rect 
	uType 
		[in] draw type 
	uState 
		[in] draw state 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL	__stdcall USkinDrawFrameControl(HDC hdc,LPRECT lprc,UINT uType,UINT uState);

//New Functions in v2.2
/*----------------------------------------------------------------------------
Function Name	:USkinGetWindowSkinObjectText
Description		:Get windows skin object's text property. 
ProtoType		:
	BOOL USkinGetWindowSkinObjectText(  HWND hWnd    // Handle of window
		LPCTSTR lpszSkinObjectName    // Skin object name
		LPTSTR lpString    // lpString
		UINT nMaxSize    // 
	);
Parameters		:
	hWnd 
		[in] Handle of window 
	lpszSkinObjectName 
		[in] skin object name 
	lpString 
		[out] string text 
	nMaxSize 
		[in] max string size 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinGetWindowSkinObjectText(HWND hWnd,LPCTSTR lpszSkinObjectName,LPTSTR lpString,UINT nMaxSize);

/*----------------------------------------------------------------------------
Function Name	:USkinSetWindowSkinObjectText
Description		:Set window skinobject's text property. 
ProtoType		:
	BOOL USkinSetWindowSkinObjectText(  HWND hWnd    // handle of window
		LPCTSTR lpszSkinObjectName    // skin object name
		LPTSTR lpString    // text to set
	);
Parameters		:
	hWnd 
		[in] handle of window 
	lpszSkinObjectName 
		[in] skin object name 
	lpString 
		[in] text to set 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinSetWindowSkinObjectText(HWND hWnd,LPCTSTR lpszSkinObjectName,LPCTSTR lpString);

/*----------------------------------------------------------------------------
Function Name	:USkinGetWindowSkinObjectRect
Description		:Get window skin object's rect property. 
ProtoType		:
	BOOL USkinGetWindowSkinObjectRect(  HWND hWnd    // Handle of window
		LPCTSTR lpszSkinObjectName    // Skin object name
		LPRECT lpRect    // 
	);
Parameters		:
	hWnd 
		[in] Handle of window 
	lpszSkinObjectName 
		[in] Skin object name 
	lpRect 
		[in] RECT value 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL __stdcall USkinGetWindowSkinObjectRect(HWND hWnd,LPCTSTR lpszSkinObjectName,LPRECT lpRect);

/*----------------------------------------------------------------------------
Function Name	:USkinGetWindowSkinObjectVisible
Description		:Get window skin object's visible property. 
ProtoType		:
	BOOL USkinGetWindowSkinObjectVisible(  HWND hWnd    // Handle of window
		LPCTSTR lpszSkinObjectName    // skin object name
		BOOL* lpbVisible    // 
	);
Parameters		:
	hWnd 
		[in] handle of window 
	lpszSkinObjectName 
		[in] skin object name 
	lpbVisible 
		[out] BOOL* vale to store result 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL _stdcall USkinSetWindowSkinObjectVisible(HWND hWnd,LPCTSTR lpszSkinObjectName,BOOL bVisible);

/*----------------------------------------------------------------------------
Function Name	:USkinSetWindowSkinObjectVisible
Description		:Set skin object's visible property that apply to the window. 
ProtoType		:
	BOOL USkinSetWindowSkinObjectVisible(  HWND hWnd    // Handle of window
		LPCTSTR lpszSkinObjectName    // SkinObject name
		BOOL bVisible    // 
	);
Parameters		:
	hUSkin 
		[in] handle of window 
	lpszSkinObjectName 
		[in] skinobject name 
	bVisible 
		[in] set skinobject visible 
Return values	:
	If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 
*/
USKIN_API BOOL _stdcall USkinGetWindowSkinObjectVisible(HWND hWnd,LPCTSTR lpszSkinObjectName,BOOL& bVisible);

//Error Support
enum EnumUSkinErrorCode
{
	ueFunctionNotSupport,
	ueFunctionError
};

/*----------------------------------------------------------------------------
Function Name	:USkinGetLastError
Description		:Get last error code. 
ProtoType		:
	BOOL USkinGetLastError(
	);
Parameters		:
	none
Return values	:
	Get the result code 
*/
USKIN_API LONG __stdcall USkinGetLastError();

/*-----------------------------------------------------------------------------
Message Name	:WM_USKINCOMMAND
Description		:this message will raised when click window caption button. 
ProtoType		:
	WM_USKINCOMMAND      // 
		WPARAMwParam    // 
		LPARAMlParam    // 

Parameters		:
	wParam 
		caption button command id 
	lParam 
		caption button name 
Return values	:
	failed return false,otherwise return true
*/
#ifndef WM_USKINCOMMAND
	#define WM_USKINCOMMAND	WM_USER+1001
#endif

/*-----------------------------------------------------------------------------
Message Name	:WM_USKINCHANGED
Description		:this message will send when change uskin file or apply color theme to uskin. 
ProtoType		:
	WM_USKINCHANGED      // 
		WPARAMwParam    // 
		LPARAMlParam    // 

Parameters		:
	wParam 
		0 
	lParam 
		0 
Return values	:
	failed return false,otherwise return true 
*/
#ifndef WM_USKINCHANGED
	#define WM_USKINCHANGED WM_USER+1005
#endif

#endif

⌨️ 快捷键说明

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