Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » DPI Virtualization Collapse All
Subject Author Date
Eric Oct 24, 2011 - 6:57 AM

Hello,



I have a question concerning the DPI Virtualization on Win 7.



I have some display issues when the display is in 125% or 150% mode.

I tried to deactivate the following property ’Disable display scaling on high DPI settings’ at executable level and also at system level but nothing changed.

I also tried to change it programmatically by calling the method ’SetProcessDPIAware’ and by modifying my product manifest but nothing changed either.



So here is my question, did you implement your own DPI virtualization system ??

I tried also to modify some variables of the ’Paint Manager’:




    g_PaintManager.m_bEnableUiScalingX = g_PaintManager.m_bEnableUiScalingY = g_PaintManager.m_bEnableUiScalingZ = false;

    g_PaintManager.m_bIsWinVista = g_PaintManager.m_bIsWinVistaOrLater = g_PaintManager.m_bIsWin7 = g_PaintManager.m_bIsWin7OrLater = false;




but nothing changed, a non wanted resize is ALWAYS applied.



Do you have any idea?



Regards,

Cedric.

Technical Support Oct 26, 2011 - 1:28 AM

the standard applications provided with Windows Vista and 7 do the same as Prof-UIS does it: we forcefully disable DPI scaling. The normal classic Win32 UI is based on raster graphics and appropriate computational algorithms rather than on vector graphics and floating point computations. This is performed by the following code in the CExtPaintManager::CExtPaintManagerAutoPtr::CExtPaintManagerAutoPtr() constructor:
BOOL ( WINAPI * pfnSetProcessDPIAware )( VOID ) = ( BOOL ( WINAPI * )( VOID ) ) ::GetProcAddress( m_hDllUser32, "SetProcessDPIAware" );
if( pfnSetProcessDPIAware != NULL )
pfnSetProcessDPIAware();