Parent repainting problem
-
I have a modal dialog doing lengthing processing, and if the parent window (Form/View app) loses focus, the Parent window is not repainted, and only the animation control on the dialog is repainted. I´ve tried to avoid this using sleep(0), but to no effect. Has anyone any ideas? Thanks phil bum... and I thought I´d got rid of all the bugs :(
-
I have a modal dialog doing lengthing processing, and if the parent window (Form/View app) loses focus, the Parent window is not repainted, and only the animation control on the dialog is repainted. I´ve tried to avoid this using sleep(0), but to no effect. Has anyone any ideas? Thanks phil bum... and I thought I´d got rid of all the bugs :(
-
The problem is I´m working with a Access database using DAO (MFC derived classes), and that is not thread safe. All I am doing is importing values from different tables from one DB to another.Dependent on the size of the data to import, this can take many minutes. I´m having to use do..while loops and this is obviously very CPU intensive. I´ve introduced sleep(0), to break the CPU usage a bit, but still have problems with the Main application painting. I´ve tried using GetParent()->RedrawWindow() from the Modal dialog, and funny enough, in the debug version this works, but when I compile in release, the modal dialog and the Main window are repainted, as long as no other window/app gets the focus. When I change back to my app, so that it has focus, both modal dialog and main app window are just plain white, and when the modal dialog gets focus, the task manager insists that it is not responding, but if I let it run, the task completes successfully. I´m no expert(as you can probably tell), but this has really got me stumped! bum... and I thought I´d got rid of all the bugs :(