IFont::AddRefHfont

Notifies the font object that the previously realized font identified with hFont (obtained from IFont::get_hFont) should remain valid until IFont::ReleaseHfont is called or the font object itself is released completely.

HRESULT AddRefHfont(
  HFONT hfont  //Font handle returned from IFont::GetHfont
);
 

Parameters

hfont
[in] Font handle previously realized through IFont::GetHfont to be locked in the font object's cache.

Return Values

The method supports the standard return values E_UNEXPECTED and E_INVALIDARG, as well as the following:

S_OK
The font was successfully locked in the cache.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.

See Also

IFont::get hFont, IFont:ReleaseHfont