Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Need Help with ShellExecute Pin
Michael Dunn31-Dec-05 10:50
sitebuilderMichael Dunn31-Dec-05 10:50 
AnswerRe: Need Help with ShellExecute Pin
Klerik822-Jan-06 13:03
Klerik822-Jan-06 13:03 
QuestionMFC Serialization Questions.. Pin
montiee30-Dec-05 6:09
montiee30-Dec-05 6:09 
AnswerRe: MFC Serialization Questions.. Pin
Ravi Bhavnani30-Dec-05 6:59
professionalRavi Bhavnani30-Dec-05 6:59 
GeneralRe: MFC Serialization Questions.. Pin
Garth J Lancaster30-Dec-05 15:35
professionalGarth J Lancaster30-Dec-05 15:35 
GeneralRe: MFC Serialization Questions.. Pin
montiee30-Dec-05 16:54
montiee30-Dec-05 16:54 
GeneralRe: MFC Serialization Questions.. Pin
Ravi Bhavnani31-Dec-05 5:14
professionalRavi Bhavnani31-Dec-05 5:14 
AnswerRe: MFC Serialization Questions.. Pin
ToxickZero30-Dec-05 9:34
ToxickZero30-Dec-05 9:34 
One of the ways that I've gotten around this is by outputting the number of elements in the list before outputting the list. Then reading that number at load time to see how many elements are getting ready to get read:

int numElements;

    if( ar.IsStoring() )
    {
        numElements = _yourList.GetCount();
        ar << numElements;

        POSITION pos = _yourList.GetHeadPosition();
        while( pos )
        {
            YourType currElement = _yourList.GetNext( pos );
            currElement.Serialize( ar );
        }
    }
    else
    {
        _yourList.RemoveAll();  // clear list

        ar >> numElements;      // get number of forthcoming elements
        for( int i = 0; i < numElements; ++i )
        {
            YourType newElement;
            newElement.Serialize( ar );

            _yourList.AddTail( newElement );
        }
    }


That's untested code, but you should get the idea.

-- modified at 15:34 Friday 30th December, 2005
GeneralRe: MFC Serialization Questions.. Pin
montiee30-Dec-05 17:04
montiee30-Dec-05 17:04 
AnswerRe: MFC Serialization Questions.. Pin
Cliff Hatch1-Jan-06 0:53
Cliff Hatch1-Jan-06 0:53 
GeneralRe: MFC Serialization Questions.. Pin
Cliff Hatch2-Jan-06 0:54
Cliff Hatch2-Jan-06 0:54 
QuestionHow to resize child window Pin
shivditya30-Dec-05 5:24
shivditya30-Dec-05 5:24 
AnswerRe: How to resize child window Pin
John R. Shaw31-Dec-05 18:55
John R. Shaw31-Dec-05 18:55 
Questionfile transfer time prblm Pin
Orell30-Dec-05 2:24
Orell30-Dec-05 2:24 
AnswerRe: file transfer time prblm Pin
Prakash Nadar30-Dec-05 5:14
Prakash Nadar30-Dec-05 5:14 
QuestionHow to check the config Pin
nripun30-Dec-05 2:11
nripun30-Dec-05 2:11 
AnswerRe: How to check the config Pin
sunit530-Dec-05 2:28
sunit530-Dec-05 2:28 
GeneralRe: How to check the config Pin
sunit530-Dec-05 2:33
sunit530-Dec-05 2:33 
GeneralRe: How to check the config Pin
nripun30-Dec-05 2:41
nripun30-Dec-05 2:41 
GeneralRe: How to check the config Pin
sunit530-Dec-05 2:58
sunit530-Dec-05 2:58 
GeneralRe: How to check the config Pin
nripun30-Dec-05 5:23
nripun30-Dec-05 5:23 
GeneralRe: How to check the config Pin
sunit530-Dec-05 3:18
sunit530-Dec-05 3:18 
QuestionHow help file(.hlp) can be integrated in my program Pin
mikobi30-Dec-05 1:46
mikobi30-Dec-05 1:46 
QuestionOLE 2.0 DB Problem Pin
ShelJo30-Dec-05 1:39
ShelJo30-Dec-05 1:39 
QuestionTo open com port thrugh window CE emulator Pin
birajendu30-Dec-05 1:25
birajendu30-Dec-05 1:25 

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.