Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OnDeviceChange dbcc_name length Pin
Member 138991789-Jul-18 23:26
Member 138991789-Jul-18 23:26 
GeneralRe: OnDeviceChange dbcc_name length Pin
Jochen Arndt9-Jul-18 23:42
professionalJochen Arndt9-Jul-18 23:42 
GeneralRe: OnDeviceChange dbcc_name length Pin
Member 138991789-Jul-18 23:44
Member 138991789-Jul-18 23:44 
QuestionChanging Display gamma [SOLVED] Pin
Valentinor9-Jul-18 0:48
Valentinor9-Jul-18 0:48 
AnswerRe: Changing Display gamma Pin
Jochen Arndt9-Jul-18 1:05
professionalJochen Arndt9-Jul-18 1:05 
GeneralRe: Changing Display gamma Pin
Valentinor9-Jul-18 2:42
Valentinor9-Jul-18 2:42 
GeneralRe: Changing Display gamma Pin
Jochen Arndt9-Jul-18 2:59
professionalJochen Arndt9-Jul-18 2:59 
GeneralRe: Changing Display gamma Pin
Valentinor9-Jul-18 10:51
Valentinor9-Jul-18 10:51 
I found the following code in a post, and this note but I didn't figured out what is the min and the max value the float factor should have. Is this the formula you were talking about?

Quote:
To change gamma, cycle into ramp buffer and change RGB color where Gamma is the float factor.

WORD ramp[256*3];
for( int i=0; i<256; i++ ) {
    ramp[i+0] = ramp[i+256] = ramp[i+512] = 
    (WORD)min(65535, max(0, pow((i+1) / 256.0, Gamma) * 65535 + 0.5));
}
SetDeviceGammaRamp(::GetDC(NULL), ramp);


I got it from this article (it does contain the source code, but the GUI code is very different from JavaFX):
Gamma correction slider[^]
GeneralRe: Changing Display gamma Pin
Jochen Arndt9-Jul-18 21:00
professionalJochen Arndt9-Jul-18 21:00 
GeneralRe: Changing Display gamma Pin
Valentinor9-Jul-18 22:36
Valentinor9-Jul-18 22:36 
GeneralRe: Changing Display gamma Pin
Valentinor9-Jul-18 23:33
Valentinor9-Jul-18 23:33 
GeneralRe: Changing Display gamma Pin
Jochen Arndt9-Jul-18 23:50
professionalJochen Arndt9-Jul-18 23:50 
GeneralRe: Changing Display gamma Pin
Valentinor10-Jul-18 1:10
Valentinor10-Jul-18 1:10 
QuestionMouse Wheel scrolling support for MFC application. Pin
Member 139038189-Jul-18 0:01
Member 139038189-Jul-18 0:01 
AnswerRe: Mouse Wheel scrolling support for MFC application. Pin
Jochen Arndt9-Jul-18 0:52
professionalJochen Arndt9-Jul-18 0:52 
GeneralRe: Mouse Wheel scrolling support for MFC application. Pin
Member 139038189-Jul-18 19:16
Member 139038189-Jul-18 19:16 
GeneralRe: Mouse Wheel scrolling support for MFC application. Pin
Victor Nijegorodov9-Jul-18 20:37
Victor Nijegorodov9-Jul-18 20:37 
GeneralRe: Mouse Wheel scrolling support for MFC application. Pin
Member 139038189-Jul-18 21:04
Member 139038189-Jul-18 21:04 
GeneralRe: Mouse Wheel scrolling support for MFC application. Pin
Jochen Arndt10-Jul-18 0:10
professionalJochen Arndt10-Jul-18 0:10 
GeneralRe: Mouse Wheel scrolling support for MFC application. Pin
Member 1390381810-Jul-18 22:50
Member 1390381810-Jul-18 22:50 
GeneralRe: Mouse Wheel scrolling support for MFC application. Pin
Jochen Arndt10-Jul-18 23:10
professionalJochen Arndt10-Jul-18 23:10 
QuestionObject pointer as method argument Pin
_Flaviu8-Jul-18 0:43
_Flaviu8-Jul-18 0:43 
AnswerRe: Object pointer as method argument Pin
Richard MacCutchan8-Jul-18 7:23
mveRichard MacCutchan8-Jul-18 7:23 
GeneralRe: Object pointer as method argument Pin
_Flaviu8-Jul-18 19:57
_Flaviu8-Jul-18 19:57 
NewsRe: Object pointer as method argument Pin
Richard MacCutchan9-Jul-18 3:01
mveRichard MacCutchan9-Jul-18 3:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.