Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
window size
#2
To get window size, call function GetWinXY. Function is in System\Functions\Windows folder and contains usage example.
Below is example with comments:

Declare variables:
int x y width height
Call function. Pass handle of active window (use function win to get it) and addresses of variables (use operator & to get variable address):
GetWinXY(win() &x &y &width &height)
Display variables in output:
out "x=%i y=%i width=%i height=%i" x y width height

Alternatively, you can use function GetWindowRect:

RECT r
GetWindowRect(win() &r)
out "x=%i y=%i width=%i height=%i" r.left r.top r.right-r.left r.bottom-r.top


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)