Share via


CButton::GetBitmap

Chiamare la funzione membro per ottenere un handle di una bitmap, precedentemente impostate con SetBitmap, associata a un pulsante.

HBITMAP GetBitmap( ) const;

Valore restituito

Handle a una bitmap.NULL se nessuna bitmap in precedenza è specificata.

Esempio

CButton myBitmapButton;

// Create a bitmap button.
myBitmapButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_BITMAP, 
   CRect(10,10,60,50), pParentWnd, 1);

// If no bitmap is defined for the button, define the bitmap to the
// system close bitmap.
if (myBitmapButton.GetBitmap() == NULL)
   myBitmapButton.SetBitmap(::LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CLOSE)));

Requisiti

Header: afxwin.h

Vedere anche

Riferimenti

Classe di CButton

Grafico della gerarchia

CButton::SetBitmap

CBitmapButton::LoadBitmaps

Bitmaps