Results 1 to 3 of 3

Thread: Moving Window with Mine

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    Is there a way to process code while a window's being dragged without stopping the user's drag movement?

    I need to keep a foreign window (App B) in the same position relative to my window (App A). So when I move App A, App B needs to move at the same time. I'm subclassing my app and using SetWindowPos to move App B. This works, but this processing within App A kills the drag movement, so I have to click App A and start dragging again, which isn't user-friendly.

    Thanks for any help.
    Wade

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I'm sure I replied to this last night, maybe I forgot to hit submit or something

    From your previous posts you say that you have successfully subclassed foreign windows with some C Dlls, so we'll be doing that.

    set up your own message and trap it in the foreign window you want to move, something like WM_MoveMe = -100 (-ve numbers arn't used for message constants so you won't get a conflict) when you recieve this message move the window to the position specified.

    in your window moving code use postmessage to move the window (postmessage doesn't wait for a return value)

    that way all the legwork will be done in the foreign window process and you should be alright.

    Hope his helps

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    Sam, thanks for the response, but I've removed the title bar from the foreign window so it doesn't move unless I tell it to from my window. This is triggered based on a message (WM_MOVE) from my window. I guess I could set up a separate executable to process it without interrupting my window, but I didn't want the extra overhead. I'm using SetWindowPos -- didn't think you could move a window using PostMessage.

    p.s. I'm subclassing using Spyworks.
    Wade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width