Click here to Skip to main content
15,913,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: command line parameters Pin
Gary R. Wheeler25-Jan-07 1:16
Gary R. Wheeler25-Jan-07 1:16 
GeneralRe: command line parameters Pin
Roger Stoltz25-Jan-07 1:46
Roger Stoltz25-Jan-07 1:46 
AnswerRe: command line parameters Pin
Michael Dunn25-Jan-07 8:27
sitebuilderMichael Dunn25-Jan-07 8:27 
GeneralRe: command line parameters Pin
Feralrath25-Jan-07 17:30
Feralrath25-Jan-07 17:30 
QuestionChange Combox properties Pin
feiutm989824-Jan-07 22:56
feiutm989824-Jan-07 22:56 
AnswerRe: Change Combox properties Pin
Nibu babu thomas25-Jan-07 0:15
Nibu babu thomas25-Jan-07 0:15 
AnswerRe: Change Combox properties Pin
Hamid_RT25-Jan-07 20:49
Hamid_RT25-Jan-07 20:49 
QuestionChanging color for stdout and stderr Pin
sachin ahuja24-Jan-07 22:46
sachin ahuja24-Jan-07 22:46 
Hi All
I have made one console application in VC++.Now i want to add different colors for stdout and stdin.
I have used the following code.
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hStdOut , &ConsoleScreenBufferInfoOutPut);
//Setting color for stdout
ConsoleScreenBufferInfoOutPut.wAttributes = FOREGROUND_GREEN;
FillConsoleOutputAttribute(hStdOut , ConsoleScreenBufferInfoOutPut.wAttributes , ConsoleScreenBufferInfoOutPut.dwSize.X*ConsoleScreenBufferInfoOutPut.dwSize.Y,
origin,&dwrite );
SetConsoleTextAttribute(hStdOut ,ConsoleScreenBufferInfoOutPut.wAttributes);

//Setting color for stderr
hStdErr = GetStdHandle(STD_ERROR_HANDLE);
GetConsoleScreenBufferInfo(hStdErr , &ConsoleScreenBufferInfo);
ConsoleScreenBufferInfo.wAttributes = FOREGROUND_RED;
FillConsoleOutputAttribute(hStdErr , ConsoleScreenBufferInfo.wAttributes , ConsoleScreenBufferInfo.dwSize.X*ConsoleScreenBufferInfo.dwSize.Y,
origin,&dwrite );
Using this code I am getting the color for stdout as red.
But I have chosen green color for stdout.
Can anybody help me in this regard?


SetConsoleTextAttribute(hStdErr ,ConsoleScreenBufferInfo.wAttributes);

AnswerRe: Changing color for stdout and stderr Pin
Garth J Lancaster24-Jan-07 23:01
professionalGarth J Lancaster24-Jan-07 23:01 
GeneralRe: Changing color for stdout and stderr Pin
sachin ahuja25-Jan-07 0:12
sachin ahuja25-Jan-07 0:12 
Questionhow to get system files information in vc++?plz help me! Pin
tyjjrtruy4teqye7nyue7qay24-Jan-07 22:36
tyjjrtruy4teqye7nyue7qay24-Jan-07 22:36 
AnswerRe: how to get system files information in vc++?plz help me! Pin
prasad_som24-Jan-07 22:51
prasad_som24-Jan-07 22:51 
QuestionRe: how to get system files information in vc++?plz help me! Pin
David Crow25-Jan-07 3:05
David Crow25-Jan-07 3:05 
AnswerRe: how to get system files information in vc++?plz help me! Pin
Nikhil_Patel1-Feb-07 6:35
Nikhil_Patel1-Feb-07 6:35 
GeneralRe: how to get system files information in vc++?plz help me! Pin
David Crow1-Feb-07 6:45
David Crow1-Feb-07 6:45 
AnswerRe: how to get system files information in vc++?plz help me! Pin
Hamid_RT25-Jan-07 20:49
Hamid_RT25-Jan-07 20:49 
GeneralRe: how to get system files information in vc++?plz help me! Pin
Nikhil_Patel1-Feb-07 6:39
Nikhil_Patel1-Feb-07 6:39 
GeneralRe: how to get system files information in vc++?plz help me! Pin
Hamid_RT1-Feb-07 18:18
Hamid_RT1-Feb-07 18:18 
QuestionLil question Pin
baerten24-Jan-07 22:24
baerten24-Jan-07 22:24 
Questionwrite to txt files Pin
ng4kau124-Jan-07 22:06
ng4kau124-Jan-07 22:06 
AnswerRe: write to txt files Pin
Cedric Moonen24-Jan-07 22:12
Cedric Moonen24-Jan-07 22:12 
AnswerRe: write to txt files Pin
sachin ahuja24-Jan-07 22:50
sachin ahuja24-Jan-07 22:50 
GeneralRe: write to txt files Pin
kakan24-Jan-07 23:25
professionalkakan24-Jan-07 23:25 
QuestionRe: write to txt files Pin
David Crow25-Jan-07 3:04
David Crow25-Jan-07 3:04 
AnswerRe: write to txt files Pin
Hamid_RT25-Jan-07 19:55
Hamid_RT25-Jan-07 19:55 

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.