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
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.
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.