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 Tech Support » Top-Left pixel not painted properly in cells 2.83 Collapse All
Subject Author Date
Offer Har Jun 5, 2008 - 12:29 PM

I have a tree-grid that I paint with these attributes:



  SiwModifyStyle(
        (__ESIS_STH_NONE|__ESIS_STV_ITEM)        // Item scroll window styles
        | __EGBS_SFB_FULL_ROWS                    // Selection/focus type - full row
        | __EGBS_SF_SELECT_OUTER_ROWS            // Cell selection when clicking row header
        | __EGBS_DYNAMIC_RESIZING                // Resize rows/columns on-the-fly
        | __EGBS_GRIDLINES                        // Draw grid lines
        | __EGBS_RESIZING_CELLS_OUTER,            // enable row/column resizing
        0, false);

    SiwModifyStyleEx(
        __EGBS_EX_CELL_TOOLTIPS_INNER
        | __EGBS_EX_CELL_EXPANDING_INNER
        | __EGWS_EX_PM_COLORS
        | __EGBS_EX_CORNER_AREAS_3D
        | __EGBS_EX_CORNER_AREAS_CURVE
        | __EGBS_EX_HVI_EVENT_CELLS,
        0, false);

    BseModifyStyleEx( __EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS);


And OnTreeGridQueryDrawOutline returns false, so there are no outlines.


However, the top-left corner of the cells is not painted properly, as you can see in this zoomed snapshot:



 

Technical Support Jun 19, 2008 - 5:42 AM

Thank you for reporting the problem. You can fix it in this way. In the CExtGridBaseWnd::OnGbwPaintCell method, update the following code block at the very end of the method:

if( bGridLinesHorz || bGridLinesVert )
{
            COLORREF clrFace = OnGbwQueryGridLinesColor();
            if( bGridLinesHorz )
            {
                        dc.FillSolidRect( rcCell.left - 1, rcCell.top - 1, rcCell.right - rcCell.left, 1, clrFace );
                        dc.FillSolidRect( rcCell.left - 1, rcCell.bottom - 1, rcCell.right - rcCell.left, 1, clrFace );
            } // if( bGridLinesHorz )
            if( bGridLinesVert )
            {
                        dc.FillSolidRect( rcCell.left - 1, rcCell.top, 1, rcCell.bottom - rcCell.top, clrFace );
                        dc.FillSolidRect( rcCell.right - 1, rcCell.top, 1, rcCell.bottom - rcCell.top, clrFace );
            } // if( bGridLinesVert )
} // if( bGridLinesHorz || bGridLinesVert )