Xref: news2.mv.net comp.os.msdos.djgpp:3645 From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro and Dialogues Date: Thu, 9 May 1996 16:04:40 +0100 Organization: The University of York, UK Lines: 27 Message-ID: NNTP-Posting-Host: tower.york.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <4mrm0s$2qc@frodo.smartlink.net> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Thu, 9 May 1996, Nicholas Marrone wrote: > I figured this problem out. I've discovered that once Allegro calls > the do_dialog function, it just keeps on going through the dialogs in > it's free time. So, if in one of the dialog functions you are > displaying something, it will re-draw it every time it goes through > the dialog. I've solved it by only having it draw if a flag is set. Umm... not exactly :-) It is true that the Allegro dialog manager calls all the dialog procedures pretty often, but you shouldn't be doing any drawing when they are called. One of the parameters the dialog manager gives to your object is an 'int msg' that tells you what is happenning and what you are supposed to do. You should only be drawing stuff if msg==MSG_DRAW, and MSG_DRAW is only sent when the dialog starts up, or if some other object requests that it get redrawn. When Allegro has nothing better to do, it sends a lot of MSG_IDLE's, but you should just ignore these. /* * Shawn Hargreaves. Why is 'phonetic' spelt with a ph? * Check out Allegro and FED on http://www.york.ac.uk/~slh100/ */