Changing screen brightness/color with Windows application using GammaRamp

时间:2017-08-04 12:11:17

标签: winapi screen brightness

I am coding an application for Windows Desktop OS which changes screen brightness and colors via GammaRamp (using SetDeviceGammaRamp function). I assume that there are two levels of the GammaRamp setting - user level and admin/system level.

When I start a file (program) which requires admin privileges

enter image description here

and UAC prompt windows shows up, the GammaRamp user-level setting has been overridden with the default 255,255,255 (for security reasons) and is not valid anymore.

enter image description here

Is there a way to detect this UAC prompt window or the change of the GammaRamp (that the user-level setting is not in use anymore) from my application in order to correct GammaRamp after the UAC prompt?

I have tried to capture a message in WndProc about GammaRamp change or UAC prompt but it seems nothing is sending.

0 个答案:

没有答案