c++ - How do you scale the title bar on a DPI aware win application? -


i making app dpi-aware per monitor setting <dpiaware>true/pm</dpiaware> in manifest file. can verify process explorer indeed working or calling getprocessdpiawareness.

this working fine , can scale in client area fine in code. however, problem if drag app system-dpi monitor non-system dpi monitor, title bar , system menu either become big or small. isn't case built-in apps (e.g. calc, edge browser, etc..) there must away scale properly. how devs @ ms did this?

the screenshot below should explain problem better. notice, padding between close, min, , max button different when it's scaled (96dpi).

screenshot

sample app i'm attaching simple app per-monitor dpi aware.

does how devs @ ms did this?

this has pretty disappointing answer. using alin constantin's wincheat , inspecting top-level window of calculator, see window size of 320x576, , client size 320x576.

in other words, microsoft entirely avoids problem suppressing non-client area of window, putting in client area instead. making work may involve custom drawing of title bar.

something worth noting calculator , e.g. windows explorer don't use same colour title bars. calculator doing custom drawing of title bar explain perfectly.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -