I Message
1. wm_ncactivate
When the customer zone is about to display active or inactive,Wm_ncactivateThe message is sent to the window. A window uses itsWindowprocFunction to obtain the message.
Lresult callback windowproc (
Hwnd, // handle to window
Uint umsg, // wm_ncactivate
Wparam, // new state (bool)
Lparam // not used
);
Parameters:
Wparam
Specifies the time when the title bar or icon displays the active or inactive status. If the title bar or icon is to be duplicatedWparamThe value isTrue. For inactive title bars or icons,WparamThe parameter isFalse.
Lparam
This parameter is not used
Return Value
When the ParameterWparamYesFalse, ApplicationProgramShould ReturnTrueTo indicate that the system should take the default processing. Or returnFalseTo prevent the title bar or icon from being activated. When the ParameterWparamYesTrueThe returned value is ignored.
2. Functions
1.Addfontresource
FunctionAddfontresourceAdd the font Resources in the specified file to the system font table. After that, the font can be used by all subsequent programs. Extended version:Addfontresourceex ();
Int addfontresource (
Lpctstr lpszfilename // font file name
);
Parameters
Lpszfilename
[In]The file name that contains the Font Resource.
2.Enumfontfamliliesex
FunctionEnumfontfamliliesexAll matches in enumeration systemLplogfontFont of the font features. FunctionEnumfontfamliliesexIt is enumerated Based on the font name, character set, or both.
Int enumfontfamiliesex (
HDC, // handle to DC
Lplogfont, // font information
Fontenumproc lpenumfontfamexproc, // callback function
Lparam, // additional data
DWORD dwflags // not used; must be 0
);
Parameters
HDC
[In]The handle pointing to the device environment.
Lplogfont
PointLogfontStructure pointer, which contains information about the font to be enumerated. This function checks the following members.
Member |
Description |
Lfcharset |
If it is setDefault_charsetThis function will enumerate all character sets. If it is set to a valid character set value, the function will only use a local font from the specified character muscles. |
Lffacename |
If it is set to null, the function will enumerate a font in each name. If it is set to a valid font name, the function will enumerate all fonts with the specified name. |
Lfpitchandfamily |
It must be zero. |
Lpenumfontfamexproc
[In]Pointer to the emblem function defined by the application.
Lparam
[In]Specifies the value defined by the application. This function will pass the value back to the Hui call function.
Dwflags
Not used, must be0.
Return Value
The Return Value refers to the final return value of the callback function.
3. FunctionEnumfontfamexprocIs a callback function defined by an application.EnumfontfamiliesexUsed. It is mainly used to process fonts. Each time a font is enumerated, it is called once.
Int callback enumfontfamexproc (
Enumlogfontex * lpelfe, // logical-font data
Newtextmetricex * lpntme, // physical-font data
DWORD fonttype, // type of font
Lparam // application-defined data
);
Parameters
Lpelfe
Point toEnumlogfontexStructure, which contains some information about the logical attributes of the font.
Lpntme
A structure containing the physical attributes of the font.
Fonttype
Specifies the font style ., It can be a combination of the following values.
Device_fonttype
Raster_fonttype
Truetype_fonttype
Lparam
[In]Specifies the value defined by the application.EnumfontfamiliesexPassed.
Return values
If you want to continue enumeration, the returned value must not be0To stop enumeration, you must return0.