Skinline program interface renovation tool

xiaoxiao2021-03-06  39

SkinLoad program interface skinning tool Author: Geng sea by

Download this article Example Project Update SkinLoad V0.3 This article is linked in VC knowledge library

Note: SkinLoad is a tool for program skin, and you can add beautiful skin through several simple function calls, including all system dialogs. You can customize your skin by SkinlineMaker skin editing tool.

The interface renderings are as follows:

How to implement a skin in the program: 1. Static link dynamic library requires three files: "SkinLoadLib.h", "SkinLoad.lib", "SkinLoad.dll"

1. Add "SkinLoadLib.h", "SkinLoad.lib" file to the project 2, in the App class, contain the header file:

#include "skinlinelib.h" 3, initialize dynamic libraries in the initInstance () function of the App class, loading skin files:

INITSKINLOAD (GetCurrentThreadID ());

Loadskin ("XP_NORMAL.SKIN"); / / can be placed anywhere, if in different files, to include path 4, unload dynamic libraries, release resources, release resources:

EXITSKINLOAD (); Description: This is convenient, the disadvantage is that the program is running must guarantee the SkinLoad.dll file, otherwise the program cannot run

Second, dynamic loading dynamic library

1. Load the dynamic library in the initInstance () function of the App class.

Define a variable saved dynamic library handle, which can be global, or a member variable of the APP class

Hinstance m_hdllskin;

m_hdllskin = loadingLibrary ("SkinLoad.dll"); 2. Call the initialization function and the function of loading skin files in the initInstance () function of the app class.

IF (M_HDLLSKIN! = NULL)

{

Typedef int (* INITSKIN) (DWORD DWTHREADID);

Typedef Bool (* Loadskin) (CHAR * CPATH);

INITSKIN PINITSKIN = (INITSKIN) GETPROCADDRESS (M_HDLSKIN, "INITSKINLOAD");

Loadskin ploadskin = (loadingskin) getProcaddress (M_HDLLSKIN, "LOADSKIN");

IF (Pinitskin! = null &&phappy "= null)

{

(* pinitskin) (GetCurrentThreadID ());

(* ploadskin) ("XP_NORMAL.SKIN");

}

} 3, unload dynamic libraries in ExitInstance () in the App

IF (M_HDLLSKIN! = NULL)

{

Typedef Bool (* EXITSKIN) ();

EXITSKIN pexitskin = (exitskin) getProcadDress (M_HDLLSKIN, "EXITSKIN");

IF (Pexitskin! = NULL)

{

(* pexitskin) ();

}

Freelibrary (m_hdllskin);

} Description: This is more troublesome like this. To manually load the dynamic library, you have to get the function pointer reuse. But this can be judged in the program whether the desired SkinLoad.dll dynamic library exists, not that the program cannot run the skin making tool SkinLoadMaker instructions:

The program comes with a skin file and makes its own skin file, as long as the corresponding place is modified. If you don't make any modifications, you can generate a skin file directly, and the same as my XP_NORMAL.SKIN. When running SkinLoadMaker, a TEMP folder will be generated, and the picture is placed is the picture used, and everyone can change it according to the format.

Description:

Title Bar Background Diagram: Two, one is normal, one is the program lost focus, press the order in one picture

Title Bar Button: Includes minimization, maximizing, recovery, and closing. Each picture contains four small images, named, Mouse, Mouse Down, Disabled

Button bitmap: Can not be used. It is also four states to put them in a picture. Normal, Mouse ON, Mouse Down, Disabled, respectively

(Full text)

转载请注明原文地址:https://www.9cbs.com/read-51462.html

New Post(0)