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++ Library : Other (not classified elsewhere) » "DoEvents" or "wxSafeYield" equivalent in Upp++
Re: "DoEvents" or "wxSafeYield" equivalent in Upp++ [message #17863 is a reply to message #17860] Sun, 31 August 2008 20:33 Go to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
koldo wrote on Sun, 31 August 2008 13:53

Hello luzr

I have tried this, but it blocks all until the loop ends.
for (int i = 0; i < 100; ++i) {
	Sleep(500);
	Vector<Ctrl *> topCtrls = Ctrl::GetTopCtrls();
	Vector< Ptr<Ctrl> > ctrls = DisableCtrls(topCtrls);
	Ctrl::ProcessEvents();
	EnableCtrls(ctrls);
}


But this simply works perfect. (taking care of avoiding the user to run this code while it is still running).
for (int i = 0; i < 100; ++i) {
	Sleep(500);
	Ctrl::ProcessEvents();
}


Thank you!
Koldo


I thought that "block all" was the purpose of disabling Smile

Note that there is parameter "exclude" in DisableCtrls. Usually, you want to leave something enabled to process cancel messages, right? Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: selected text in other application
Next Topic: U++ suggestions
Goto Forum:
  


Current Time: Mon Aug 25 12:49:05 CEST 2025

Total time taken to generate the page: 0.06144 seconds