Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obtain a handle to a window
#1
Hi - Im a newbie on QM but I am a programmer - just not familiar with QM.

This is a VERY cool little program - Will actually save me alot of time on some simple stuff.

Anyway - My question is - What is the best way to access a windows properties. I noticed that you can get a pointer to a HWND Obj, so it should be possible to access most of the info from that handle. I guess the real question is where in the documentation can i find detailed info on accessing the lower level aspects of a window. More specifically - I'm looking to test the background color of a window and when the background color changes - do something.

Pseudo Code:

if(hwnd->backgroundcolor == #a045e1){
Do something
}

How do I obtain a handle to a window and then test or check for certain properties

TIA Big Grin Big Grin
Kevin
#2
To access window properties in QM can be used Windows API functions. Documented in MSDN: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Applications use various ways to draw window background, and there is no Windows API function to get it as a window property. You can get screen pixel color using QM function pixel(). Also look here: floating toolbar -> Wait -> Wait for color. To get window handle: floating toolbar -> Windows, controls -> Find window or control. Or Ctrl+Alt+Shift+W.
#3
Cool - thanx - Thats what I needed was to be pointed in the right direction so I wasnt beating my head against the wall

Should be able to fig out the rest from here

:mrgreen: :mrgreen:


Forum Jump:


Users browsing this thread: 1 Guest(s)