SetProcessDPIAware

SetProcessDPIAware是一個函式,可用於防止UI自動放大。

windows中user32.dll的一個API函式,可用於防止UI自動放大,C/C++中使用代碼如下:
HINSTANCE hUser32 = LoadLibrary( L"user32.dll" );
if( hUser32 )
{
typedef BOOL ( WINAPI* LPSetProcessDPIAware )( void );
LPSetProcessDPIAware pSetProcessDPIAware = ( LPSetProcessDPIAware )GetProcAddress( hUser32, "SetProcessDPIAware" );
if( pSetProcessDPIAware )
{
pSetProcessDPIAware();
}
FreeLibrary( hUser32 );
}

相關詞條

熱門詞條

聯絡我們