Results 1 to 2 of 2

Thread: How do I detect if any window is moving ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 1999
    Posts
    87
    Can I detect if any window on the screen is moving, not only the ones that I've created, all windows on the screen??
    I asked Yonatan, he said something about using Hook ??
    What's that ?
    And how do I use it ?
    Some code would be nice.

    Thank you, Jerry.

    Homepage: http://fraxionsoftware.cjb.net
    ICQ: 40269591
    Mail: Contact Me

  2. #2
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    You will have to use subclassing I think. Here is a link to help get you started:

    http://www.geocities.com/SiliconVall...32/atch12.html

    you will need to trap WM_WindowPositionChanged and get the windows hWnd's. You can get there hWnd by using FindWindow. You can find more about FindWindow here:

    http://kpdteam.tripod.com/api/FindWindow.htm

    I tried to use this to detect when a form moved and where it was located, to keep my other forms docked to it. But let me warn you save your work and be ready because subclassing can and will cause crashing if you have anything wrong. Also remember to end subclassing before you exit and I also found that the end command will cause trouble also.

    Good luck

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