Click here to Skip to main content
16,014,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralOCX uUid collision nightmare Pin
megaadam2-Apr-02 7:39
professionalmegaadam2-Apr-02 7:39 
GeneralRe: OCX uUid collision nightmare Pin
Derek Waters2-Apr-02 12:29
Derek Waters2-Apr-02 12:29 
QuestionSaving a Document with values from dynamic array? Pin
dazinith2-Apr-02 6:28
dazinith2-Apr-02 6:28 
AnswerRe: Saving a Document with values from dynamic array? Pin
Ravi Bhavnani2-Apr-02 6:43
professionalRavi Bhavnani2-Apr-02 6:43 
GeneralRe: Saving a Document with values from dynamic array? Pin
dazinith2-Apr-02 8:07
dazinith2-Apr-02 8:07 
GeneralRe: Saving a Document with values from dynamic array? Pin
Ravi Bhavnani2-Apr-02 8:22
professionalRavi Bhavnani2-Apr-02 8:22 
GeneralRe: Saving a Document with values from dynamic array? Pin
dazinith2-Apr-02 8:41
dazinith2-Apr-02 8:41 
GeneralRe: Saving a Document with values from dynamic array? Pin
Ravi Bhavnani2-Apr-02 9:08
professionalRavi Bhavnani2-Apr-02 9:08 
You're close. There are 2 changes I suggest you make:

  1. Write a serialize (CArchive& ar) method for your object. The method will simply serialize the data members of the object (using the << and >> operators). Call this serialize() method instead of doing "ar << pObj" or "ar >≶ pObj". In other words, do "pObj->serialize (ar);" instead.

  2. When deserializing (reading in), you should set the size of the CObArray before adding members to it. Then, as you deserialize each object (again by simply calling its serialize() method to read itself in), put the object in the CObArray's appropriate slot.
/ravi

"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
GeneralRe: Saving a Document with values from dynamic array? Pin
dazinith2-Apr-02 11:33
dazinith2-Apr-02 11:33 
GeneralRe: Saving a Document with values from dynamic array? Pin
Ravi Bhavnani2-Apr-02 11:50
professionalRavi Bhavnani2-Apr-02 11:50 
GeneralRe: Saving a Document with values from dynamic array? Pin
dazinith3-Apr-02 3:10
dazinith3-Apr-02 3:10 
GeneralRe: Saving a Document with values from dynamic array? Pin
Ravi Bhavnani3-Apr-02 3:15
professionalRavi Bhavnani3-Apr-02 3:15 
Questionhow to create a imput mask? Pin
jafrazee2-Apr-02 5:39
jafrazee2-Apr-02 5:39 
AnswerRe: how to create a imput mask? Pin
Chris Losinger2-Apr-02 5:37
professionalChris Losinger2-Apr-02 5:37 
AnswerRe: how to create a imput mask? Pin
dazinith2-Apr-02 6:38
dazinith2-Apr-02 6:38 
GeneralRe: how to create a imput mask? Pin
Jon Hulatt2-Apr-02 23:37
Jon Hulatt2-Apr-02 23:37 
GeneralRe: how to create a imput mask? Pin
dazinith3-Apr-02 3:07
dazinith3-Apr-02 3:07 
Generalicons Pin
tom harwood2-Apr-02 5:30
tom harwood2-Apr-02 5:30 
GeneralRe: icons Pin
lucy2-Apr-02 6:34
lucy2-Apr-02 6:34 
GeneralRe: icons Pin
Shog92-Apr-02 11:59
sitebuilderShog92-Apr-02 11:59 
GeneralRe: icons Pin
moliate2-Apr-02 12:35
moliate2-Apr-02 12:35 
Questionsomething wrong with code??? Pin
Rajveer2-Apr-02 5:07
Rajveer2-Apr-02 5:07 
AnswerRe: something wrong with code??? Pin
Hans Ruck2-Apr-02 5:19
Hans Ruck2-Apr-02 5:19 
GeneralRe: something wrong with code??? Pin
Rajveer2-Apr-02 5:48
Rajveer2-Apr-02 5:48 
AnswerRe: something wrong with code??? Pin
dlhson2-Apr-02 5:22
dlhson2-Apr-02 5:22 

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.