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

📄 skinmagiclib.h

📁 手书认证。 这是一个实现签名认证系统
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************

// This is a part of the SkinMagic SDK library.
// Copyright (C) 2003-2002 Appspeed Inc.
// All rights reserved.
//
// This source code is only intended as a supplement to the
// SkinMagic SDK Reference and related electronic documentation 
// provided with the library.
// See these sources for detailed information regarding the
// SkinMagic SDK product.

// SkinMagicLib SDK is a library designed for C/C++ programmer, 
// you can add the most popular function of changing skin to your
// application with the API supplied by this library. SkinMagic 
// is picture-based skin system, you can power your application
// with skin-changeable with simple call of several functions. 
// And with the skin editor of SkinMagicBuilder, you can customize
// your own skin.

*****************************************************************************/
#ifndef _SKINMAGICLIB_H__
#define _SKINMAGICLIB_H__

#include <windows.h>
#include <commctrl.h>

//Skinmagic error code
#define   SMEC_OK                      0
#define   SMEC_REGISTERWINDOW	       1    //fail to register windows class
#define   SMEC_MESSAGEHOOK             2    //fail to set message hook    
#define   SMEC_KEYHOOK				   3	//fail to set keyboard hook  
#define   SMEC_FILENOTFOUND            4    //not find the file
#define   SMEC_DECOMPRESSERROR         5    //fail to decompress skin file 
#define   SMEC_HEADERERROR             6    //skin file header error
#define   SMEC_SKINVERSIONERROR        7    //skin file version not match 
#define   SMEC_OBJECTNOTFOUND          8    //obect not found
#define   SMEC_OBJECTTYPEUNMATCH       9    //Object type not match
#define   SMEC_IMAGESIZEERROR          10   //Image size error
#define   SMEC_CREATEIMAGELISTFAIL     11   //fail to create image list object 
#define   SMEC_NOTIMPLEMENT            12   //The function not implement
#define   SMEC_PARAMETERERROR          13   //the function parameter error 
#define   SMEC_INITSCROLLBARFAIL       14   //fail to skin scrollbar
#define   SMEC_LOADRESOURCEFAIL        15   //fail to load the resource
#define   SMEC_FINDRESOURCEFAIL        16   //fail to find the resource
#define   SMEC_WINDOWSXPNOTCOMPATIBLE  17   //not compatible with Windows XP
#define   SMEC_OUTOFMEMORY             18   //Out of memory
#define   SMEC_LIBARAYNOTINITIALIZED   19   //Library not initialized

#pragma pack(push, 8)
///////////////////////////////////////////////////////////////////////////
//Function: InitSkinMagicLib(HINSTANCE hInstance, LPCTSTR szApplication , 
//					  LPCTSTR szReserved1,
//					  LPCTSTR szReserved2
//			
//Parameters: 
//		hInstance 
//			[in] Handle of application instance.
//		szApplication
//			[in] Application defined in skin file. If you set this parameter the 
//			library can only load the skin file which application object named
//			match szApplication.
//		szReserved1
//			[in] Reserved.
//		szReserved2
//			[in] Reserved.
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 InitSkinMagicLib function should be the first API called in SkinMagicLib SDK,
//	 followed by other APIs. 
//	 For multithreaded applications, you must call InitSkinMagicLib in every thread. 
//   
int  __stdcall InitSkinMagicLib( HINSTANCE hInstance, 
								 LPCTSTR lpApplication , 
								 LPCTSTR lpReserved1,
								 LPCTSTR lpReserved2 );

///////////////////////////////////////////////////////////////////////////
//Function: LoadSkinFile( LPCTSTR SkinFile )
//			Load skin from file.
//Parameters: 
//		SkinFile 
//			[in] Specifies the skin file name. 
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 ExitSkinMagicLib function should be the last API called in SkinMagicLib SDK.
//	 For multithreaded applications, you must call InitSkinMagicLib in every thread. 
void  __stdcall ExitSkinMagicLib();

///////////////////////////////////////////////////////////////////////////
//Function: LoadSkinFile( LPCTSTR SkinFile )
//			Load skin from file.
//Parameters: 
//		SkinFile 
//			[in] Specifies the skin file name. 
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//		Load skin from file.	
int  __stdcall LoadSkinFile( LPCTSTR lpSkinFile );

///////////////////////////////////////////////////////////////////////////
//Function: LoadSkinFromResource(HMODULE hModule, LPCTSTR lpSkinName ,LPCTSTR lpType)
//			Use this function to load skin from resource.
//Parameters: 
//		hModule 
//			[in] Handle to the module whose executable file contains the resource. 
//			A value of NULL specifies the module handle associated with the image 
//			file that the operating system used to create the current process. 
//		lpSkinName 
//			[in] Specifies the name of the skin resource. 
//		lpType 
//			[in] Specifies the resource type. 

//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//		The application can use skin defined in resource.
int  __stdcall LoadSkinFromResource(HMODULE hModule, LPCTSTR lpSkinName ,LPCTSTR lpType);

///////////////////////////////////////////////////////////////////////////
//Function: SetWindowSkin( HWND hWnd , LPCTSTR SkinName )
//			Use SetWindowSkin to skin the standard windows - with rectangular
//          opaque client area and region-based non-client area, menu bar, 
//          system/maximize/minimize/close buttons, caption and sizing edges
//          and corners. 
//			
//Parameters: 
//   hWnd
//		[in]Handle to the window to be remove skin.     
//   SkinName
//		[in]Specifies the name of FrameWnd object which defined in skin file. 
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//			Use SetWindowSkin to skin the standard windows - with rectangular
//          opaque client area and region-based non-client area, menu bar, 
//          system/maximize/minimize/close buttons, caption and sizing edges
//          and corners.
int  __stdcall SetWindowSkin( HWND hWnd , LPCTSTR lpSkinName );


///////////////////////////////////////////////////////////////////////////
//Function: SetShapeWindowSkin( HWND hWnd , LPCTSTR SkinName )
//			Use SetShapeWindowSkin to skin application-specific windows 
//			without non-client area and menu bar. These windows can have
//			absolutely any shape or even be translucent. 
//			
//Parameters: 
//   hWnd
//		[in]Handle to the window to be remove skin.     
//   SkinName
//		[in]Specifies the name of ShapeWnd object which defined in skin file. 
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 Use SetShapeWindowSkin to skin application-specific windows 
//	 without non-client area and menu bar. These windows can have
//	 absolutely any shape or even be translucent.
//
int  __stdcall SetShapeWindowSkin( HWND hWnd , LPCTSTR SkinName );


///////////////////////////////////////////////////////////////////////////
//Function: RemoveWindowSkin( HWND hWnd )
//			set skin of new create dialog
//			
//Parameters: 
//   hWnd
//		[in]Handle to the window to be remove skin.      
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 Use this function to remove window skin.
//
int  __stdcall RemoveWindowSkin( HWND hWnd );


///////////////////////////////////////////////////////////////////////////
//Function: SetDialogSkin( LPCTSTR szSkinName )
//			set skin of new create dialog
//			
//Parameters: 
//   szSkinName
//      [in]Specifies the name of FrameWnd object which defined in skin file.      
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 Use this function to set dialog skin. dialog will auto be skinned
//   after this function called.
//
int  __stdcall SetDialogSkin( LPCTSTR szSkinName );

///////////////////////////////////////////////////////////////////////////
//Function: SetSingleDialogSkin( HWND hWnd ,LPCTSTR szSkinName )
//			Set the skin of an dialog
//			
//Parameters: 
//   hWnd
//		[in]Handle to the dialog to be set skin. 
//   szSkinName
//      [in]Specifies the skin nanem.      
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 Use this function to set single dialog skin.
//
int  __stdcall SetSingleDialogSkin( HWND hWnd , LPCTSTR szSkinName );

///////////////////////////////////////////////////////////////////////////
//Function: RemoveDialogSkin()
//			This function will stop auto skin dialog. 
//			the function will not remove the dialog's
//          skin which already set. The new create dialog will have no skin.
//			
//Parameters: 
//			none.
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 Use this function to stop auto skin dialog.
//
int  __stdcall RemoveDialogSkin();


///////////////////////////////////////////////////////////////////////////
//Function: EnableWindowScrollbarSkin( HWND hWnd ,int fnBar )
//			Initialize the skin scrollbars for a window
//			
//Parameters: 
//   hWnd
//		[in]Handle to the window to be set skin scrollbar. 
//   fnBar
//      [in]Specifies the type of scroll bar for which to skin. 
//		This parameter can be one of the following values       
//		SB_HORZ for the window's standard horizontal scroll bar.  
//		SB_VERT for the window's standard  scroll bar.  
//		SB_BOTH for both horizontal and vertical scroll bar.   
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 Use this function to skin your window scrollbar
//
int  __stdcall EnableWindowScrollbarSkin( HWND hWnd ,int fnBar );


///////////////////////////////////////////////////////////////////////////
//Function: DisableWindowScrollbarSkin( HWND hWnd )
//			disable the skin scrollbars for a window
//			
//Parameters: 
//   hWnd
//		[in]Handle to the window to be disable skin scrollbar. 
//
//Return Values:
//   If the function success, the return value is nonzero
//   If the function fail, the return value is zero
//Remarks:
//	 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 

⌨️ 快捷键说明

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