CBitmapButton::AutoLoad

更新 : 2007 年 11 月

CBitmapButton クラスのオブジェクトとダイアログ ボックスのボタンとを関連付けて、名前によりビットマップを読み込み、ビットマップの大きさに合うようにボタンの大きさを調整します。

BOOL AutoLoad(
   UINT nID,
   CWnd* pParent 
);

パラメータ

  • nID
    ボタン コントロールの ID。

  • pParent
    ボタンを保有するオブジェクトへのポインタ。

戻り値

正常終了した場合は 0 以外を返します。それ以外の場合は 0 を返します。

解説

ダイアログ ボックスのオーナー描画ボタンをビットマップ ボタンとして初期化するには、AutoLoad 関数を使います。AutoLoad 関数の使い方については、CBitmapButton クラスの解説を参照してください。

使用例

CBitmapButton myButton;

// Initialize the owner-drawn button with the id IDC_MYBUTTON as a bitmap 
// button. This code is used in the OnInitDialog handler of my dialog.
myButton.AutoLoad(IDC_MYBUTTON, this);

必要条件

ヘッダー : afxext.h

参照

参照

CBitmapButton クラス

階層図

CBitmapButton::LoadBitmaps

CBitmapButton::SizeToContent

その他の技術情報

CBitmapButton のメンバ