CGXBitmapButton::CGXBitmapButton
CGXBitmapButton(CGXGridCore* pGrid , UINT nIDBitmapResource, UINT nIDBitmapResourceSel = 0, UINT nIDBitmapResourceFocus = 0);
pGrid
Pointer to the parent grid.
nIDBitmapResource
Specifies the resource ID number of the bitmap resource for a bitmap button’s normal or “up” state. Required.
nIdBitmapResourceSel
Specifies the resource ID number of the bitmap resource for a bitmap button’s selected or “down” state. May be 0.
nIDBitmapResourceFocus
pecifies the resource ID number of the bitmap resource for a bitmap button’s focused state. May be 0.
Remarks
Constructs a bitmap control object.
You need to register this object in the grid with CGXGridCore::RegisterControl before you can use it in cells (see example).
Example
This example shows how you can register a bitmap control in the grid:
// Push Button
RegisterControl(GX_IDS_CTRL_PUSHBTN,
new CGXPushbutton(this));
// Your .RC - file:
STRINGTABLE DISCARDABLE
BEGIN
IDS_CTRL_BITMAP "Welcome bitmap"
END
// In OnInitialUpdate, you should pass a new instance of the object together with the string resource id to RegisterControl.
void CGridSampleView::OnInitialUpdate( )
{
...
RegisterControl(IDS_CTRL_BITMAP,
new CGXBitmapButton(this, IDB_WELCOME));
}