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. Managed C++/CLI
  4. Bounded mouse position when moving child form

Bounded mouse position when moving child form

Scheduled Pinned Locked Moved Managed C++/CLI
questioncsharpc++
3 Posts 1 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.
  • L Offline
    L Offline
    LionAM
    wrote on last edited by
    #1

    Still another question: I want to create a .NET equivalent to the MFC CDialogBar. When I move a form which is a child of a panel, the mouse position is bounded by the panel, even if I set

    Parent = nullptr;
    TopLevel = true;

    on first Move-Event and even if the panel is not visible any more. Is there a workaround? Alex

    L 1 Reply Last reply
    0
    • L LionAM

      Still another question: I want to create a .NET equivalent to the MFC CDialogBar. When I move a form which is a child of a panel, the mouse position is bounded by the panel, even if I set

      Parent = nullptr;
      TopLevel = true;

      on first Move-Event and even if the panel is not visible any more. Is there a workaround? Alex

      L Offline
      L Offline
      LionAM
      wrote on last edited by
      #2

      Hello! For the mouse, I found a solution: The allowed mouse position is bounded by the Cursor->Clip property. But still the window can not be moved completely out of the panel, it stops at the border. Alex

      L 1 Reply Last reply
      0
      • L LionAM

        Hello! For the mouse, I found a solution: The allowed mouse position is bounded by the Cursor->Clip property. But still the window can not be moved completely out of the panel, it stops at the border. Alex

        L Offline
        L Offline
        LionAM
        wrote on last edited by
        #3

        Ok, nearly solved. When I override the WndProc-Method and process the WM_SYSCOMMAND(SC_MOVE) Message, I can reset the Parent-property and the window is not bounded any more. Alex

        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