Click here to Skip to main content
15,886,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Bubble sort in CObList Pin
Cedric Moonen14-Dec-10 2:01
Cedric Moonen14-Dec-10 2:01 
GeneralRe: Bubble sort in CObList Pin
mesajflaviu14-Dec-10 2:13
mesajflaviu14-Dec-10 2:13 
GeneralRe: Bubble sort in CObList Pin
Cedric Moonen14-Dec-10 2:18
Cedric Moonen14-Dec-10 2:18 
GeneralRe: Bubble sort in CObList Pin
mesajflaviu14-Dec-10 8:43
mesajflaviu14-Dec-10 8:43 
GeneralRe: Bubble sort in CObList Pin
Rajesh R Subramanian14-Dec-10 19:53
professionalRajesh R Subramanian14-Dec-10 19:53 
GeneralRe: Bubble sort in CObList Pin
mesajflaviu14-Dec-10 21:15
mesajflaviu14-Dec-10 21:15 
GeneralRe: Bubble sort in CObList Pin
thomas.michaud15-Dec-10 3:35
thomas.michaud15-Dec-10 3:35 
AnswerRe: Bubble sort in CObList Pin
Eugen Podsypalnikov14-Dec-10 11:56
Eugen Podsypalnikov14-Dec-10 11:56 
// switch pObj1 and pObj2 between them ... but how ?

Try it Smile | :) :
void SortDrawObjects(CDrawObjList& cList)
{
  for (int i = 0; i < cList.GetCount(); i++) {
    POSITION pos = cList.GetHeadPosition();
    while (pos) {
      POSITION posFirst = pos;
      CDrawObj* pcFirst = cList.GetNext(pos);
      if (pos) {
        POSITION posSecond = pos;
        CDrawObj* pcSecond = cList.GetNext(pos);
        if (pcFirst->m_position.left > pcSecond->m_position.left) {
          cList.SetAt(posFirst, pcSecond);
          cList.SetAt(posSecond, pcFirst);
        }
        pos = posSecond;
      }
    }
  }
}

They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap. Smile | :)

GeneralRe: Bubble sort in CObList Pin
mesajflaviu14-Dec-10 21:14
mesajflaviu14-Dec-10 21:14 
AnswerRe: Bubble sort in CObList Pin
bleedingfingers14-Dec-10 20:27
bleedingfingers14-Dec-10 20:27 
AnswerRe: Bubble sort in CObList Pin
L. Braun14-Dec-10 21:16
L. Braun14-Dec-10 21:16 
GeneralRe: Bubble sort in CObList Pin
mesajflaviu14-Dec-10 23:59
mesajflaviu14-Dec-10 23:59 
AnswerRe: Bubble sort in CObList Pin
Michael Waters15-Dec-10 6:51
Michael Waters15-Dec-10 6:51 
GeneralRe: Bubble sort in CObList Pin
David Crow15-Dec-10 7:59
David Crow15-Dec-10 7:59 
GeneralRe: Bubble sort in CObList Pin
mesajflaviu15-Dec-10 8:40
mesajflaviu15-Dec-10 8:40 
Questionhow to create line graph in vc++? Pin
mathivanaan13-Dec-10 17:25
mathivanaan13-Dec-10 17:25 
AnswerRe: how to create line graph in vc++? Pin
_AnsHUMAN_ 13-Dec-10 17:52
_AnsHUMAN_ 13-Dec-10 17:52 
AnswerRe: how to create line graph in vc++? Pin
RaviRanjanKr13-Dec-10 18:15
professionalRaviRanjanKr13-Dec-10 18:15 
AnswerRe: how to create line graph in vc++? Pin
Cedric Moonen13-Dec-10 20:18
Cedric Moonen13-Dec-10 20:18 
GeneralRe: how to create line graph in vc++? Pin
mathivanaan14-Dec-10 20:13
mathivanaan14-Dec-10 20:13 
AnswerRe: how to create line graph in vc++? Pin
basementman15-Dec-10 3:51
basementman15-Dec-10 3:51 
AnswerRe: how to create line graph in vc++? Pin
SoftwareDeveloperGoa15-Dec-10 9:50
SoftwareDeveloperGoa15-Dec-10 9:50 
QuestionVisulizing Webcam throught browser Pin
Schehaider_Aymen13-Dec-10 8:51
Schehaider_Aymen13-Dec-10 8:51 
AnswerRe: Visulizing Webcam throught browser Pin
Cool_Dev14-Dec-10 1:41
Cool_Dev14-Dec-10 1:41 
GeneralRe: Visulizing Webcam throught browser Pin
Schehaider_Aymen16-Dec-10 10:37
Schehaider_Aymen16-Dec-10 10:37 

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.