• Window rectangles including the imaginary border

    From Deanna Earley@21:1/5 to All on Tue Dec 8 11:43:55 2015
    XPost: comp.os.ms-windows.programmer.win32, microsoft.public.vb.general.discussion, microsoft.public.win32.programmer.ui

    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
    rectangle.

    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:
    http://stackoverflow.com/q/8838621/588306

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

    Thanks

    --
    Deanna Earley (dee@earlsoft.co.uk, dee@doesnotcompute.co.uk)

    (Replies direct to my email address will be printed, shredded then fed
    to the rats. Please reply to the group.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)