Re: Hiding tab control for CTabView
"Political" <politicalconfusion-/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
Thanks, that works. I filed a bug at SF. --- In [email protected], "Alain Rist" <ar@...> wrote: > > Sorry for formatting and missing member :( > > This does it, you may want to file a bug at > http://sourceforge.net/tracker/?func=add&group_id=109071&atid=652372 > > class CMyTabView : public CTabViewImpl<CMyTabView> > { > public: > DECLARE_WND_CLASS_EX(_T("MyTabView"), 0, COLOR_APPWORKSPACE) > void UpdateLayout() > { > RECT rect; > GetClientRect(&rect); > const bool bTabVisible = m_tab.IsWindow() && ((m_tab.GetStyle() & > WS_VISIBLE) != 0); > if(bTabVisible) > m_tab.SetWindowPos(NULL, 0, 0, rect.right - rect.left, > m_cyTabHeight, SWP_NOZORDER); > if(m_nActivePage != -1) > { > const INT cyTabHeight = bTabVisible ? m_cyTabHeight : 0; > ::SetWindowPos(GetPageHWND(m_nActivePage), NULL, 0, cyTabHeight, > rect.right - rect.left, rect.bottom - rect.top - cyTabHeight, SWP_NOZORDER); > } > } > void ShowTabControl(bool bShow) > { > m_tab.ShowWindow(bShow ? SW_SHOWNOACTIVATE : SW_HIDE); > UpdateLayout(); > } > }; > > cheers, > AR > > > ----- Original Message ----- > From: Political > To: [email protected] > Sent: Tuesday, May 11, 2010 5:14 AM > Subject: [wtl] Hiding tab control for CTabView > > I've created an SDI application with CTabView as m_view. In > CMainFrame::OnCreate() I add my tab windows to the view and call > m_view.ShowTabControl( false ). The tab control does not show in the view, > but there is a dark gray bar across the top of the view where the tab > control would be shown. > > Is it possible to have client area of CTabView fill the client area of > CMainFrame? I noticed there is a switch view in frame article at Code > Project, but one of the comments suggested using CTabView instead. > > I'm using the latest WTL (revision 444) in VS2008 SP1 on Windows 7. > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/