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 » Draw, Display, Images, Bitmaps, Icons » Draw stuff [SOLVED]
Re: Draw stuff [message #14072 is a reply to message #14069] Fri, 08 February 2008 17:00 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
void Start(  )
{
	int itMaxNumber = 40;
	
	while( it < itMaxNumber )
	{
		MyDraw(  );
                ProcessEvents();
		it++;
	}
}

Refresh sends a Paint event (kind of), and you need to call ProcessEvents to catch it and redraw the screen before the next iteration (you may want a delay in there as well). In this case you don't need to call Refresh() because it's called in ImageCtrl::SetImage.

This might be a better solution though:
void Start()
{
   it = 0;
   SetTimeCallback(-50 THISBACK(MyDraw));
}

void MyDraw()
{
	...
	if (it >= itMaxCount)
		KillTimeCallback();
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Optimized storage of 1BPP images
Next Topic: Drawing and scrolling
Goto Forum:
  


Current Time: Thu Aug 21 08:03:21 CEST 2025

Total time taken to generate the page: 0.06101 seconds