I would like to have my CExtGridWnd derived class basically appear completely transparent. The text in the cells is this only thing I want to show up. I want the backcolor of all the cells AND also the non-cell region of the grid (any space below the last row down to the bottom border of the grid) to match the coloring of the current theme. This particular grid resides on a CFormView.

Is this possible?

If so, I would also like to make sure any dynamic change of themes would also change the grid appearance accordingly.

Thank you. I was able to get the background to look transparent by putting code in the CExtGridBaseWnd::OnGbwEraseArea() virtual method. However, I do have one issue remaining: I have one column that is input capable ( a CExtGridCellBool cell that is just a checkbox ). When I check/uncheck that column, the ’selected’ state of the cell shows as a blue background. I would like this selected state to also appear as transparent.

I have the following line of code in CExtGridBaseWnd::OnGridCellInputComplete() :

The SimpleGrids sample allows all the demo grids in it to use a dialog-like background. Such background is painted in the CDemoGrid::OnSiwPaintBackground() virtual method, where a g_PaintManager->PaintDockerBkgnd() is used. You can also turn off the grid lines by excluding (not-applying) the __EGBS_GRIDLINES style. You can also override the CExtGridBaseWnd::OnGbwEraseArea() virtual method in order to customize the background of header cell areas and data cell area independently from each other. See the source code of the CExtGridBaseWnd::OnGbwEraseArea() virtual method for details: you can uncomment debug/test code at the beginning of this method to see how it works.

Thank you. I was able to get the background to look transparent by putting code in the CExtGridBaseWnd::OnGbwEraseArea() virtual method. However, I do have one issue remaining: I have one column that is input capable ( a CExtGridCellBool cell that is just a checkbox ). When I check/uncheck that column, the ’selected’ state of the cell shows as a blue background. I would like this selected state to also appear as transparent.

I have the following line of code in CExtGridBaseWnd::OnGridCellInputComplete() :

Please implement the CExtGridBaseWnd::SelectionGetForCellPainting() virtual method in your CExtGridWnd-derived class. Your method should return false for thegrid cells which should look like un-selected regardless of their real selected state. It should invoke the parent class method and return a value from it for all the other grid cells.