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 General Discussion » Hide the tab of CExtTabbedToolControlBarButtons Collapse All
Subject Author Date
Seung Cheol Lee Oct 26, 2006 - 2:53 AM

Hello

I have used CExtTabbedToolControlBarButtons.
Is it possible to hide the tab of CExtTabbedToolControlBarButtons?

Technical Support Oct 26, 2006 - 6:19 AM

You can hide a tab in the following way:

1) Retrieve a pointer to the CExtTabPageContainerWnd window using the CExtTabbedToolControlBar::GetTabPageContainer() method.
2) Use the CExtTabPageContainerWnd::PageVisibleSet method to make any item visible or invisible.

Seung Cheol Lee Oct 26, 2006 - 6:32 PM

I have hided all tabs in the way of your answer.
But additionally I want to remove the region of tab.

Technical Support Oct 27, 2006 - 11:18 AM

We changed the CExtTWPC::OnTabWndSyncVisibility virtual method. Now when the number of visible tabs is zero, the tab strip gets invisible.

Here is the updated method (please replace it in the ExtTabPageContainerWnd.h header and recompile the library:

 void OnTabWndSyncVisibility()
 {
  LONG nItemCount = _BT::ItemGetCount();
  LONG nItemVisibleCount = _BT::ItemGetVisibleCount();
  DWORD dwWndStyle = GetStyle();
  if(  nItemCount > 0 
   && nItemVisibleCount > 0
   )
  {
   if( (dwWndStyle & WS_VISIBLE) == 0 )
   {
    ::SetWindowPos(
     m_hWnd,
     NULL, 0, 0, 0, 0,
     SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER
     |SWP_FRAMECHANGED
     |SWP_SHOWWINDOW
     );
   }
  } // if( nItemCount > 0 )
  else
  {
   if( (dwWndStyle & WS_VISIBLE) != 0 )
    ::SetWindowPos(
     m_hWnd,
     NULL, 0, 0, 0, 0,
     SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER
     |SWP_HIDEWINDOW
     );
  } // else from if( nItemCount > 0 )
 }


Seung Cheol Lee Oct 29, 2006 - 8:23 PM

I appreciate your help quickly. ˆˆ