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

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

Syntax

void Font(
  [in] HDC            hdc,
  [in] const LOGFONTW *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 LOGFONTW*

Pointer to a LOGFONTW structure variable that contains attributes of the font. The LOGFONTW structure is the wide 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 LOGFONTW structure is a GDI structure. GDI+ uses only some of the attributes contained in this structure.

Requirements

   
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