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 General Discussion » CExtControlBar is Docked moment , in MainFrame Collapse All
Subject Author Date
ppc 0099 Dec 17, 2008 - 6:18 AM

how to catch moment ?? CExtControl Bar in MainFrame.


organization


MainFrame,  CSectionWnd : public CExtControlBar


.RibbonBar created  in MainFrame


.CSectionWnd    m_wndFrame1;


.CSectinoWnd    m_wndFrame2;


.m_wndFrame1, m_wndFrame2 created


[problem]


1.      how to know  m_wndFrame1 is docking moment ??


2.      how to know  m_wndFrame1 is docked moment ??


3.      how to know  m_wndFrame1 docking  in MainFrame  after =>  Full mode change ??


4.      how to know m_wndFrame1 is floating moment ??


please


 


 


 


 

Technical Support Dec 18, 2008 - 11:39 AM

There are two virtual methods for switching the CExtControlBar resizable control bar into the floating state:

   virtual void ToggleDocking();

            virtual void FloatControlBar(
                        CPoint ptFloat,
                        DWORD dwStyle = CBRS_ALIGN_TOP
                        );

These methods are also used by toolbars, menu bar, panel bars. The ToggleDocking() virtual method is invoked when the user double clicks the caption of resizable control bar or the gripper of toolbar. The FloatControlBar() virtual method is invoked in all the other cases. You can use your own class which implements these virtual methods if you would like to catch the events of switching the control bar into the floating state. Is that’s what you need?
You can also override the CExtControlBar::OnControlBarPositionChange() virtual method if you want to catch other types of control bar position changing:
   virtual void OnControlBarPositionChange(
                        CExtControlBar * pBarEventSrc,
                        e_control_bar_position_changing_t eCBPC,
                        bool bInitial,
                        bool bFinal
                        );

Technical Support Dec 18, 2008 - 11:38 AM

There are two virtual methods for switching the CExtControlBar resizable control bar into the floating state:

   virtual void ToggleDocking();

            virtual void FloatControlBar(
                        CPoint ptFloat,
                        DWORD dwStyle = CBRS_ALIGN_TOP
                        );

These methods are also used by toolbars, menu bar, panel bars. The ToggleDocking() virtual method is invoked when the user double clicks the caption of resizable control bar or the gripper of toolbar. The FloatControlBar() virtual method is invoked in all the other cases. You can use your own class which implements these virtual methods if you would like to catch the events of switching the control bar into the floating state. Is that’s what you need?
You can also override the CExtControlBar::OnControlBarPositionChange() virtual method if you want to catch other types of control bar position changing:
   virtual void OnControlBarPositionChange(
                        CExtControlBar * pBarEventSrc,
                        e_control_bar_position_changing_t eCBPC,
                        bool bInitial,
                        bool bFinal
                        );


ppc 0099 Dec 17, 2008 - 6:18 AM

how to catch moment ?? CExtControl Bar in MainFrame.



organization



MainFrame, CSectionWnd : public CExtControlBar



.RibbonBar created in MainFrame



.CSectionWnd m_wndFrame1;



.CSectinoWnd m_wndFrame2;



.m_wndFrame1, m_wndFrame2 created



[problem]



1. how to know m_wndFrame1 is docking moment ??



2. how to know m_wndFrame1 is docked moment ??



3. how to know m_wndFrame1 docking in MainFrame after => Full mode change ??



4. how to know m_wndFrame1 is floating moment ??



please