I created an SDI app with a single menu and a single toolbar in MFC:
I am supposed to show/hide the toolbar dynamically via this code:
...
m_wndToolBar.ShowWindow(SW_HIDE);
...
It did visually hide the toolbar but left a blank, seemingly still working space in the dock region that blocks the main view repositioning. And, when I try to drag the menu, it can dock to the top and bottom line just like the toolbar is there.
I must have missed some necessary steps. So how can I "really" remove the toolbar and raise the main view close to the menu?

