|
|
|
|
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.
Subject |
Author |
Date |
|
Offer Har
|
Mar 7, 2007 - 4:51 PM
|
Dear Support,
I have a grid derived class which i initialize to have one header row on the left side, and one at the top. I would like to access the top-left cell for writing something in it.
How do I do it?
Thanks, Ron.
|
|
Suhai Gyorgy
|
Mar 8, 2007 - 1:37 AM
|
Support’s answer to this one from a previous post: The grid control does not display cell objects in corners but you can repaint them if you need to display some information there. You should override the CExtGridBaseWnd::OnGbwEraseArea() virtual method like as follows: void C_YOUR_GridWnd::OnGbwEraseArea(CDC & dc, const RECT & rcArea, DWORD dwAreaFlags) const
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
COLORREF clrDebugFill = COLORREF( -1L );
switch( dwAreaFlags )
{
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_TOP: clrDebugFill = RGB( 255, 128, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_BOTTOM: clrDebugFill = RGB( 128, 255, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT: clrDebugFill = RGB( 128, 128, 255 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT: clrDebugFill = RGB( 128, 255, 255 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT|__EGBWA_OUTER_TOP: clrDebugFill = RGB( 255, 128, 255 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT|__EGBWA_OUTER_BOTTOM: clrDebugFill = RGB( 255, 255, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT|__EGBWA_OUTER_TOP: clrDebugFill = RGB( 255, 255, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT|__EGBWA_OUTER_BOTTOM: clrDebugFill = RGB( 128, 128, 128 ); break;
case __EGBWA_INNER_CELLS: clrDebugFill = RGB( 255, 255, 224 ); break;
}
if( clrDebugFill != COLORREF( -1L ) )
dc.FillSolidRect( &rcArea, clrDebugFill );
}
|
|