次の方法で共有


CFontDialog::GetWeight

選択されているフォントの太さを取得するには、この関数を呼び出します。

int GetWeight( ) const;

戻り値

選択されているフォントの太さ。

解説

フォントの太さの詳細については、CFont::CreateFontを参照してください。

使用例

// 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);
}

必要条件

ヘッダー : afxdlgs.h

参照

関連項目

CFontDialog クラス

階層図

CFontDialog::GetCurrentFont

CFontDialog::IsBold