Click here to Skip to main content
16,008,469 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Testing which OS I'm on Pin
Michael Dunn9-Jul-04 10:05
sitebuilderMichael Dunn9-Jul-04 10:05 
GeneralRe: Testing which OS I'm on Pin
ThatsAlok9-Jul-04 19:25
ThatsAlok9-Jul-04 19:25 
Generaladding help to application Pin
BlackDice9-Jul-04 6:10
BlackDice9-Jul-04 6:10 
GeneralRe: adding help to application Pin
David Crow9-Jul-04 7:03
David Crow9-Jul-04 7:03 
GeneralRe: adding help to application Pin
BlackDice9-Jul-04 7:11
BlackDice9-Jul-04 7:11 
Generalfullscreening a dialog Pin
locoone9-Jul-04 4:47
locoone9-Jul-04 4:47 
GeneralRe: fullscreening a dialog Pin
Timothy Grabrian9-Jul-04 6:02
professionalTimothy Grabrian9-Jul-04 6:02 
GeneralCPtrList Pin
Mahendra_7869-Jul-04 4:46
Mahendra_7869-Jul-04 4:46 
Hi,
I am trying to iterate and delete the elements (assuming atleast 1 element) in a CptrList with this:

void *pPt = NULL;
POSITION pos = NULL;
for (pos = m_points.GetHeadPosition(); !m_points.IsEmpty(); m_points.GetNext(pos)) {
// TRACE("pos: %d, %d\n", pos, NULL);
pPt = m_points.GetAt(pos);
m_points.RemoveAt(pos);
delete pPt;
}

TRACE shows that pos is not equal to NULL as it should be after the last element has been seen.
So pos != NULL check does not work contrary to the MSDN Library documentation. THIS IS ONE PROBLEM.
The OTHER is even if there are more than 1 elements the second element returned by GetAt is not
"valid" (0xcdcdcdcd) and RemoveAt asserts.
Any clues?

Regards
Mahendra
GeneralRe: CPtrList Pin
Navin9-Jul-04 5:10
Navin9-Jul-04 5:10 
GeneralRe: CPtrList Pin
Mahendra_7869-Jul-04 6:12
Mahendra_7869-Jul-04 6:12 
GeneralRe: CPtrList Pin
Gary R. Wheeler10-Jul-04 2:38
Gary R. Wheeler10-Jul-04 2:38 
GeneralListBox activex Pin
Peter Toss9-Jul-04 4:16
sussPeter Toss9-Jul-04 4:16 
GeneralRe: ListBox activex Pin
Jeffrey Walton14-Jul-04 12:59
Jeffrey Walton14-Jul-04 12:59 
GeneralSimulation:- Rings moving out from points with some delay & store sim. to movie file Pin
JHAKAS9-Jul-04 4:04
JHAKAS9-Jul-04 4:04 
General"calling" a dialog box Pin
Keck9-Jul-04 4:04
Keck9-Jul-04 4:04 
GeneralRe: "calling" a dialog box Pin
David Crow9-Jul-04 4:57
David Crow9-Jul-04 4:57 
GeneralRe: "calling" a dialog box Pin
Maximilien9-Jul-04 5:36
Maximilien9-Jul-04 5:36 
Generalscript on this page .. Pin
Marian779-Jul-04 3:10
Marian779-Jul-04 3:10 
QuestionHow to Create SetUP of my Application Pin
Zeeshan Bilal9-Jul-04 1:39
Zeeshan Bilal9-Jul-04 1:39 
AnswerRe: How to Create SetUP of my Application Pin
palbano9-Jul-04 5:33
palbano9-Jul-04 5:33 
AnswerRe: How to Create SetUP of my Application Pin
valikac9-Jul-04 5:55
valikac9-Jul-04 5:55 
GeneralHOW: same menu - diffrent views Pin
JabraJabra9-Jul-04 1:23
JabraJabra9-Jul-04 1:23 
GeneralRe: HOW: same menu - diffrent views Pin
BlackDice9-Jul-04 6:18
BlackDice9-Jul-04 6:18 
GeneralDialog Disappear on pressing Escape key Pin
Zeeshan Bilal9-Jul-04 0:53
Zeeshan Bilal9-Jul-04 0:53 
GeneralRe: Dialog Disappear on pressing Escape key Pin
Johan Rosengren9-Jul-04 1:00
Johan Rosengren9-Jul-04 1:00 

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.