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 » CExtDynamicControlBar::DoFrameBarCheckCmd does not work Collapse All
Subject Author Date
Rado Manzela May 31, 2010 - 6:16 AM

It seems CExtDynamicControlBar::DoFrameBarCheckCmd() does not work when the toolbar is tabbed document. Instead of switching to correct tab it shows empty dummy docked toolbar. Can you check it please?

Technical Support Jun 2, 2010 - 11:35 AM

First of all, the CExtControlBar::DoFrameBarCheckCmd() method is designed for CExtControlBar windows, not for CExtDynamicControlBar windows. That’s why the context menus over frame areas do not contain dynamic control bars in the document mode. The document mode means the dynamic bar is just hidden and its child window is temporarily moved into some type document container window (dynamic MDI child frame, SDI tab page container). Switching to CExtDynamicControlBar::BarStateSet() method will solve all the issues.
Please also note, the CExtControlBar::DoFrameBarCheckCmd() method just invokes the CExtControlBar::OnFrameBarCheckCmd() virtual method which is not overridden in the CExtDynamicControlBar class. We can override it and prevent the hidden dynamic control bars in the document mode to appear occasionally on the screen.

Rado Manzela Jun 3, 2010 - 3:10 AM

I think CExtDynamicControlBar::BarStateSet() won’t help me, because I don’t want to change state of the bar, I just need tho show it in original state in any state it is. I have more bars in various states where user fills some data and when I validate the data and find the problem, I need to switch to appropriate bar and show notice to user he need to fix something. Can you override CExtDynamicControlBar::BarStateSet() to show any dynamic bar please?


Thank you.

Technical Support Jun 3, 2010 - 10:22 AM

The CExtDynamicControlBar::BarStateSet() method can be used for changing the bar’s visibility without its state. But we can also improve the CExtControlBar::DoFrameBarCheckCmd() method for dynamic resizable control bars. We need to discuss your task requirements in details. How the CExtControlBar::DoFrameBarCheckCmd() method should affect to the dynamic resizable control bars in any state? We especially interested in discussing behavior of this API for bars in the document mode.

Technical Support May 31, 2010 - 12:59 PM

We checked it. We cannot reproduce it both before and after applying the fix we mentioned in our previous answer. We used the SDI_DynamicBars sample application.

Rado Manzela Jun 1, 2010 - 2:47 AM

I’ve realized that even when I try original SDI dynamic bars binary from your site and reset registry, your sample initially creates dummy copies of dynamic bars 14, 16 and 18.


When I try to change creating code to this:



            m_arrAllDynamicBars.Add(
                CExtDynamicBarSite::BarAlloc(
                    strBarCaption, // NULL,
                    icon,
//                    0,
                    11100+i,
                    RUNTIME_CLASS(CSimpleControlBar)
                    )
                );

then when I try to show bar 17 from some menu command using



CExtDynamicControlBar::DoFrameBarCheckCmd(this,11100+17);

It creates docked dummy copy of bar 17 as I’ve described before. I’m compiling static unicode version in VS 2008 if that matters.