Changing Screen Brightness/Colour/Contrast
-
Please can anyone tell me how to get and change the contrast/colour/brightness of the screen in C++/MFC. TIA, Andy
The first thing to figure out is how to do it without code. From there, you can start searching through a smaller set of APIs.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
The first thing to figure out is how to do it without code. From there, you can start searching through a smaller set of APIs.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Hi, I'm not sure what your getting at, without code I'd just do: Display properties->Settings->Advanced->Color and change it there However searching for these just brings out code which changes the display settings for the app rather than the actual settings in windows. Andy,
-
Hi, I'm not sure what your getting at, without code I'd just do: Display properties->Settings->Advanced->Color and change it there However searching for these just brings out code which changes the display settings for the app rather than the actual settings in windows. Andy,
mcsherry wrote:
I'm not sure what your getting at, without code I'd just do: Display properties->Settings->Advanced->Color and change it there
That's exactly what I was getting at (which will become clearer in time). However, I have a Color Management tab, and on that tab I see nothing for screen brightness, color, or contrast. Do you have something different?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
mcsherry wrote:
I'm not sure what your getting at, without code I'd just do: Display properties->Settings->Advanced->Color and change it there
That's exactly what I was getting at (which will become clearer in time). However, I have a Color Management tab, and on that tab I see nothing for screen brightness, color, or contrast. Do you have something different?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
In addition to the Colour Management tab I have a Colour tab which allows me to manually change the settings. ok so far I've tried:
CDC *win = GetDesktopWindow()->GetDC() ;
COLORADJUSTMENT col_adj ;win->GetColorAdjustment ( &col_adj ) ;
col_adj.caBrightness = 100 ;
int err = win->SetColorAdjustment ( &col_adj ) ;this does return the correct settings for the system however the Set method doesn't actually change anything *that I can see* so I'm assuming I'm looking at the wrong area and changing the wrong settings
-
In addition to the Colour Management tab I have a Colour tab which allows me to manually change the settings. ok so far I've tried:
CDC *win = GetDesktopWindow()->GetDC() ;
COLORADJUSTMENT col_adj ;win->GetColorAdjustment ( &col_adj ) ;
col_adj.caBrightness = 100 ;
int err = win->SetColorAdjustment ( &col_adj ) ;this does return the correct settings for the system however the Set method doesn't actually change anything *that I can see* so I'm assuming I'm looking at the wrong area and changing the wrong settings
mcsherry wrote:
In addition to the Colour Management tab I have a Colour tab...
Since I cannot reproduce this, you'll need to find which registry keys are changed by the controls on the Color tab.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Please can anyone tell me how to get and change the contrast/colour/brightness of the screen in C++/MFC. TIA, Andy
You can use GetDeviceGammaRamp() and SetDeviceGammaRamp() to change monitor brightness on videocards that support it. More information in the MSDN: http://msdn2.microsoft.com/en-us/library/ms536529.aspx[^] All you have to do is call GetDeviceGammaRamp() and iterate through all 256 WORDS and increment them. Higher values == higher brightness. -Randor (David Delaune)
-
You can use GetDeviceGammaRamp() and SetDeviceGammaRamp() to change monitor brightness on videocards that support it. More information in the MSDN: http://msdn2.microsoft.com/en-us/library/ms536529.aspx[^] All you have to do is call GetDeviceGammaRamp() and iterate through all 256 WORDS and increment them. Higher values == higher brightness. -Randor (David Delaune)
-
mcsherry wrote:
In addition to the Colour Management tab I have a Colour tab...
Since I cannot reproduce this, you'll need to find which registry keys are changed by the controls on the Color tab.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne