Click here to Skip to main content
16,012,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help ambiguous call to overloaded function Pin
David Crow10-Feb-04 5:10
David Crow10-Feb-04 5:10 
GeneralRe: help ambiguous call to overloaded function Pin
Ian Darling9-Feb-04 5:27
Ian Darling9-Feb-04 5:27 
GeneralRe: help ambiguous call to overloaded function Pin
jackalwisdom9-Feb-04 13:51
jackalwisdom9-Feb-04 13:51 
GeneralPlaying avi video and reading video time Pin
Riyoku9-Feb-04 4:46
Riyoku9-Feb-04 4:46 
GeneralUnable to capture ENTER key on a CEdit Control Pin
rpadrela9-Feb-04 4:34
rpadrela9-Feb-04 4:34 
GeneralRe: Unable to capture ENTER key on a CEdit Control Pin
ceuba9-Feb-04 4:52
ceuba9-Feb-04 4:52 
GeneralRe: Unable to capture ENTER key on a CEdit Control Pin
David Crow9-Feb-04 5:27
David Crow9-Feb-04 5:27 
GeneralCArchive - Reading strings Pin
Anonymous9-Feb-04 4:25
Anonymous9-Feb-04 4:25 
Hello!

I have written an object to CArchive. My object consists of a CString and an integer. I gave up using the CArchive::WriteString() and CArchive::ReadString() functions as it seems CArchive can only handle simple types. So I write my object like this:

nLength = myStr.GetLength();
(*pArchive) << nLength;
pArchive->Write(myStr.GetBuffer(nLength), nLength);


To read back my object is not as easy as I think it should be:

CString tmpStr, myStr;
(*pArchive) >> nLength;
tmpStr.Empty();
pArchive->Read(tmpStr.GetBuffer(nLength), nLength);
myStr.Format("%s", tmpStr);
tmpStr.ReleaseBuffer();

Can anyone suggest an easier way? Thank you Smile | :)
GeneralRe: CArchive - Reading strings Pin
Ravi Bhavnani9-Feb-04 5:32
professionalRavi Bhavnani9-Feb-04 5:32 
GeneralRe: CArchive - Reading strings Pin
Anonymous9-Feb-04 23:19
Anonymous9-Feb-04 23:19 
GeneralRe: CArchive - Reading strings Pin
Ravi Bhavnani10-Feb-04 2:44
professionalRavi Bhavnani10-Feb-04 2:44 
GeneralMemory Leak Finder Pin
[James Pullicino]9-Feb-04 4:09
[James Pullicino]9-Feb-04 4:09 
GeneralRe: Memory Leak Finder Pin
Rickard Andersson209-Feb-04 4:29
Rickard Andersson209-Feb-04 4:29 
GeneralRe: Memory Leak Finder Pin
Alexander M.,9-Feb-04 7:25
Alexander M.,9-Feb-04 7:25 
QuestionHow to use RegSaveKey? Pin
Anonymous9-Feb-04 3:45
Anonymous9-Feb-04 3:45 
AnswerRe: How to use RegSaveKey? Pin
David Crow9-Feb-04 5:33
David Crow9-Feb-04 5:33 
GeneralData from one dlg to another Pin
Ashman9-Feb-04 3:21
Ashman9-Feb-04 3:21 
GeneralRe: Data from one dlg to another Pin
Michael P Butler9-Feb-04 3:31
Michael P Butler9-Feb-04 3:31 
GeneralHello Help pls !!! Multiple View for a document .. Pin
itmpras9-Feb-04 2:38
itmpras9-Feb-04 2:38 
GeneralRe: Hello Help pls !!! Multiple View for a document .. Pin
Michael P Butler9-Feb-04 3:35
Michael P Butler9-Feb-04 3:35 
GeneralProblems by getting current sel Item - Outlook Pin
johnxx9-Feb-04 2:36
johnxx9-Feb-04 2:36 
GeneralRe: Problems by getting current sel Item - Outlook Pin
johnxx9-Feb-04 5:32
johnxx9-Feb-04 5:32 
GeneralScrollBar on MCIWindows Pin
Member 5252199-Feb-04 1:44
Member 5252199-Feb-04 1:44 
Questionhelp!~Who can show a code of simulate network server? Pin
artliu5209-Feb-04 0:27
artliu5209-Feb-04 0:27 
AnswerRe: help!~Who can show a code of simulate network server? Pin
Ravi Bhavnani9-Feb-04 2:23
professionalRavi Bhavnani9-Feb-04 2:23 

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.