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 Collapse All
Subject Author Date
Daniel Tiedy Dec 29, 2003 - 1:16 PM

Is there a way to safelty toggle on and off the TabMdiWnd at run time?

Daniel Tiedy Dec 29, 2003 - 3:04 PM

I simply Destroy and ReCreate the window and it seems to work find, but I wasn’t sure if there might be ramifications to doing this.


 

Technical Support Dec 30, 2003 - 5:27 AM

Dear Daniel,


If you want to toggle the visibility of the MDI tab window at run time, you should override the OnTabWndSyncVisiblilty() method. Please use CExtTabMdiWnd-derived class like this:

class CMyExtTabMdiWnd : public CExtTabMdiWnd
{
public:
	 void SetVisibility(bool bVisible=true){
	  m_bVisible = bVisible;
 	}
protected:    
	 bool m_bVisible:true;
	 virtual void OnTabWndSyncVisiblilty()
	 {
	     ShowWindow( m_bVisible ? SW_SHOW : SW_HIDE );
	 }
}; // class CMyExtTabMdiWnd

After invoking SetVisibility() please do not forget to invoke RecalcLayout() of your frame window.