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

📄 skinmagiclib.h

📁 强大的串口编程和十分强大的格式转换功能
💻 H
📖 第 1 页 / 共 2 页
字号:
//	 Use this function to skin your window scrollbar
//
int  __stdcall DisableWindowScrollbarSkin( HWND hWnd );

///////////////////////////////////////////////////////////////////////////
//Function: TrackSkinPopupMenu( HMENU hMenu,int x, int y, HWND hWnd )
//			The TrackSkinPopupMenu function displays a shortcut menu at the 
//			specified location and tracks the selection of items on the menu.
//			The shortcut menu can appear anywhere on the screen.
//			
//Parameters
//		hMenu 
//			[in] Handle to the shortcut menu to be displayed. 
//				 The handle can be obtained by calling CreatePopupMenu
//				 to create a new shortcut menu, or by calling GetSubMenu
//				 to retrieve a handle to a submenu associated with an 
//				 existing menu item. 
//uFlags 
//			[in] Use zero of more of these flags to specify function options. 
//			Use one of the following flags to specify how the function positions
//			the shortcut menu horizontally. 
//			------------------------------------------------------------------------------
//			TPM_CENTERALIGN		If this flag is set, the function centers the shortcut
//								menu horizontally relative to the coordinate specified
//								by the x parameter. 
//			TPM_LEFTALIGN		If this flag is set, the function positions the shortcut
//								menu so that its left side is aligned with the coordinate
//								specified by the x parameter. 
//			TPM_RIGHTALIGN		Positions the shortcut menu so that its right side is 
//								aligned with the coordinate specified by the x parameter. 
//			------------------------------------------------------------------------------
//			Use one of the following flags to specify how the function positions the shortcut
//			menu vertically. 
//			TPM_BOTTOMALIGN		If this flag is set, the function positions the shortcut 
//								menu so that its bottom side is aligned with the coordinate 
//								specified by the y parameter. 
//			TPM_TOPALIGN		If this flag is set, the function positions the shortcut
//								menu so that its top side is aligned with the coordinate 
//								specified by the y parameter. 
//			TPM_VCENTERALIGN	If this flag is set, the function centers the shortcut menu 
//								vertically relative to the coordinate specified by the y parameter. 
//
//		x 
//			[in] Specifies the horizontal location of the shortcut menu, 
//				 in screen coordinates. 
//		y 
//			[in] Specifies the vertical location of the shortcut menu, 
//				 in screen coordinates. 
//		hWnd 
//			[in] Handle to the window that owns the shortcut menu. 
//				 This window receives all messages from the menu. 
//				 The window does not receive a WM_COMMAND message from the
//				 menu until the function returns. 
BOOL  __stdcall TrackSkinPopupMenu(  HMENU hMenu, UINT uFlags, int x, int y, HWND hWnd );


int __stdcall EnableCaptionButtons(HWND hWnd , char* lpName , BOOL bEnable );

//for custom control support
#define WM_SKINDATACHANGED     WM_USER + 1
typedef HANDLE HSKIN;          // handle to a skin data object


int __stdcall RegisterSkinWindow( HWND hWnd , UINT uNotifyMsg );
int __stdcall UnregisterSkinWindow( HWND hWnd );  

HSKIN __stdcall OpenSkinData( char* pszSkinObjectName );
void  __stdcall CloseSkinData( HSKIN hSkin );

//stocked property for every custom control
int __stdcall GetSkinControlRect( HSKIN hSkin , RECT* pRect, BOOL* pAutoPlace );
int __stdcall GetSkinControlID( HSKIN hSkin , DWORD* dwID );
int __stdcall GetSkinControlFont( HSKIN hSkin , HFONT* phFont , COLORREF* pColor );
int __stdcall GetSkinControlColor( HSKIN hSkin , COLORREF* pColor );
int __stdcall GetSkinControlBkColor( HSKIN hSkin , COLORREF* pColor );
int __stdcall GetSkinTransparentColor( COLORREF* pColor , BOOL* pBool );

//user customed property                     
int __stdcall GetSkinFont( HSKIN hSkin,char* pszName , LOGFONT* pLogFont , COLORREF* pColor );
int __stdcall GetSkinColor( HSKIN hSkin , char* pszName, COLORREF* pColor );
int __stdcall GetSkinBool( HSKIN hSkin ,  char* pszName, bool* pbVal );
int __stdcall GetSkinInt( HSKIN hSkin ,  char* pszName, int* piVal );
int __stdcall GetSkinDWORD( HSKIN hSkin ,  char* pszName, DWORD* pdwVal );
int __stdcall GetSkinEnum( HSKIN hSkin ,  char* pszName, DWORD* pdwVal );
int __stdcall GetSkinString( HSKIN hSkin, char* pszName , char* pszBuff , unsigned long* pMaxBuffChars );
int  __stdcall DrawSkinImageRect( HSKIN hSkin,
								   char* pszName,
								   HDC hdc,
								   RECT* pRect
								   );

int  __stdcall DrawSkinImageSection( HSKIN hSkin, 
									   char* pszName,
									   HDC hdc,
									   RECT* pRect );

int  __stdcall DrawSkinImageSectionFrame( HSKIN hSkin, 
									   char* pszName,
									   HDC hdc,
									   RECT* pRect );

int __stdcall GetSkinImageSectionMargins( HSKIN hSkin, char* pszName , const RECT* pRect , const RECT* pMargins );   

int __stdcall CreateSkinImageRectRegion( HSKIN hSkin,
										char* pszName,
										RECT* pRect , 
										HRGN* pRegion);

int __stdcall CreateSkinImageSectionRegion( HSKIN hSkin,
											char* pszName,
											RECT* pRect,
											HRGN* pRegion );

                       
int __stdcall DrawSkinTextEffect( HSKIN hSkin, 
                            char* pszName,
							HDC   hdc,
                            const RECT* pRect,
							char* lpText,
							UINT  uLen,
                            UINT  uFlag );  

///////////////////////////////////////////////////////////////////////////////////////////////
//CreateImageList
//
//The CreateImageList create a new image list from skin file. 
//
//   Parameters:
//       lpImagelistObjectName [in] The skinImageList object name.
//   Return Values
//       Returns the handle to the image list if successful, or NULL otherwise
///////////////////////////////////////////////////////////////////////////////////////////////
HIMAGELIST __stdcall CreateImageList( char* pszImageListObjectName );


struct MENUIMAGEINFO
{
	UINT itemID;
	int  iImage;
};


//////////////////////////////////////////////////////////////////////////////////////////////////
//Function: SetWindowMainMenuImage
//			The SetWindowMainMenuImage function set windows main menu item's bitmap.
//			
//Parameters: 
//	hWnd
//		[in] Handle to the window own the menu..
//	pMenuImage
//		[in] Pointer of an array of MENUIMAGEINFO struct .
//	nCount
//		[in] length of array pMenuImage.
//	hImageList
//		[in] imagelist used by the main menu to display normal item images. 
//	hHotImageList
//		[in] imagelist used by the main menu to display hot item images. 
//	hDisabledImagelist
//		[in] imagelist used by the main menu to display disabled item images.    
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
///////////////////////////////////////////////////////////////////////////////////////////
int __stdcall SetWindowMainMenuImage( HWND hWnd ,
									  MENUIMAGEINFO* pMenuImage, 
									  UINT nCount , 
									  HIMAGELIST hImageList , 
									  HIMAGELIST hHotImageList,
									  HIMAGELIST hDisabledImagelist );



/////////////////////////////////////////////////////////////////////////////////////////////
//Function: TrackSkinPopupMenuEx
//			The TrackSkinPopupMenuEx function displays a shortcut menu at the 
//			specified location and tracks the selection of items on the menu.
//			The shortcut menu can appear anywhere on the screen.
//			
//Parameters
//		hMenu 
//			[in] Handle to the shortcut menu to be displayed. 
//				 The handle can be obtained by calling CreatePopupMenu
//				 to create a new shortcut menu, or by calling GetSubMenu
//				 to retrieve a handle to a submenu associated with an 
//				 existing menu item. 
//		lpSkinPopupMenuName
//			[in] The SkinPopupMenu object name. If lpSkinPopupMenuName is NULL SkinMagic 
//			use default popupmenu skindata.
//		uFlags 
//			[in] Use zero of more of these flags to specify function options. 
//			Use one of the following flags to specify how the function positions
//			the shortcut menu horizontally. 
//			------------------------------------------------------------------------------
//			TPM_CENTERALIGN		If this flag is set, the function centers the shortcut
//								menu horizontally relative to the coordinate specified
//								by the x parameter. 
//			TPM_LEFTALIGN		If this flag is set, the function positions the shortcut
//								menu so that its left side is aligned with the coordinate
//								specified by the x parameter. 
//			TPM_RIGHTALIGN		Positions the shortcut menu so that its right side is 
//								aligned with the coordinate specified by the x parameter. 
//			------------------------------------------------------------------------------
//			Use one of the following flags to specify how the function positions the shortcut
//			menu vertically. 
//			TPM_BOTTOMALIGN		If this flag is set, the function positions the shortcut 
//								menu so that its bottom side is aligned with the coordinate 
//								specified by the y parameter. 
//			TPM_TOPALIGN		If this flag is set, the function positions the shortcut
//								menu so that its top side is aligned with the coordinate 
//								specified by the y parameter. 
//			TPM_VCENTERALIGN	If this flag is set, the function centers the shortcut menu 
//								vertically relative to the coordinate specified by the y parameter. 
//
//		x 
//			[in] Specifies the horizontal location of the shortcut menu, 
//				 in screen coordinates. 
//		y 
//			[in] Specifies the vertical location of the shortcut menu, 
//				 in screen coordinates. 
//		hWnd 
//			[in] Handle to the window that owns the shortcut menu. 
//				 This window receives all messages from the menu. 
//				 The window does not receive a WM_COMMAND message from the
//				 menu until the function returns. 
//		pMenuImage
//			[in] Pointer of an array of MENUIMAGEINFO struct .
//		nCount
//			[in] length of array pMenuImage.
//		hImageList
//			[in] imagelist used by the main menu to display normal item images. 
//		hHotImageList
//			[in] imagelist used by the main menu to display hot item images. 
//		hDisabledImagelist
//			[in] imagelist used by the main menu to display disabled item images.  
///////////////////////////////////////////////////////////////////////////////////////////
BOOL  __stdcall TrackSkinPopupMenuEx(  HMENU hMenu,
									   char* lpSkinName,
									   UINT uFlags, 
									   int x, 
									   int y, 
									   HWND hWnd ,
									   MENUIMAGEINFO* pMenuImage, 
									   UINT nCount , 
									   HIMAGELIST hImageList , 
									   HIMAGELIST hHotImageList,
									   HIMAGELIST hDisabledImagelist );                     

int __stdcall RedrawCaptionStatic( HWND hWnd , char* lpName );

#pragma pack(pop)
#endif

⌨️ 快捷键说明

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