Font::Font(HDC,constLOGFONTA*) method (gdiplusheaders.h)

Creates a Font::Font object directly from a Windows Graphics Device Interface (GDI) logical font. The GDI logical font is a LOGFONTA structure, which is the one-byte character version of a logical font. This constructor is provided for compatibility with GDI.

Syntax

void Font(
  [in] HDC            hdc,
  [in] const LOGFONTA *logfont
);

Parameters

[in] hdc

Type: HDC

Handle to a Windows device context. A handle is a number that Windows uses internally to reference an object.

[in] logfont

Type: const LOGFONTA*

Pointer to a LOGFONTA structure variable that contains attributes of the font. The LOGFONTA structure is the one-byte character version of the logical font.

Return value

None

Remarks

A device context is a structure that is maintained internally. It is associated with a particular device, such as a video monitor or a printer. There is usually one device context associated with each window displayed on a video monitor. A device context contains some graphics attributes used by GDI+.

A LOGFONTA structure is a GDI structure. GDI+ uses only some of the attributes contained in this structure.

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplusheaders.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Changes in the Programming Model

Font

Using Text and Fonts