The CGXProgressCtrl class lets you display a progress bar in cells. It also lets you display text in the cell.
Style attributes which specify the appearance of the cell are:
Here is how you can apply the progress bar to cells:
SetStyleRange(CGXRange(4,3,10,5),
CGXStyle()
.SetControl(GX_IDS_CTRL_PROGRESS)
.SetValue(50L)
.SetUserAttribute(GX_IDS_UA_PROGRESS_MIN, _T("0"))
.SetUserAttribute(GX_IDS_UA_PROGRESS_MAX, _T("100"))
.SetUserAttribute(GX_IDS_UA_PROGRESS_CAPTIONMASK, _T("%ld %%")) // sprintf formatting for value
.SetTextColor(RGB(0, 0, 255)) // blue progress bar
.SetInterior(RGB(255, 255, 255)) // on white background
);
You can change the value for cells at run time by calling SetValueRange().
Note:
When you change the value for a progress control, the progress control will not let you store invalid values. When you try to set a value below the lower bound or above the upper bound, the value will be adjusted so that it fits the given range.
#include <gxall.h>
CGXGridCore::RegisterControl CGXStyle::SetControl CGXStyle