Problem with hpwGetWindowRect - Forum

Forum Navigation
You need to log in to create posts and topics.

Problem with hpwGetWindowRect

Hi, and Special Hi to @hpw

I have to use hpwGetWindowRect to get position and size of a window, and then i take screen shot of that window.

there is a problem... In my screen shot based on hpwGetWindowRect data,(Windows 10) i see a margin around image (image attacked to this post)

That means hpwGetWindowRect counting window shadow area, when window is not maximized.
When window is maximized, there is no problem.

I know that I can use math to reduce and fit window rectangle area but i don't know when window is maximized and when its normal in my case.

any solution for this? is there a way to stop function from including shadow effect to window data?

Thanks :)

Uploaded files:
  • You need to login to have access to uploads.

Hello,

That were the problems when MS is changing windows API calls.

You may have a look at:

hpwGetWindowState "" ""

That before your hpwGetWindowRect might allow you to do the workaround with some math.

Regards

Hans-Peter

 

noyzen has reacted to this post.
noyzen

i will try that, also i have to get version of windows to check if its 10 then i can decide what to do.

Thanks

Global var:

[WindowsVer]

noyzen has reacted to this post.
noyzen