Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » A "CExtGridWnd::OnGridHookCellPaintBackground" function is not found Collapse All
Subject Author Date
tarou iiyama May 17, 2006 - 1:07 AM

Hello

> You can use your CExtGridWnd-derived class which implements the
>CExtGridWnd::OnGridHookCellPaintBackground() and/or
>CExtGridWnd::OnGridHookCellPaintForeground() methods. This will allow you to
>solve the task with implementing custom borders in one grid window’s method only.

A "CExtGridWnd::OnGridHookCellPaintBackground" function is not found.
Is it "virtual void OnPaintForeground" ?

tarou iiyama May 18, 2006 - 12:03 AM

Hello

It was settled.

Thank you


void MVD_InfoGrid::OnGbwWalkVisibleAreas(
CDC & dc,
bool bFocusedControl,
CExtGridHitTestInfo * pHT // = NULL
) const
{
CExtGridWnd::OnGbwWalkVisibleAreas ( dc , bFocusedControl , pHT );

FrameLine Draw
}

Technical Support May 18, 2006 - 3:49 AM

This approach can also be used to paint borders over already drawn grid contents. Please note the OnGbwWalkVisibleAreas() virtual method is used both for painting and hit-testing in the grid window. You should invoke the OnGbwQueryVisibleColumnRange() and OnGbwQueryVisibleRowRange() methods to get the visible cell ranges and overdraw the borders only in this range. You should use the GridCellRectsGet() method to get the rectangle of a particular cell.