Implementation Magnetic effect to ControlBar
-
I wanna implement magnetic effect to ControlBar. So, I override OnWindowPosChanging() member function. But WM_WINDOWPOSCHANGING Message did not enter. that is, the message entered to CMiniDockFrameWnd, but did not ControlBar class. I want another method... thanks for read this message...
-
I wanna implement magnetic effect to ControlBar. So, I override OnWindowPosChanging() member function. But WM_WINDOWPOSCHANGING Message did not enter. that is, the message entered to CMiniDockFrameWnd, but did not ControlBar class. I want another method... thanks for read this message...
I suppose you want to implement the "magnetic" effect for the floating bars, because the docked ones already snap to the dockbars. Well, you guessed right - CMiniDockFrameWnd is the best place to do this. You can derive your own floating miniframe class from CMiniDockFrameWnd and register it by setting the CMainFrame's m_pFloatingFrameClass right after you call EnableDocking() for the main frame (usually in OnCreate()) : int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { //... EnableDocking(CBRS_ALIGN_ANY); m_pFloatingFrameClass = RUNTIME_CLASS(CMyMiniDockFrameWnd); //... }