How can I display bitmaps?
CGXStatic supports displaying bitmaps in cells. Bitmaps can be expressed through the value string in a cell. The alignment of bitmaps can be specified with SetHorizontalAlignment and SetVerticalAlignment.
Examples for using bitmaps are:
SetStyleRange(CGXRange(18, 1),
CGXStyle()
.SetControl(GX_IDS_CTRL_STATIC)
.SetValue("#BMP(121)")
.SetHorizontalAlignment(DT_CENTER)
.SetVerticalAlignment(DT_VCENTER)
);
whereas 127 and 121 (the value in parenthesis) is the resource id of the bitmap to be displayed in the cell.
You can assign bitmaps to cells depending of the context of the grid when you override GetStyleRowCol and call style.SetValue(...);
If you don't like using a numeric resource id, you can also use names.
For example, if a bitmap is declared in your resource file as
YES BITMAP DISCARDABLE "RES\\YES12.BMP"
(and YES is not a integer id defined in resource.h), you can assign this bitmap to cells with
SetStyleRange(CGXRange(18, 1),
CGXStyle()
.SetControl(GX_IDS_CTRL_STATIC)
.SetValue("#BMP(\"YES\")")
.SetHorizontalAlignment(DT_CENTER)
.SetVerticalAlignment(DT_VCENTER)
);