Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Implementation Magnetic effect to ControlBar

Implementation Magnetic effect to ControlBar

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andrebon
    wrote on last edited by
    #1

    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...

    C 1 Reply Last reply
    0
    • A Andrebon

      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...

      C Offline
      C Offline
      Cristi Posea
      wrote on last edited by
      #2

      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); //... }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups