Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » is there a function to stop the program N milliseconds?
Re: is there a function to stop the program N milliseconds? [message #11977 is a reply to message #11854] Fri, 05 October 2007 22:39 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1207
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Fri, 28 September 2007 11:41



Sleep(1000) is possible, but it will completely freeze your code for 1 second, including repainting.

I think you should rather use timer for this...

Mirek


Hello,

in my code I used Sleep(500)
...
  for (int i=0; i<arrlog.GetCount(); i++)
      { arrlog.SetCursor(i); // bool sel = true).SetCursor(i);
        Sleep(500);
      }
...

I wanted to move the cursor in turn on the rows of the array to trigger some action somewhere else. Instead I couldn't see anything except the final result when the cursor was in the last row. So I lost all the intermediate steps.
Then I decided to try 'timer' but what is it? Navigate suggest me only

void Ctrl::TimerProc(dword time)

how to use it? I just want to pause the program a fraction of second during the movement of the cursor of the arrayctrl.
Thanks.
Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Crash on LoadFromFile
Next Topic: How to read file into Memory
Goto Forum:
  


Current Time: Sun Jul 06 16:25:56 CEST 2025

Total time taken to generate the page: 0.03199 seconds