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

C / C++ / MFC

 
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 
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 
PJ Arends wrote:
Can you show the code for that loop? It almost seems to me that you are drawing the same line over and over again.


I'll do even better than that Smile | :) here is everything from my function:

<br />
void LoadAndDrawLines(void)<br />
{<br />
     CPaintDC dc(this);<br />
     CPen pen;<br />
     pen.CreatePen(PS_SOLID, 1, 0x00FF0000);<br />
     dc.SelectObject(&pen);<br />
     CLineAccess *temp;<br />
     int x = 1;<br />
     POSITION pos;<br />
<br />
     if(list.GetCount() > 0)<br />
     {<br />
          temp = (CLineAccess *)list.GetHead();<br />
          pos = list.GetHeadPosition();<br />
          dc.MoveTo(temp->GetStartX(), temp->GetStartY());<br />
          dc.LineTo(temp->GetEndX(), temp->GetEndY());<br />
          while(x < list.GetCount())<br />
          {<br />
               temp = (CLineAccess *)list.GetNext(pos);<br />
               dc.MoveTo(temp->GetStartX(), temp->GetStartY());<br />
               dc.LineTo(temp->GetEndX(), temp->GetEndY());<br />
               x++;<br />
          }<br />
     }<br />
}<br />


LoadAndDrawLines() is called by OnPaint() btw. Also I will clean it up a bit later and move out all the pen stuff and more. Thanks for your help everyone Smile | :)
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 
GeneralRe: copy folder Pin
Michael Dunn22-Oct-05 8:32
sitebuilderMichael Dunn22-Oct-05 8:32 
GeneralRe: copy folder Pin
stef880322-Oct-05 23:19
stef880322-Oct-05 23:19 
QuestionI want to learn vc++ Pin
yashmitl22-Oct-05 7:11
yashmitl22-Oct-05 7:11 

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.