Click here to Skip to main content
15,917,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: thread problem Pin
Joaquín M López Muñoz2-Apr-02 8:28
Joaquín M López Muñoz2-Apr-02 8:28 
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 
well, i got it to work where i store each of the members of the class in the loop, but i would much rather just store the CObject derived object directly.. the problem is that if i try to do:
ar << objMyObject

it tells me there is nothing that can handle the << . My CObject derived class has the serialization function. I have tried casting it to a CObject and storing that, but i think im storing the pointer value and not the actual data.. i think i got it to save, but when i load it gives errors for unexpected file format.. i have left out the versioning just for simplicity.. i just need to know how to load and store all of the values from the m_oaStringList (which is of CObArray type)

if (ar.IsStoring())
{
ar << m_oaStringList.GetSize(); // store the size of the array

// loop through and store all data members
for (i = 0; i < m_oaStringList.GetSize(); i++)
{
CObject* pObj = m_oaStringList.GetAt(i);
ar << (&pObj);
}
}
else // is loading
{
int n; // load the size of the array
ar >> n;

// loop through and load all data members
for (i = 0; i < n; i++)
{
CObject* pObj = (CObject*)new CTestObj();
ar >> pObj;
}
}

thanks!

-dz
GeneralRe: Saving a Document with values from dynamic array? Pin
Ravi Bhavnani2-Apr-02 9:08
professionalRavi Bhavnani2-Apr-02 9:08 
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 

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.