C
CBanu [IXIA]
Hi,
I can't seem to figure out a decent way to do this. I have a small
window, and I need to discard user input while performing some lenghty
task. For example, if the user wants to sync the app with a server, and
this takes time. The proper behavior would be to change the cursor to a
busy cursor, and prevent the user from touching any control on the
form. Of course, painting should still be done, and the form should be
able to move and resize (user actions like move, resize, maximize,
minimize). When the job is done, the cursor changes back to the default
one, and the user is able to interact with the received data.
I've seen various sugestions:
- disable the controls (or the whole form): not good, as the appearance
of the controls changes dramatically; also, there seems to be problems
with the cursor, it won't show properly on a disabled control (it
displays the default cursor, not the one I set);
- put a transparent form on top of the current form: I'm interested in
this, if anyone can provide bits of code, I would really appreciate it.
However, I don't know if this is supported on all systems (I'm
interested mainly in XP, Win2003, and maybe Win2000).
- catch all events in a WndProc: how do I do this? I've overriden the
WndProc of my form, yet not all messages pass through this. I am still
able to interact with the controls...
I really appreciate any help on this, guys (and girls).
Cheers,
Cosmin.
I can't seem to figure out a decent way to do this. I have a small
window, and I need to discard user input while performing some lenghty
task. For example, if the user wants to sync the app with a server, and
this takes time. The proper behavior would be to change the cursor to a
busy cursor, and prevent the user from touching any control on the
form. Of course, painting should still be done, and the form should be
able to move and resize (user actions like move, resize, maximize,
minimize). When the job is done, the cursor changes back to the default
one, and the user is able to interact with the received data.
I've seen various sugestions:
- disable the controls (or the whole form): not good, as the appearance
of the controls changes dramatically; also, there seems to be problems
with the cursor, it won't show properly on a disabled control (it
displays the default cursor, not the one I set);
- put a transparent form on top of the current form: I'm interested in
this, if anyone can provide bits of code, I would really appreciate it.
However, I don't know if this is supported on all systems (I'm
interested mainly in XP, Win2003, and maybe Win2000).
- catch all events in a WndProc: how do I do this? I've overriden the
WndProc of my form, yet not all messages pass through this. I am still
able to interact with the controls...
I really appreciate any help on this, guys (and girls).
Cheers,
Cosmin.