Subj : Re: Dialog painting To : borland.public.cpp.borlandcpp From : Sebastian Ledesma Date : Mon Mar 21 2005 10:06 am Hello Betkro: You can do something like this: void SafeYield() { MSG msg; if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } } int MyLongRunningFunction(....) { static int semaforo; if (semaforo) return; semaforo=1; while (processing) { SafeYield(); ... } semaforo=0; return result; } Saludos Sebastian "Betkro" escribió en el mensaje news:423d8b67$1@newsgroups.borland.com... > Hi, > I have a slow processing function in a dialog that begins after a MessageBox > confirmation. The MessageBox and overlapped region are repainted after the > function ends. Now, how can I repaint the dialog window before that? . > Thanks, > betkro > > .