I have several Toolbars/Menubars derived from the code Sizing Control Bar that I would like to be able to use with CFrameWndEx
but I'm unable to find an easy to use the ShowPane
functions with the CControlBar
derived objects.
For instance with CFrameWnd
:
ShowControlBar(&m_ctlDimBar, m_ctlDimBar.IsVisible(), FALSE);
Needs to be replaced, when using CFrameWndEx
, with:
ShowPane(&m_ctlDimBar, m_ctlDimBar.IsVisible(), FALSE, TRUE);
Yet I can't use m_ctlDimBar
as is because it is a CControlBar
derived object and not a CBasePane
object. Is there an easy way to circumvent the incompatibility without having to rewrite the code from the link?