IFont::put_Weight method

Sets the font's Weight property.

Syntax


HRESULT put_Weight(
  [in] SHORT weight
);

Parameters

weight [in]

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 codeDescription
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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IFont is defined as BEF6E002-A874-101A-8BBA-00AA00300CAB

See also

IFont
IFont::get_Weight

 

 

Show: