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 24, 2009 - 4:56 PM
|
Dear Support, In silver theme, the button in cell, if disabled or enabled they look almost the same, as you can see in the picture below. If you will zoom the picture, you will spot the differences, but in normal viewing it’s very hard to see that the button is disabled. Can you please fix it for next version. Thanks, Ron. Some are disabled, and some are not... hard to tell which is which.
|
|
Technical Support
|
Mar 25, 2009 - 6:27 AM
|
Thank you for reporting this issue. To fix it, please update the source code for the following method. void CExtGridCell::OnPaintButton(
const RECT & rcButton,
INT nButtonType, // e_button_type_t
bool bPressed,
bool bHovered,
bool bFocused,
bool bEnabled,
const CExtGridWnd & wndGrid,
CDC & dc,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell,
const RECT & rcVisibleRange,
DWORD dwAreaFlags,
DWORD dwHelperPaintFlags
) const
{
ASSERT_VALID( this );
ASSERT_VALID( (&wndGrid) );
ASSERT( dc.GetSafeHdc() != NULL );
if( ! dc.RectVisible(&rcButton) )
return;
nVisibleColNo; nVisibleRowNo; nColNo; nRowNo; nColType; nRowType;
rcCellExtra; rcCell; rcVisibleRange; dwAreaFlags;
if( ! bEnabled )
bPressed = false;
if( (dwHelperPaintFlags&__EGCPF_SIMPLIFIED_RENDERING_TARGET) == 0 )
{
COLORREF clrFace = wndGrid.OnSiwGetSysColor( COLOR_3DFACE );
COLORREF clrLight = wndGrid.OnSiwGetSysColor( COLOR_3DHIGHLIGHT );
COLORREF clrShadow = CExtPaintManager::stat_HLS_Adjust( wndGrid.OnSiwGetSysColor( COLOR_3DSHADOW ) , 0.0, 0.35, 0.0 );
COLORREF clrWindow = wndGrid.OnSiwGetSysColor( COLOR_WINDOW );
COLORREF clrText = wndGrid.OnSiwGetSysColor( COLOR_BTNTEXT );
wndGrid.PmBridge_GetPM()->Grid_PaintButton(
dc, rcButton, nButtonType, bPressed, bHovered, bFocused, bEnabled,
clrFace, clrLight, clrShadow, clrWindow, clrText,
dwHelperPaintFlags, (CObject*) &wndGrid, 0L
);
return;
} // if( (dwHelperPaintFlags&__EGCPF_SIMPLIFIED_RENDERING_TARGET) == 0 )
if( (dwHelperPaintFlags&__EGCPF_NO_BUTTONS) != 0 )
return;
COLORREF clrOldBkColor = dc.GetBkColor();
COLORREF clrOldTextColor = dc.GetTextColor();
int nOldBkMode = dc.GetBkMode();
COLORREF clrFace = wndGrid.OnSiwGetSysColor( COLOR_3DFACE );
COLORREF clrLight = wndGrid.OnSiwGetSysColor( COLOR_3DHIGHLIGHT );
COLORREF clrShadow = wndGrid.OnSiwGetSysColor( COLOR_3DSHADOW );
COLORREF clrOuterLT = bPressed ? clrShadow : clrLight;
COLORREF clrOuterRB = bPressed ? clrLight : clrShadow;
CRect rc( rcButton );
CExtPaintManager::glyph_t * pGlyph = NULL;
dc.FillSolidRect( &rc, clrFace );
rc.DeflateRect( 2, 2 );
dc.Draw3dRect( &rcButton, clrOuterLT, clrOuterRB );
if( bPressed )
rc.OffsetRect( 0, 1 );
if( nButtonType == INT(__EBTT_DROPDOWN) )
{
if( (dwHelperPaintFlags&__EGCPF_NO_BUTTON_DROPDOWN_ARROW) == 0 )
pGlyph = CExtPaintManager::g_DockingCaptionGlyphs[ (INT) CExtPaintManager::__DCBT_ARROW_DOWN ];
}
else if( nButtonType == INT(__EBTT_ELLIPSIS) )
{
if( (dwHelperPaintFlags&__EGCPF_NO_BUTTON_ELLIPSIS_DOTS) == 0 )
pGlyph = CExtPaintManager::g_DockingCaptionGlyphs[ (INT) CExtPaintManager::__DCBT_ELLIPSIS ];
}
else if( nButtonType == INT(__EBTT_UPDOWN_UP) )
{
pGlyph = CExtPaintManager::g_DockingCaptionGlyphs[ (INT) CExtPaintManager::__DCBT_ARROW_SMALL_UP ];
}
else if( nButtonType == INT(__EBTT_UPDOWN_DOWN) )
{
pGlyph = CExtPaintManager::g_DockingCaptionGlyphs[ (INT) CExtPaintManager::__DCBT_ARROW_SMALL_DOWN ];
}
if( pGlyph != NULL )
{
COLORREF ColorValues[2] = { RGB(0,0,0), RGB(0,0,0), };
ColorValues[1] = bEnabled ? wndGrid.OnSiwGetSysColor( COLOR_BTNTEXT ) : clrLight;
if( ! bEnabled )
rc.OffsetRect( 1, 1 );
g_PaintManager->PaintGlyphCentered( dc, rc, *pGlyph, ColorValues );
if( ! bEnabled )
{
rc.OffsetRect( -1, -1 );
ColorValues[1] = clrShadow;
g_PaintManager->PaintGlyphCentered( dc, rc, *pGlyph, ColorValues );
} // if( ! bEnabled )
} // if( pGlyph != NULL )
dc.SetBkColor( clrOldBkColor );
dc.SetTextColor( clrOldTextColor );
dc.SetBkMode( nOldBkMode );
}
|
|