Home > Software engineering >  How to make the loop in the application to perform every few seconds, is the time interval between e
How to make the loop in the application to perform every few seconds, is the time interval between e

Time:10-25

This several genius new MFC, now at bubble sort, and I want every time the results of the digital switching position covering the original results and display, and displays also has the certain time interval,
Even the concrete process of bubble sort to the user, how to do it, consult

CodePudding user response:

Is to see every sort results displayed? Many display controls, such as listcontrol

CodePudding user response:

Such as the six,1,2,3,4,5
After the first exchange become 1,6,2,3,4,5
(at this point 6,1,2,3,4,5 has disappeared, replaced by 1,6,2,3,4,5, they in the same place display)

CodePudding user response:

Is the graphical presentation of sorting process, generally is redrawn, or refresh window, want to delay can Sleep, don't want to use the Sleep can do with the way to get the system time,

CodePudding user response:

Use a timer SetTimer, every fixed period of time, OnTimer () out of order, call InvalidateRect, in OnPaint (in) drawing graphics

CodePudding user response:

Hi, it is learning to program is headed in the wrong direction, our textbooks are to teach us from algorithm development, but in fact I think a good way from actually writing a simple program to start, and then a little familiar with computer programming, and then to write what bubble program and so on
  • Related