PictureControl::SetBitMap

Description

Sets a picture from a HBITMAP to be displayed in the control

Syntax

BOOL SetBitMap( HBITMAP hBmp, BOOL bTakeOwnership = TRUE )

Parameters

hBmp
Handle to a Bitmap
bTakeOwnership
TRUE means that the control will destroy the object on destroy or on setting another picture

Return

return true when successful else false

Examples

EX1

#include <ocGDI.h>
#include <Control.h>

void PictureControl_SetBitMap()
{
        PictureControl pc;
        HDIB            hDIB = load_dib("C:\\20by20.bmp");
        HBITMAP         hBMP = DDB_from_DIB(hDIB);
        pc.SetBitMap(hDIB);
}

Remark

See Also

header to Include

Control.h