Copyright © 1998-2015 MultiMedia Soft

CellsManager.CellSetPictureFromHandle method

Previous pageReturn to chapter overview

Remarks

Changes, at run-time, one of the pictures associated to the cell.

For further details about cells management, see the How to manage cells section.

 

Syntax

Visual Basic

control.CellsManager.CellSetPictureFromHandle (index as enumPictures, hBitmap as long) as integer

 

Visual C++

BOOL control.CellsManager.CellSetPictureFromHandle (long index, OLE_HANDLE hBitmap);

 

Parameter

Description

 

 

index

Numerical value that represents the index of the picture property to change. Supported values are the following:

Mnemonic constant

Value

Meaning

PICTURE_NORMAL

0

Changes the CellsManager.PictureNormal property

PICTURE_DISABLED

5

Changes the CellsManager.PictureDisabled property

hBitmap

Handle of the new bitmap to use for the selected property.

 

 

Visual Basic example

 

MyButton.CellsManager.CellSetPictureFromHandle PICTURE_NORMAL, LoadResPicture(xxx, vbResBitmap).Handle

With this code the CellsManager.PictureNormal property will be changed using a bitmap identified by xxx (contained in a .RES file).

 

Visual C++ example

 

HBITMAP hBitmap = LoadBitmap (hInstance, id);

MyButton.GetCellsManager().CellSetPictureFromHandle (PICTURE_NORMAL, (OLE_HANDLE) hBitmap);

With this code the CellsManager.PictureNormal property will be changed using a bitmap identified by "id" contained inside the application resource file.

 

Return value

 

Value

Meaning

 

 

FALSE

The operation failed

TRUE

The operation was successful