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 » Logicerror with Autohide Bars (2.83 Beta) Collapse All
Subject Author Date
Sebastian Leopold May 4, 2008 - 11:28 AM

Hello,
a tester of my program has reported a bug with a video. You need the Techsmith Screen Capture Codec avaiable on www.techsmith.com on the downloadpage. You can download the Video here:

http://bugs.fun-byte.com/index.php?getfile=2

Version: 2.83 Beta

Regards
Sebastian Leopold

Sebastian Leopold May 5, 2008 - 1:56 PM

I don’t understand that,
also the SDIDOCVIEW sample has this strange behaviour.

What I mean is:

I have a Controlbar with two tabs insinde (two controlbars combined) now I close that bar. If I now show one of the bars via CFrameWnd::ShowControlBar method only the one get shown. If I now hide the bar both are visible ....

I regards

Technical Support May 7, 2008 - 3:31 AM

We are sorry for providing you with not completely correct information about CFrameWnd::ShowControlBar(). In fact it really affects only one bar. If you need two bars in tabs constantly one near each other, then you can create one bar with a tab page container window inside.

Technical Support May 5, 2008 - 11:51 AM

There are two types of control bar commands:

1) Visibility change. These commands can always be applied to a toolbar, a dialog bar, a menu bar and a status bar. You can also use it for resizable control bars in Prof-UIS but only if the auto-hide feature is not enabled.

2) Forcibly activate and show. This behavior is used by resizable control bars which can be switched into the auto-hide mode like the resizable bars of Visual Studio .NET / 2005 / 2008.

Most of Prof-UIS samples based on a frame window. There are two methods in the main application window, CMainFrame::OnBarCheck() and CMainFrame::OnUpdateControlBarMenu() handler methods, which process control bar commands. Here is how these methods should look if the auto-hide feature is on:

BOOL CMainFrame::OnBarCheck(UINT nID)
{
      return
            CExtControlBar::DoFrameBarCheckCmd(
                  this,
                  nID,
                  false // DO NOT use visibility toggling commands for resizable bars
                  );
}
void CMainFrame::OnUpdateControlBarMenu(CCmdUI* pCmdUI)
{
      CExtControlBar::DoFrameBarCheckUpdate(
            this,
            pCmdUI,
            false // DO NOT use visibility toggling commands for resizable bars
            );
}
And the following version should be used if your frame does not invoke the CExtControlBar::FrameInjectAutoHideAreas() method in its CMainFrame::OnCreate() method and, as a result, the auto-hide feature is not used with resizable control bars:
BOOL CMainFrame::OnBarCheck(UINT nID)
{
      return
            CExtControlBar::DoFrameBarCheckCmd(
                  this,
                  nID,
                  true // USE visibility toggling commands for resizable bars
                  );
}
void CMainFrame::OnUpdateControlBarMenu(CCmdUI* pCmdUI)
{
      CExtControlBar::DoFrameBarCheckUpdate(
            this,
            pCmdUI,
            true // USE visibility toggling commands for resizable bars
            );
}
Your resizable bars support the auto-hide. This means you should not invoke CFrameWnd::ShowControlBar() for resizable control bars without analyzing their auto-hidden state. If you want to make some control bar simply visible, not hidden and not auto-hidden, you should first invoke the CExtControlBar::AutoHideModeGet() method to check bar’s auto-hidden state, return it to the simple docked mode if needed by using the CExtControlBar::AutoHideModeSet() method and show or hide it using the CFrameWnd::ShowControlBar() method if also needed. Please note the CExtControlBar::AutoHideModeSet() and CFrameWnd::ShowControlBar() methods invoked for some resizable bar which is in the tabbed bar group affect all the bars in the same group.