There are no benefits to P / Invoking GetClientRect. You get exactly the same by requesting a property ClientRectangle.
And yes, either one of them is going to return the size of the client area to physical pixels, which, apparently, is not what you want.
You are probably looking for a method ID2D1RenderTarget::GetSizethat returns the size of a rendering target in device-independent pixels (DIP).
(, ), - ID2D1Factory::GetDesktopDpi, , DIP.
, Windows 8.1, , DPI. , DPI- , . DPI. , :
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>True/PM</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
Visual Studio "" β " ". " " .
: DPI-Aware Desktop Win32