Subj : Re: Dialog painting To : borland.public.cpp.borlandcpp From : Jeff Kish Date : Mon Mar 21 2005 09:45 am Wait.. can't you just put a pumpwaitingmessages call into your loop (if you have one) in your lengthy processing? On Mon, 21 Mar 2005 10:06:28 -0300, "Sebastian Ledesma" wrote: >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 >> >> > Jeff Kish .