Condividi tramite


CFontDialog::GetWeight

Call this function to retrieve the weight of the selected font.

int GetWeight( ) const;

Return Value

The weight of the selected font.

Remarks

For more information on the weight of a font, see CFont::CreateFont.

Example

// Get the weight of the selected font, if any.
CFontDialog dlg;
if (dlg.DoModal() == IDOK)
{
   int weight = dlg.GetWeight();
   TRACE(_T("Weight of the selected font = %d\n"), weight);
}

Requirements

Header: afxdlgs.h

See Also

Reference

CFontDialog Class

Hierarchy Chart

CFontDialog::GetCurrentFont

CFontDialog::IsBold

Other Resources

CFontDialog Members