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 » Changing the name of a document Collapse All
Subject Author Date
Pierre MEDART Jun 1, 2007 - 8:31 AM

Hi,

I’m using a CExtTabMdiWhidbeyWnd to host my frame/doc/view.

When I create the doc/view I have a default name, Aname1 (for example), this name gets displayed in the tab.

Then I change the name to something that fits our need, for example A_Name_That_Makes_Sense.

My issue is that the tab keeps the old name and it doesn’t resize automaticaly.

The tab is aware of the new name, when mouse passes on it the correct name gets displayed.

The tab is also aware of the size it should use because when I click on it, its size is adapted.

How can I display the correct name and size automaticaly ?

Jean Yves Garneau Feb 8, 2008 - 11:55 AM

Hi,

I found the problem. I have overridden CExtTabMdiWhidbeyWnd::OnTabWndQueryItemText() and the code is not appropriate. The call to UpdateTabWnd() is perfect.

Pierre MEDART Feb 8, 2008 - 9:29 AM

The CExtTabMdiWhidbeyWnd is a member of our MainFrame, m_wndMdiTabs.

In the MainFrame we added a method such as

void OurMainFrame::UpdateTabWnd()
{
    m_wndMdiTabs.UpdateTabWnd();
}

after creating the View we call

((OurMainFrame*)AfxGetApp()->m_pMainWnd)->UpdateTabWnd();

and it works

Hope it can help you.

Jean Yves Garneau Feb 8, 2008 - 6:57 AM

Hi,
I have same problem. I create CExtDynamicControlBar to put views and the CExtTabMdiWhidbeyWnd automatically update with a new tab but the caption is not there. When the mouse come on the tab, the text appear but no sizing occur. When I click the tab the refresh is made and all is OK.

I have tried the CExtTabMdiWhidbeyWnd::UpdateTabWnd() with no effect. When I search for the new TAB_ITEM_INFO added I don’t find him. How can I corrected this problem?

Thank you!

Suhai Gyorgy Jun 1, 2007 - 8:37 AM

I think all you need is to call CExtTabMdiWhidbeyWnd::UpdateTabWnd();

Pierre MEDART Jun 1, 2007 - 8:59 AM

thanks Suhai