次の方法で共有


CBitmapButton::SizeToContent

更新 : 2007 年 11 月

ビットマップの大きさに合わせてビットマップ ボタンのサイズを変更するときに、この関数を呼び出します。

void SizeToContent( );

使用例

CBitmapButton* pmyButton = new CBitmapButton();

// Create the bitmap button (must include the BS_OWNERDRAW style).
pmyButton->Create(NULL, WS_CHILD|WS_VISIBLE|BS_OWNERDRAW, 
   CRect(10,10,100,100), pParentWnd, 1);

// Load the bitmaps for this button.
pmyButton->LoadBitmaps(IDB_UP, IDB_DOWN, IDB_FOCUS, IDB_DISABLE); 

// Resize the button to be the size of the bitmaps.
pmyButton->SizeToContent();

必要条件

ヘッダー : afxext.h

参照

参照

CBitmapButton クラス

階層図

CBitmapButton::LoadBitmaps

CBitmapButton::AutoLoad

その他の技術情報

CBitmapButton のメンバ