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

It depends on the design of your application.

If you have dockable toolbars in a CFrameWnd-based application, do not use ShowWindow() of CWnd because, when a toolbar gets displayed/hidden, this affects the layout of other windows. Just use CFrameWnd::ShowControlBar() instead:

   &m_wndToolBar, //Pointer to the control bar to be shown or hidden
   FALSE, // Hide if FALSE or show if TRUE
   FALSE // Immediately if FALSE

If you use a toolbar on a dialog, the methods of CWnd are appropriate:

m_wndToolbar.ShowWindow( SW_HIDE ); // Hide or use SW_SHOW to show
CWnd::RepositionBars( 0, 0xFFFF, 0 );