Reputation: 225
For example if i got this window (which is not part of this project):
Is there a way to get the size of this window? (int x and y)
Thanks, Revolt
Upvotes: 0
Views: 656
Reputation: 596256
If you have the HWND
of the window then you can use GetWindowRect()
or GetWindowPlacement()
to get its position and dimensions.
Update: On Vista and later, GetWindowRect()
can report values that do not take Glass/Aero into account. To account for that, you can use DwmGetWindowAttribute()
with the DWMWA_EXTENDED_FRAME_BOUNDS
attribute instead.
Upvotes: 1