|
If
your dialog is in the same app as the form it's blocking, I don't understand
it.
However if your form is, say, in a DLL or another
process, then this might explain the effect you're seeing.
In
which case, you probably want to pass the HWND of the parent form to your dialog
process, and explicitly assign it as the parent of your
dialog.
WRT
trapping the Ctrl+Alt+Delete keypress, the whole thing about the three-fingered
salute is that it is supposed to guarantee that the user is talking
directly to the OS, not being surreptiously trapped by some other process.
I'm sure there are ways/hacks around it, but not officially.
HTH,
Conor
"fax sent... " dialog is modal - so it blocks
all keystroke/mouse input
sent to the main window of the app.
one way to get around this (if it's your app) is to make
that dialog
modeless - and then enforce the "modal" features that you
want (for example
not allowing the user to do anything else until they cancel
the dialog).
If the dialog is modeless - then taskbar clicks and attempts
to click
into the main application window will work as
expected.
----- Original Message -----
I have a mail merge app which
has a button for sending off a letter as a fax to the client. It has a
dialog which comes back at the end of the process, saying "Fax sent to fax
queue".
In some instances, inexperienced
users (not familiar with Windows) have sidetracked off to e.g. read an
email, and then clicked back on the task bar item for the letters program
again. When they try to exit the program, and it doesn't respond, they use
ctrl-alt-delete! But if they'd looked on the task bar, they would have found
another entry, which was the "Fax sent to fax queue" dialog, still waiting
for the "OK" to be clicked.
How do I help them out? Is there
a way to change the behaviour of Windows, so that when clicking on a parent
form, if there is a child form / dialog still outstanding (not dealt with),
then it re-focuses to this? I'm new to Windows programming, so this may be a
silly or easy question.
Also, is it easy to trap the
ctrl-alt-delete event and give a controlled response to the users desire to
kill my app?
|