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 » Close button on MDI Tabs Collapse All
Subject Author Date
Sergio Buonanno Sep 29, 2010 - 4:37 AM

I have put the following code fragment inside CMainFrame::OnCreate:

if (!m_wndMdiTabs.Create(this, CRect( 0, 0, 0, 0 ), 157,    WS_HSCROLL | WS_VSCROLL | WS_CHILD | WS_VISIBLE |
            WS_CLIPSIBLINGS,
            __ETWS_DEFAULT | __ETWS_SHOW_BTN_TAB_LIST | __ETWS_SHOW_BTN_CLOSE))
    {
        ASSERT( FALSE );
        return -1;
    }
    m_wndMdiTabs.ModifyStyleEx(0, __ETWS_EX_CLOSE_ON_SELECTED_ONLY | __ETWS_EX_CLOSE_ON_TABS);

But the close button is still shown on the right side of the MDI tab control and not directly on the TAB. I tried top play little with standard and extended styles but I couldn’t find a way to show the close button directly on the TAB like in Visual Studio 2010.

My MDI TAB control is derived from CExtTabOneNoteWnd.

Technical Support Sep 29, 2010 - 11:53 AM

Please remove the __ETWS_SHOW_BTN_CLOSE basic style from the Create() method invocation.