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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dialog box problem

Status
Not open for further replies.

paul51

Programmer
May 19, 2000
38
US
I have a dialog based program that seems to work well. The program takes about 5 minutes to run, and continually updates edit boxes with values. The problem I am having is that when I switch to another application, and then come back to the running program, the dialog box is greyed out, and the edit boxes don't update. When the program is finished running, the 'greying' of the dialog goes away, and the edit boxes display the correct values. I have tried many different options, but it seems like multitasking bogs the dialog down. Any ideas to have the dialog not greyed out when switching to different programs?
Thanks.
 
If You do not use multitasking, the easeast way to avoid it - periodically call RedrawWindow().
 
Hi

Another way is calling the function PeekMessage in the loop
that update your edit controls:

static MSG msg;

while ( ::peekMessage( &msg,NULL,0,0,PM_NOREMOVE))
{
if ( !AfxGetApp()->PumpMessage())
{
::postQuitMessage( 0);
return FALSE; // optional
}
}

return TRUE; //optional

HTH

Thierry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top