Disable painting checkboxes on MFC grid.
Hello,
I'm writing an app with MFC grid. I want to to have one column type of 'bool', but i don't want to paint check box into that cells. How I can make that happen? I've tried overriding 'Dapfor::GUI::CCustomDraw' class and 'DrawCell' function and changing default paintFilter for 'drawNothing', but this gave me only black cell with checkbox painted.
Here's sample of my code:
void CDapforCustomDrawLog::DrawCell(Dapfor::GUI::CGridCell& cell, const Dapfor::GUI::CPaintContext& paintContext, UINT paintFilter)
{
CFont font;
const Dapfor::GUI::CColumn* col = cell.GetColumn();
if( cell.GetColumn() && (cell.GetColumn()->GetFid() == CDapforRowObjectLog::eVisible) )
{
paintFilter = Dapfor::GUI::drawNothing;
}
Dapfor::GUI::CCustomDraw::DrawCell(cell, paintContext, paintFilter);
}
dapfor.jpg
Please sign in to leave a comment.
Comments
0 comments