Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
window handles
#1
i have a few questions about how window handles.

if i wanted to keep an array of windows and their sizes before i "rolled them up" to be able to restore their "pre-roll-up" dimentions, what kind of problems am i going to run into if i used window handles? are they randomly selected from a large number or are they segragated to certian range by app type? if the are pulled from one pool of numbers, is the number so large as to make very few possible "collisions"?

thanks.
A new blog on QM coding and automation.

The Macro Hook
#2
A window handle can be any number. I don't know when the same handle value can be reused after the window is destroyed. I never had such problems, so I think not soon.

You can periodically, eg every 60 s, call IsWindow on every handle, and remove invalid handles (if IsWindow returns 0) from the array.
#3
"You can periodically, eg every 60 s, call IsWindow on every handle, and remove invalid handles (if IsWindow returns 0) from the array."

ooohhh....nice idea....i kept seeing numbers go from 65,000-183,000,000 so i was hoping it was random.

thanks.
A new blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)