Thank you for reporting this issue. We fixed it in the following method:
void CExtGridCellPictureBase::OnPaintText(
const RECT & rcCellText,
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( &rcCellText ) )
return;
wndGrid; nVisibleColNo; nVisibleRowNo; nColNo; nRowNo; nColType; nRowType; rcCellExtra; rcCell; rcVisibleRange; dwAreaFlags; dwHelperPaintFlags;
if( IsInvisible() || IsUndefined() || IsEmpty() )
return;
const CExtBitmap * pBmpBuffer = BitmapGetBuffer();
if( pBmpBuffer == NULL || pBmpBuffer->IsEmpty() )
return;
if( ( dwHelperPaintFlags & __EGCPF_SIMPLIFIED_RENDERING_TARGET ) != 0 )
{
CRect rcX( rcCellExtra );
CExtMemoryDC dcX( &dc, &rcX );
OnPaintText( rcCellText, wndGrid, dcX, nVisibleColNo, nVisibleRowNo, nColNo, nRowNo, nColType, nRowType, rcCellExtra, rcCell, rcVisibleRange, dwAreaFlags, dwHelperPaintFlags&(~__EGCPF_SIMPLIFIED_RENDERING_TARGET) );
return;
}
bool bSmootherAsPossible = true;
if( m_eImageMode == eStretch )
{
CRect rcStretch = rcCellText;
rcStretch.InflateRect( 2, 0 );
pBmpBuffer->AlphaBlendSkinParts( dc.GetSafeHdc(), rcStretch, CRect(0,0,0,0), CExtBitmap::__EDM_STRETCH, true, bSmootherAsPossible );
}
else if( m_eImageMode == eTile )
pBmpBuffer->AlphaBlendSkinParts( dc.GetSafeHdc(), rcCellText, CRect(0,0,0,0), CExtBitmap::__EDM_TILE, true, bSmootherAsPossible );
else if( m_eImageMode == eAlign )
{
CSize szSize = pBmpBuffer->GetSize();
CRect rcDst( rcCellText.left, rcCellText.top, rcCellText.left + szSize.cx, rcCellText.top + szSize.cy );
DWORD dwCellStyle = GetStyle();
switch( (dwCellStyle&__EGCS_TA_HORZ_MASK) )
{
case __EGCS_TA_HORZ_BY_TYPE:
case __EGCS_TA_HORZ_LEFT:
break;
case __EGCS_TA_HORZ_RIGHT:
rcDst.OffsetRect( rcCellText.right - rcDst.right, 0 );
break;
case __EGCS_TA_HORZ_CENTER:
rcDst.OffsetRect( ( (rcCellText.right - rcCellText.left) - (rcDst.right - rcDst.left) ) / 2, 0 );
break;
#ifdef _DEBUG
default:
ASSERT( FALSE );
break;
#endif // _DEBUG
}
switch( (dwCellStyle&__EGCS_TA_VERT_MASK) )
{
case __EGCS_TA_VERT_BY_TYPE:
case __EGCS_TA_VERT_TOP:
break;
case __EGCS_TA_VERT_BOTTOM:
rcDst.OffsetRect( 0, rcCellText.bottom - rcDst.bottom );
break;
case __EGCS_TA_VERT_MIDDLE:
rcDst.OffsetRect( 0, ( (rcCellText.bottom - rcCellText.top) - (rcDst.bottom - rcDst.top) ) / 2 );
break;
#ifdef _DEBUG
default:
ASSERT( FALSE );
break;
#endif // _DEBUG
}
CRect rcSrc( 0, 0, szSize.cx, szSize.cy );
rcDst.top = max( rcDst.top, rcCellText.top );
rcDst.left = max( rcDst.left, rcCellText.left );
rcDst.bottom = min( rcDst.bottom, rcCellText.bottom );
rcDst.right = min( rcDst.right, rcCellText.right );
if( ::RectVisible( dc.GetSafeHdc(), &rcDst ) )
{
INT nOldStretchBltMode = bSmootherAsPossible ? ( ::GetStretchBltMode( dc.m_hDC ) ) : ( COLORONCOLOR ) ;
if( bSmootherAsPossible )
::SetStretchBltMode( dc.m_hDC, ( g_PaintManager.m_bIsWinNT ) ? HALFTONE : COLORONCOLOR );
pBmpBuffer->AlphaBlend( dc.m_hDC, rcDst, rcSrc );
if( bSmootherAsPossible )
::SetStretchBltMode( dc.m_hDC, nOldStretchBltMode );
}
}
}