Re: Is there a way to avoid a client area going white?
You can either use a worker thread as Gary suggested, or duing the load
operation call a message loop.
You can add this function to your application,
void CMyApp::Yeild()
{
MSG Msg;
while (PeekMessage(&Msg,NULL,0,0,PM_REMOVE))
{
if (!PreTranslateMessage(&Msg))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
}
}
Then call it from your loading function periodically.
AfxGetApp()->Yeild();
AliR.
"Juan Dent" <Juan_Dent@nospam.nospam> wrote in message
news:D3AD970E-C800-49AA-A4BC-014D24A72357@microsoft.com...
Hi,
I have this MDI window and a docking pane on the left. When I press
something in the pane, that will load some data from the DB for instance,
it
will take some time. During this time, the pane becomes empty (as if
painted
with white).
This is very annoying. Is there a way to avoid it? After all, there is
nothing really to update in the pane since what will happen is that a new
child frame window will be added to the MDI area. I see no reason for the
pane ever becoming white, don't you...
--
Thanks in advance,
Juan Dent, M.Sc.