Deconstraining Cursor While Moving Window

This is a discussion on Deconstraining Cursor While Moving Window within the Windows Programming forums, part of the Platform Specific Boards category; Hello, When you move a child window (if you have it set up so that part of the child window ...

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,259

    Deconstraining Cursor While Moving Window

    Hello,

    When you move a child window (if you have it set up so that part of the child window pretends its the caption area), the cursor is confined to the parent window's client area. I imagine this due to either calling ClipCursor at the start of movement or SetCursorPos in a conditional manner every time the window is moved.

    Is there a way that I can free the cursor from those bounds?

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    So you want a child window to be able to be moved outside the parent?

  3. #3
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,259
    Well, no. The thing is I'm trying to get a dockable window system going. I want the child window to be stuck to the parent unless the cursor (left button down) moves a sufficient distance away, then the window will be promoted to a top-level window.

    The cursor currently can't leave the parent while it is moving the child.

    EDIT: Ah, think I figured it out:-
    Code:
    // In dockable window's standard WindowProc uMsg switch
    case WM_ENTERSIZEMOVE:
    {
        ClipCursor(NULL);
        break;
    }
    Last edited by SMurf; 08-26-2006 at 06:28 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 10:06 AM
  3. My Window Class
    By Epo in forum Game Programming
    Replies: 2
    Last Post: 07-10-2005, 02:33 PM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 09:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21