Click here to Skip to main content
15,860,844 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFunction similar to printf for software UART, without the need for a large temporary buffer? Pin
arnold_w8-Feb-21 11:20
arnold_w8-Feb-21 11:20 
AnswerRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
Mircea Neacsu8-Feb-21 12:00
Mircea Neacsu8-Feb-21 12:00 
GeneralRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
arnold_w9-Feb-21 7:39
arnold_w9-Feb-21 7:39 
GeneralRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
Mircea Neacsu9-Feb-21 8:22
Mircea Neacsu9-Feb-21 8:22 
AnswerRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
CPallini8-Feb-21 20:11
mveCPallini8-Feb-21 20:11 
GeneralRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
arnold_w9-Feb-21 8:04
arnold_w9-Feb-21 8:04 
GeneralRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
CPallini9-Feb-21 19:57
mveCPallini9-Feb-21 19:57 
QuestionChanging gamma with multiple display setup Pin
Valentinor6-Feb-21 1:23
Valentinor6-Feb-21 1:23 
I made an app that used to works just fine to change gamma, and it still does, but with one condition, to have only one monitor connected. But the problem now is that I have 2 monitors, and the app doesn't work anymore, only if I disconnect one of them.
Can anyone tell me what I need to change in order to make it work with multiple display setups? And if there is a way to change gamma on only one of them then that is a good bonus and will help with another idea that I have.

This is what I'm using right now:
WORD ramp[256 * 3];
for (int i = 0; i < 256; i++) {
    ramp[i] = ramp[i + 256] = ramp[i + 512] =
        (WORD)min(65535, max(0, pow((i + 1) / 256.0, ValueForLight) * 65535 + 0.5));
}
SetDeviceGammaRamp(::GetDC(NULL), ramp);

AnswerRe: Changing gamma with multiple display setup Pin
Richard MacCutchan6-Feb-21 1:30
mveRichard MacCutchan6-Feb-21 1:30 
GeneralRe: Changing gamma with multiple display setup Pin
Valentinor6-Feb-21 1:55
Valentinor6-Feb-21 1:55 
GeneralRe: Changing gamma with multiple display setup Pin
Richard MacCutchan6-Feb-21 2:10
mveRichard MacCutchan6-Feb-21 2:10 
GeneralRe: Changing gamma with multiple display setup Pin
Valentinor6-Feb-21 2:56
Valentinor6-Feb-21 2:56 
GeneralRe: Changing gamma with multiple display setup Pin
Dave Kreskowiak6-Feb-21 5:05
mveDave Kreskowiak6-Feb-21 5:05 
GeneralRe: Changing gamma with multiple display setup Pin
Valentinor6-Feb-21 21:34
Valentinor6-Feb-21 21:34 
GeneralRe: Changing gamma with multiple display setup Pin
Dave Kreskowiak7-Feb-21 4:30
mveDave Kreskowiak7-Feb-21 4:30 
GeneralRe: Changing gamma with multiple display setup Pin
Valentinor7-Feb-21 4:46
Valentinor7-Feb-21 4:46 
GeneralRe: Changing gamma with multiple display setup Pin
Dave Kreskowiak7-Feb-21 6:29
mveDave Kreskowiak7-Feb-21 6:29 
GeneralRe: Changing gamma with multiple display setup Pin
Richard MacCutchan6-Feb-21 5:11
mveRichard MacCutchan6-Feb-21 5:11 
GeneralRe: Changing gamma with multiple display setup Pin
Valentinor6-Feb-21 21:44
Valentinor6-Feb-21 21:44 
QuestionCreating c++ static library that uses 3rd party static libraries. Pin
Maximilien1-Feb-21 9:02
Maximilien1-Feb-21 9:02 
AnswerRe: Creating c++ static library that uses 3rd party static libraries. Pin
Richard MacCutchan1-Feb-21 9:09
mveRichard MacCutchan1-Feb-21 9:09 
GeneralRe: Creating c++ static library that uses 3rd party static libraries. Pin
Maximilien3-Feb-21 3:29
Maximilien3-Feb-21 3:29 
GeneralRe: Creating c++ static library that uses 3rd party static libraries. Pin
Richard MacCutchan3-Feb-21 5:27
mveRichard MacCutchan3-Feb-21 5:27 
AnswerRe: Creating c++ static library that uses 3rd party static libraries. Pin
Mircea Neacsu1-Feb-21 9:11
Mircea Neacsu1-Feb-21 9:11 
Questionc++ Pin
Member 1505868328-Jan-21 4:05
Member 1505868328-Jan-21 4:05 

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.