I have two modal dialogs and each dialog has one edit box. I am creating these dialog boxes in two separate threads. But sometimes when these dialog boxes become visible, both edit boxes are showing a blinking cursor and both windows are appearing active – which means that the title bars of both windows are appearing blue. I am not able to work out why this behaviour is being shown by the dialogs.
Can anyone help me in pointing out where I might be wrong??
Separate threads are separately schedulable, so unless the two threads coordinate their activity, it would be possible for both to be active at one time – as you describe – unless there is something in MFC that ensures that only one modal dialog can be active at a time. Make sure the threads coordinate things so that only one of the dialogs is active at any given time.
Ah, the joys of multiple cores…