Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dialog refresh

Status
Not open for further replies.

Lorey

Programmer
Feb 16, 2003
88
SG
Hi experts!

May I ask what's the solution if, whenever i minimize and restore the dialog, the dialog takes time to load all the controls. I gives me gray dialog at first.

how to prevent this to happen. I know I have lots of things doing at the background.
 
Don't mix your processing, data and graphical display.

One solution is to have a common data structure which is shared between the two threads. The processing thread retrieves data from the store and dumps it back into the store. You might need a sleep or yield somewhere to stop it hogging the CPU.

The display thread just grabs data from the store and displays it. It doesn't do any processing at all. That way, the graphics is independent of the processing and you don't end up with big grey rectangles.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top