Font.Font(HDC, const LOGFONTA*) constructor

Applies to: desktop apps only

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

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

Parameters

  • hdc [in]
    Type: HDC

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

  • logfont [in]
    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.

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

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusheaders.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Font

Using Text and Fonts

Changes in the Programming Model

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012