Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Creates a Font::Font object based on the Windows Graphics Device Interface (GDI) font object that is currently selected into a specified device context. This constructor is provided for compatibility with GDI.
void Font(
[in] HDC hdc
);
[in] hdc
Type: HDC
Handle to a Windows device context that has a font selected. A handle is a number that Windows uses internally to reference an object.
None
In most cases when you obtain a device context handle by calling the GetHDC method of a Graphics object, the device context will not have a font selected. If you pass such a handle to this constructor, the constructor will fail.
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+.
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 |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today