Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

Just override the CExtTabMdiWnd::OnTabWndSyncVisiblilty() virtual method. Use a CExtTabMdiWnd-derived class like this:

class CMyExtTabMdiWnd : public CExtTabMdiWnd
{
public:
CMyExtTabMdiWnd()
: CExtTabMdiWnd()
, m_bVisible( true )
{
}
void SetVisibility(bool bVisible=true)
{
m_bVisible = bVisible;
}
bool GetVisibility()
{
return m_bVisible;
}
protected:
bool m_bVisible;
virtual void OnTabWndSyncVisibility()
{
ShowWindow(
m_bVisible && ItemGetCount() > 0
? SW_SHOW
: SW_HIDE
);
}
}; // class CMyExtTabMdiWnd

After calling the CMyExtTabMdiWnd::SetVisibility() method, do not forget to call the RecalcLayout() method of the frame window.