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 Tech Support » Show / hide CExtControlBar from the View menu like the toolbars Collapse All
Subject Author Date
Nicholas Vezirgiannis Jan 30, 2008 - 8:52 AM

Hallo,
I would like to ask if it is possible to toggle a CExtControlBar just like a Toolbar from the view menu. The Toolbars have a check icon next to them in the View Menu while the control bar does not.
Also when I click the view menu entry it only shows the control bar (if I have closed it before) but does not hide it.
Any ideas?

Nicholas Vezirgiannis Feb 5, 2008 - 3:11 AM

Thank you for the help. I forgot to change a parameter in these functions. Your examples were most helpful and a solution was found.
Thank you for your time.

Technical Support Feb 4, 2008 - 12:29 PM

We can provide you with a relevant solution. For instance, the SDI sample application uses a check-like control bar menu commands for resizable control bars when the ProfStudio sample uses Visual Studio style commands. The difference between these applications are only in the OnBarCheck() and OnUpdateControlBarMenu() methods of the main frame class. If you provide us with a test project, we make any or all resizable control bars use menu commands like you need.

Nicholas Vezirgiannis Feb 4, 2008 - 3:00 AM

I think this answer is a copy of my other thread. This is not what I asked. Could you please provide a relevant answer?

Technical Support Feb 2, 2008 - 11:23 AM

The CExtPropertyGridCtrl class does not support print/preview. The CExtPPVW < CExtPropertyGridCtrl > template based class supports it. You should simply remove CExtPPVW from the declaration of the property grid control in your project.

Nicholas Vezirgiannis Feb 1, 2008 - 4:47 AM

Hallo again,
I don’t think you understood my question.
I am using these methods as your manual describes. In most of the cases they were automatically created by your wizard.
My question is, if I can Show and hide a control bar, by clicking the "view menu" entry that corresponds to that control bar, the same way I show and hide any other toolbar from the equivalent "VIEW menu" entry.
Up till now I can only show the control bar but cannot hide it from the View menu. If the control bar is already visible and I select it from the "View menu" it only gives it Focus instead of hiding it.

Technical Support Jan 31, 2008 - 4:15 AM

You can use the following versions of control bar handling/updating methods:

void CMainFrame::OnUpdateControlBarMenu(CCmdUI* pCmdUI)
{
      CExtControlBar::DoFrameBarCheckUpdate( this, pCmdUI, true );
}

BOOL CMainFrame::OnBarCheck(UINT nID)
{
      return CExtControlBar::DoFrameBarCheckCmd( this, nID, true );
}
Please note that toolbar style commands can be applied to control bars only if the auto-hide feature is into enabled in the main frame window. This means you should not invoke the CExtControlBar::FrameInjectAutoHideAreas() method in the CMainFrame::OnCreate().