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 » CExtTabPageContainerWnd Collapse All
Subject Author Date
Evgueni Kolossov Jul 28, 2011 - 1:51 AM

Is there the way to change the size of tabs in CExtTabPageContainerWnd - I want to make them bigger, for example?

Technical Support Jul 28, 2011 - 4:26 AM

You should create a CExtTabPageContainerWnd-derived class which uses a custom tab control for re-measuring tab item sizes:

class CYourTabWnd : public CExtTWPC < CExtTabWnd >
{
public:
    virtual void OnTabWndUpdateItemMeasure(
        TAB_ITEM_INFO * pTii,
        CDC & dcMeasure,
        CSize & sizePreCalc
        )
    {
        CExtTWPC < CExtTabWnd > :: OnTabWndUpdateItemMeasure( pTii, dcMeasure, sizePreCalc );
        sizePreCalc.cx += 10; // increase width of tab items to 10 pixels
    }
};

class CYourTabPageContainerWnd : public CExtTabPageContainerWnd
{
public:
    virtual CExtTabWnd* OnTabWndGetTabImpl()
    {
        return new CYourTabWnd;
    }
};

Evgueni Kolossov Jul 28, 2011 - 7:36 AM

Not working at al - Throwing an exceptions all the time

Evgueni Kolossov Jul 28, 2011 - 8:01 AM

My fault - need to use


CExtTabOneNoteWnd
instead of CExtTabWnd in my case and it works.

Thank you very much