Click here to Skip to main content
15,921,156 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Clear screen Pin
Maximilien21-Dec-06 7:54
Maximilien21-Dec-06 7:54 
GeneralRe: Clear screen Pin
ggreekggod21-Dec-06 8:26
ggreekggod21-Dec-06 8:26 
GeneralRe: Clear screen Pin
David Crow21-Dec-06 8:55
David Crow21-Dec-06 8:55 
QuestionSaving CObArray objects containing CObArray objects Pin
Ben Aldhouse21-Dec-06 6:27
Ben Aldhouse21-Dec-06 6:27 
QuestionRe: Saving CObArray objects containing CObArray objects Pin
prasad_som21-Dec-06 18:58
prasad_som21-Dec-06 18:58 
AnswerRe: Saving CObArray objects containing CObArray objects [modified] Pin
Ben Aldhouse22-Dec-06 3:18
Ben Aldhouse22-Dec-06 3:18 
GeneralRe: Saving CObArray objects containing CObArray objects Pin
Ben Aldhouse22-Dec-06 3:28
Ben Aldhouse22-Dec-06 3:28 
AnswerRe: Saving CObArray objects containing CObArray objects Pin
Ben Aldhouse23-Mar-07 21:37
Ben Aldhouse23-Mar-07 21:37 
I've got this sorted out now. The full solution to the problem is written up here. Looking at the above message, it seems to me that, at the time, my mistake was in the CNode::Serialize function where I had simply tried to serialize the CObArray object (of sub nodes) with the insertion and extraction operators along with the other node object members. The way to get this to work, it turns out, is to not treat the collection of sub nodes like the other node object members but instead call its CObArray serialization function. Hence the node object serialization function looks like this:

void CNode::Serialize(CArchive &ar)
{
    // Call the ancestor function
    CSubNode::Serialize(ar);

    int iNoSubNodes = 0;

    // Are we writing?
    if (ar.IsStoring())
    {
        // Get the number of sub nodes
        iNoSubNodes = m_oaSubNodes.GetSize();

            // Write variables in order
        ar << m_iSubNodePosition << m_strString << iNoSubNodes;
    }
    else
            // Read variables in order
        ar >> m_iSubNodePosition >> m_strString >> iNoSubNodes;

    // Serialize the array of sub nodes
    m_oaSubNodes.Serialize(ar);

}

QuestionAssign file type to an application in Windows Pin
VeRtRX21-Dec-06 5:27
VeRtRX21-Dec-06 5:27 
AnswerRe: Assign file type to an application in Windows Pin
David Crow21-Dec-06 5:48
David Crow21-Dec-06 5:48 
AnswerRe: Assign file type to an application in Windows Pin
James R. Twine21-Dec-06 8:58
James R. Twine21-Dec-06 8:58 
AnswerRe: Assign file type to an application in Windows Pin
Cristian Amarie26-Dec-06 6:45
Cristian Amarie26-Dec-06 6:45 
Questioncreate a constructor for a struct Pin
cy163@hotmail.com21-Dec-06 5:07
cy163@hotmail.com21-Dec-06 5:07 
AnswerRe: create a constructor for a struct Pin
James R. Twine21-Dec-06 5:12
James R. Twine21-Dec-06 5:12 
AnswerRe: create a constructor for a struct Pin
Maximilien21-Dec-06 5:27
Maximilien21-Dec-06 5:27 
GeneralRe: create a constructor for a struct Pin
cy163@hotmail.com21-Dec-06 5:38
cy163@hotmail.com21-Dec-06 5:38 
GeneralRe: create a constructor for a struct Pin
David Crow21-Dec-06 5:46
David Crow21-Dec-06 5:46 
GeneralRe: create a constructor for a struct Pin
cy163@hotmail.com21-Dec-06 5:58
cy163@hotmail.com21-Dec-06 5:58 
GeneralRe: create a constructor for a struct Pin
David Crow21-Dec-06 7:08
David Crow21-Dec-06 7:08 
GeneralRe: create a constructor for a struct Pin
James R. Twine21-Dec-06 8:42
James R. Twine21-Dec-06 8:42 
GeneralRe: create a constructor for a struct Pin
David Crow21-Dec-06 8:53
David Crow21-Dec-06 8:53 
GeneralRe: create a constructor for a struct Pin
James R. Twine21-Dec-06 9:16
James R. Twine21-Dec-06 9:16 
GeneralRe: create a constructor for a struct Pin
markkuk21-Dec-06 5:47
markkuk21-Dec-06 5:47 
AnswerRe: create a constructor for a struct Pin
VonHagNDaz21-Dec-06 5:32
VonHagNDaz21-Dec-06 5:32 
AnswerRe: create a constructor for a struct Pin
krmed21-Dec-06 5:48
krmed21-Dec-06 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.