Click here to Skip to main content
15,909,747 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I get recurring events from holding a button down? Pin
enhzflep18-Sep-11 10:38
enhzflep18-Sep-11 10:38 
GeneralRe: How do I get recurring events from holding a button down? Pin
doug2519-Sep-11 4:03
doug2519-Sep-11 4:03 
GeneralRe: How do I get recurring events from holding a button down? Pin
enhzflep19-Sep-11 4:12
enhzflep19-Sep-11 4:12 
GeneralRe: How do I get recurring events from holding a button down? Pin
Code-o-mat18-Sep-11 22:12
Code-o-mat18-Sep-11 22:12 
QuestionReading problem Pin
manju 317-Sep-11 18:40
manju 317-Sep-11 18:40 
AnswerRe: Reading problem Pin
Erudite_Eric17-Sep-11 20:59
Erudite_Eric17-Sep-11 20:59 
AnswerRe: Reading problem Pin
«_Superman_»18-Sep-11 4:14
professional«_Superman_»18-Sep-11 4:14 
AnswerRe: Reading problem Pin
CPallini18-Sep-11 22:01
mveCPallini18-Sep-11 22:01 
You must specify the end-of-line in the fscanf format string and, as the superhero already pointed out, you cannot use CStrings that way, try:
C++
FILE *p;
CString first,second;
p = fopen("E:\\Test.txt","r");
assert(p);
first.GetBuffer(MAX_PATH); // make room for the fscanf result
second.GetBuffer(MAX_PATH); // " "
assert(first.GetAllocLength()== MAX_PATH && second.GetAllocLength()==MAX_PATH);
fscanf(p,"FirstName=%s\n",first);
fscanf(p,"SecondName=%s\n",second);
first.ReleaseBuffer();
second.ReleaseBuffer();
AfxMessageBox(first);
AfxMessageBox(second);

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

QuestionRe: Reading problem Pin
David Crow19-Sep-11 3:24
David Crow19-Sep-11 3:24 
QuestionHow to handle Column Click in a multi column list box Pin
Amrit Agr17-Sep-11 1:41
Amrit Agr17-Sep-11 1:41 
QuestionRe: How to handle Column Click in a multi column list box Pin
Richard MacCutchan17-Sep-11 3:03
mveRichard MacCutchan17-Sep-11 3:03 
AnswerRe: How to handle Column Click in a multi column list box Pin
Amrit Agr18-Sep-11 19:25
Amrit Agr18-Sep-11 19:25 
GeneralRe: How to handle Column Click in a multi column list box Pin
Richard MacCutchan18-Sep-11 23:04
mveRichard MacCutchan18-Sep-11 23:04 
GeneralRe: How to handle Column Click in a multi column list box Pin
David Crow19-Sep-11 3:26
David Crow19-Sep-11 3:26 
GeneralRe: How to handle Column Click in a multi column list box Pin
Richard MacCutchan19-Sep-11 4:00
mveRichard MacCutchan19-Sep-11 4:00 
GeneralRe: How to handle Column Click in a multi column list box Pin
David Crow19-Sep-11 4:40
David Crow19-Sep-11 4:40 
JokeRe: How to handle Column Click in a multi column list box Pin
Richard MacCutchan19-Sep-11 5:04
mveRichard MacCutchan19-Sep-11 5:04 
AnswerRe: How to handle Column Click in a multi column list box - caution long post Pin
enhzflep19-Sep-11 15:41
enhzflep19-Sep-11 15:41 
QuestionShellExecuteEx for windows7 Pin
MKC00216-Sep-11 22:47
MKC00216-Sep-11 22:47 
AnswerRe: ShellExecuteEx for windows7 Pin
Software_Developer17-Sep-11 10:53
Software_Developer17-Sep-11 10:53 
AnswerRe: ShellExecuteEx for windows7 Pin
Philippe Mori17-Sep-11 14:27
Philippe Mori17-Sep-11 14:27 
GeneralRe: ShellExecuteEx for windows7 Pin
MKC00219-Sep-11 7:00
MKC00219-Sep-11 7:00 
QuestionRe: ShellExecuteEx for windows7 Pin
David Crow19-Sep-11 8:07
David Crow19-Sep-11 8:07 
AnswerRe: ShellExecuteEx for windows7 Pin
MKC00220-Sep-11 6:58
MKC00220-Sep-11 6:58 
QuestionRe: ShellExecuteEx for windows7 Pin
David Crow20-Sep-11 9:15
David Crow20-Sep-11 9:15 

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.