IFont::put_Weight method (ocidl.h)

Sets the font's Weight property.

Syntax

HRESULT put_Weight(
  [in] SHORT weight
);

Parameters

[in] weight

The new Weight for the font. For a list of available font weights, see the description of the lfWeight member of the LOGFONT structure.

Return value

This method can return one of these values.

Return code Description
S_OK
The Weight property was changed successfully.
S_FALSE
This font does not support different weights. This value is not an error condition.

Remarks

This property may affect the Bold property as well. The Bold property is set to TRUE if the Weight property is greater than the average of FW_NORMAL (400) and FW_BOLD (700), that is 550.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See also

IFont

IFont::get_Weight