Want a toolbar status window for a modal application...
Posted on 2001-06-08
I need my application to have a "Machine status" tool window so the machine can be controlled using the tool window.
The problem is that this part of the application uses modal windows and I need the tool window to be accessable from any of the windows.
"TestForm" modal window
\ test type 1 modal window
\ test type 2 modal window
What I've found so far is that if I create the form and have it owned by TestForm, the "child" modal forms don't allow you to press buttons on the tool window. What I did so far is that when I display a new "test type" form, I recreate the tool window and make it owned by the "test type".
I think I'm going about this the wrong way. Here's what I've tried:
FormCreate: Not really suitable for various reasons but if I use it anyhow, I can't access the window (it's as though it's owned by another form).
FormShow: If it's put here, I get some pretty ugly flickering when the form loads. LockWindowUpdate didn't help.
FormResize: Definitely not a good idea to put it here; sometimes get access violations even though I'm always checking to ensure the form is there first. Always setting to nil immediatly upon Free.
How can I share this window without recreating it all the time? Hopefully someone has an idea which will fit my situation.