Window rectangles including the imaginary border

Skip to first unread message

Deanna Earley

Dec 8, 2015, 6:47:31 AM12/8/15
Hi all.

I'm currently having a fight with Windows 10 and DWM where Windows is
lying about the window rectangle.
This seems to be for compatibility with broken apps that assume a fixed
width border, but I can find no way to fully work with the real, DWM

The code is VB6 but it also affects GetWindowRect and SetWindowPos.

There are supposedly various ways to get them to give the real rectangle
but I can't get any of them to do the job.

1) DPI awareness manifest
2) Windows 6.0 subsystem in the PE header
3) XP themes/manifest
4) Vista privileges/aware manifest
5) Windows Vista, 7, 8, 8.1 and 10 awareness manifest

My final effort was to get the difference between the Aero and Win32
reported rectangle, but this only gives the correct results AFTER the
window has been shown.

Other details and a screenshot at:

Can anyone shed any light on this and how I can work with the real
rectangle directly?


Deanna Earley (,

(Replies direct to my email address will be printed, shredded then fed
to the rats. Please reply to the group.)
Reply all
Reply to author
0 new messages