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

C / C++ / MFC

 
Questionrookie question Pin
Binary011022-Oct-05 17:43
Binary011022-Oct-05 17:43 
AnswerRe: rookie question Pin
Anonymous22-Oct-05 18:55
Anonymous22-Oct-05 18:55 
AnswerRe: rookie question Pin
Anonymous22-Oct-05 19:14
Anonymous22-Oct-05 19:14 
GeneralRe: rookie question Pin
Binary011022-Oct-05 20:22
Binary011022-Oct-05 20:22 
GeneralRe: rookie question Pin
PJ Arends22-Oct-05 20:31
professionalPJ Arends22-Oct-05 20:31 
GeneralRe: rookie question Pin
Anonymous23-Oct-05 3:25
Anonymous23-Oct-05 3:25 
GeneralRe: rookie question Pin
Binary011023-Oct-05 7:42
Binary011023-Oct-05 7:42 
QuestionCObList, MoveTo(), LineTo(), and more Pin
Anonymous22-Oct-05 17:09
Anonymous22-Oct-05 17:09 
I'll try to inform you of my problem in the best way possible. And I think the best way to do that is to show you a little code that goes with it.
<br />
CObList list;  //my list that will hold my CObject<br />
<br />
---------------------------------------<br />
<br />
class CLineAccess : public CObject  // My custom CObject<br />
{<br />
     DECLARE_DYNAMIC( CLineAccess)<br />
<br />
---------------------------------------<br />
<br />
// And here is the section that I am having troubles with.<br />
CLineAccess *temp;<br />
temp = (CLineAccess *)list.GetHead(); //Get the CLA Object<br />
pos  = list.GetHeadPosition();  //Get position<br />
<br />
// Draw the line recieved from the CObList<br />
dc.MoveTo(temp->GetStartX(), temp->GetStartY());<br />
dc.LineTo(temp->GetEndX(), temp->GetEndY());<br />


I then have a while loop that gets all the next lines that I am attempting to draw. The only problem is that it seems my CPaintDC dc(this); only draws the last line in the list. Does MoveTo() erase all the previous lines? I get a return of (1) on every run through of the LineTo() so I know that the lines are being drawn. Being that temp is just a local pointer used to traverse through the list I don't see any problems about reusing it. Do any of you have an idea?
AnswerRe: CObList, MoveTo(), LineTo(), and more Pin
Ravi Bhavnani22-Oct-05 20:31
professionalRavi Bhavnani22-Oct-05 20:31 
AnswerRe: CObList, MoveTo(), LineTo(), and more Pin
PJ Arends22-Oct-05 20:40
professionalPJ Arends22-Oct-05 20:40 
GeneralRe: CObList, MoveTo(), LineTo(), and more Pin
Anonymous23-Oct-05 5:34
Anonymous23-Oct-05 5:34 
AnswerRe: CObList, MoveTo(), LineTo(), and more Pin
Gary R. Wheeler23-Oct-05 1:30
Gary R. Wheeler23-Oct-05 1:30 
Questionabout the array Pin
hhgg22-Oct-05 14:40
hhgg22-Oct-05 14:40 
AnswerRe: about the array Pin
PJ Arends22-Oct-05 16:05
professionalPJ Arends22-Oct-05 16:05 
GeneralRe: about the array Pin
Gary R. Wheeler23-Oct-05 1:36
Gary R. Wheeler23-Oct-05 1:36 
GeneralRe: about the array Pin
hhgg25-Oct-05 7:52
hhgg25-Oct-05 7:52 
Questionwhat is the best way to get html code? Pin
hamavreg22-Oct-05 14:01
hamavreg22-Oct-05 14:01 
Questioncopy folder Pin
stef880322-Oct-05 7:52
stef880322-Oct-05 7:52 
AnswerRe: copy folder Pin
Ravi Bhavnani22-Oct-05 8:12
professionalRavi Bhavnani22-Oct-05 8:12 
GeneralRe: copy folder Pin
stef880322-Oct-05 8:17
stef880322-Oct-05 8:17 
GeneralRe: copy folder Pin
Ravi Bhavnani22-Oct-05 8:24
professionalRavi Bhavnani22-Oct-05 8:24 
GeneralRe: copy folder Pin
stef880322-Oct-05 8:31
stef880322-Oct-05 8:31 
GeneralRe: copy folder Pin
Ravi Bhavnani22-Oct-05 8:42
professionalRavi Bhavnani22-Oct-05 8:42 
GeneralRe: copy folder Pin
stef880322-Oct-05 9:08
stef880322-Oct-05 9:08 
GeneralRe: copy folder Pin
Ravi Bhavnani22-Oct-05 13:43
professionalRavi Bhavnani22-Oct-05 13:43 

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.