Josh Posted January 13, 2017 Share Posted January 13, 2017 This prints 1280, 720 regardless of the DPI commands above used: print(GetSystemMetrics(SM_CXSCREEN)); print(GetSystemMetrics(SM_CYSCREEN)); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 13, 2017 Share Posted January 13, 2017 Any combination of these commands will still give 96 (the default) for the DPI: //SetProcessDPIAware(); //SetProcessDpiAwareness(PROCESS_DPI_AWARENESS::PROCESS_DPI_UNAWARE); SetProcessDpiAwareness(PROCESS_DPI_AWARENESS::PROCESS_SYSTEM_DPI_AWARE); //SetProcessDpiAwareness(PROCESS_DPI_AWARENESS::PROCESS_PER_MONITOR_DPI_AWARE); HDC screen = GetDC(0); auto dpiX = GetDeviceCaps(screen, LOGPIXELSX); auto dpiY = GetDeviceCaps(screen, LOGPIXELSY); ReleaseDC(0, screen); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 13, 2017 Share Posted January 13, 2017 Oh, I just had to log out and back in. All this requires is that a call to this: SetProcessDPIAware(); Be placed right after the main function starts. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 13, 2017 Author Share Posted January 13, 2017 I really appreciate the time you spend on investigating this. Great work! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.