0

It worked well in Windows 8.1. But since I updated to Windows 10, GetWindowRect returns rectangle which is too big.

If I make screenshot from window (using ALT+PRINT keys) it gives me correct size of 794x578 Pixels. If I use GetWindowRect it gives me 808x585 pixels.

I have two Monitors with different resolutions. This Problem occurs on both Monitors.

andronix
  • 124
  • 9
  • 1
    Got an http://stackoverflow.com/help/mcve or a question? Its hard to know what exactly you're after or which conditions may have a bearing on your output without an minimal example or a question. – enhzflep Aug 14 '15 at 09:00
  • 1
    Maybe [this SO question](http://stackoverflow.com/questions/3192232/getwindowrect-too-small-on-windows-7) or [this other SO question](http://stackoverflow.com/questions/16484894/form-tells-wrong-size-on-windows-8-how-to-get-real-size) may help. – Jabberwocky Aug 14 '15 at 09:20
  • @David Heffernan This is not a duplicate and answer you meant is not helpful - it is just a hack which I can't use since I do it in Java. – andronix Aug 14 '15 at 12:59
  • 2
    It certainly is a duplicate and the fact that you use Java is not relevant. After all, that's not in the question. Even if the question specifically mentioned Java it would still be a duplicate. If you have a follow on question about how to use your new knowledge in you specific context, that would be a new question. – David Heffernan Aug 14 '15 at 13:06
  • This Problem was a part of another Problem - getting screenshot of window. The solution was to bitBlt window's Client area. – andronix Aug 16 '15 at 06:55
  • 1
    GetWindowRect is returning the correct size. Windows 10 has now made the left/right/bottom resizable borders invisible. They are still present, even though ALT+PrnScr doesn't show them. Simply move your mouse past the visible edge of the window, and you will see that the mouse resizes. See this: http://stackoverflow.com/questions/34139450/getwindowrect-returns-a-size-including-invisible-borders?rq=1 – mikew May 23 '16 at 17:15

0 Answers0