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 » Vertically oriented text in grid headers Collapse All
Subject Author Date
Victor Tran Apr 13, 2011 - 8:14 AM

Hi


I’m using Prof-UIS, and I’d like to know if the CExtGridWnd control has built-in support for vertically oriented text (90º) in grid column headers and if yes, how we can use.


 


Thanks for your help,


 

Technical Support Apr 13, 2011 - 1:08 PM

Prof-UIS supports vertically oriented plain text and HTML painting and size measuring. It’s demonstrated in the RichContentFeatures sample application. But all the grid cell classes always use non-rotated text. If you need vertical text, then you should code your own grid cell class which implements the following virtual method:

    virtual void 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;

If you need features like best-fitting and print/previewing, then you also should implement the following virtual methods:
    virtual CSize OnMeasureTextSize(
        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 & rcCellText,
        DWORD dwAreaFlags
        ) const;
    virtual CSize MeasureCell(
        CExtGridWnd * pWndGrid, // can be NULL
        CDC & dcMeasure,
        LONG nVisibleColNo,
        LONG nVisibleRowNo,
        LONG nColNo,
        LONG nRowNo,
        INT nColType,
        INT nRowType,
        DWORD dwHelperPaintFlags
        ) const;