First, apologies for this not-so-clear description of my problem...
I'm trying to develop an SDI application (App A) using MFC, VC 5++ Enterprise version. App A monitors how long a totally separate calculation program (App B) has been running.
Several timers indicate elapsed time, the estimated time when App B should finish etc etc.
Whilst App A is running, as soon as I activate another window that covers part of App A's window, that region of App A's window is wiped out, even though in my code every five seconds all the timer displays are updated using UpdateWindow().
Activating App A's window has no effect. It's not that part of the window doesn't update - it's that the _whole_ window doesn't redraw, even though it becomes active.
As soon as App B finishes, App A's timers stop as intended...and at last App A's window updates and fills the screen again.
In other words, in order to see an up-to-date timer output, I cannot activate any other window whilst App A is running, because as soon as I do, App A doesn't redraw until it's finished timing.
My question - does anyone out there know of a simpler way than using multi-threading to update/redraw the whole window whilst the timing is going on ?
Alternatively (the best solution), could someone please let me know where I can find a real "bare bones" MFC template for multi-threading. I took a look at the MS multi-threading sample program and found it way too tricky to try and implement in my own code.
The GDI stays looking up-to-date whilst the main code handles the timers - is this really so difficult to implement or am I missing the obvious ?
I'm pretty new to Experts Exchange, so if you need more points, just say and I'll buy/try and save up some more!
Thanks a lot,