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 » CExtTabMdiWnd question Collapse All
Subject Author Date
Offer Har Jun 15, 2007 - 7:40 PM

Dear Support,

I am using the CExtTabMdiWnd, and I am facing a problem:
The names of my views are long, and there’s no problem with this, because it is displayed in the window’s title line, which is big. But when there are several open views, the tab control gets cluttered, because it displayed the names of all views in the same line (the tab line).

I guess that CExtTabMdiWnd takes the name it displays using GetWindowText, but maybe you can add a virtual function that will be called when a child-frame’s name is required, and let me ask this child-frame for a shorter name. something like this:

virtual CString GetFrameTitle(CWnd* pFrame);

If this function is not derived, or return and empty string, use the default GetWindowText.

What do you think?

Thanks,
Ron.

Technical Support Jun 16, 2007 - 9:10 AM

First of all, you can override the CExtTabWnd::OnTabWndUpdateItemMeasure() virtual method to make the width of a tab item not greater than some value. Your method should invoke the parent class method and then adjust the sizePreCalc.cx value. The tab window is able to show tooltips for the tab items having too long text painted with "..." ellipsis.

You can also provide tab items with alternative text. You should override the CExtTabWnd::OnTabWndQueryItemText() virtual method for that. In case of MDI tabs, the LPARAM user defined value of each tab item is set to the HWND window handle of corresponding CMDIChildWnd MDI child frame window.

Offer Har Jun 16, 2007 - 9:36 AM

Great!
Problem solved, also used the OnTabWndQueryItemTooltipText to display the full caption text.
Thanks.
Ron.