S
Software_Developer
Hello.
I'm developing a non-managed C++ COM add-in for MS Word 2003/2007 and I've
faced the following trouble.
When I show a modal dialog for example created with DialogBox WinAPI
function or even a simple MessageBox, it becomes impossible to type text in
all other previously opened Word documents (even if I don't pass a parent
window handle for this dialog). All document's windows retain enabled as
needed and I can perform any operations there but only with mouse, all
keypresses are ignored. I need to show modal dialog for specified document (I
now it's window handle), but others documents at this time must be available
for user interaction not only with mouse but keyboard as well.
I suppose it is very strange behavior of MS Word message handling routine.
You can see with the aid of Spy++ that windows receive WM_KEYDOWN, WM_CHAR
and WM_KEYUP messages during the modal dialog is being displayed, but nothing
happened.
I even tried to create pseudo-modal dialog similar to MFC CDialog (a
modeless dialog with it's own modal loop implementation), but the result was
the same.
Please help. Thanks.
I'm developing a non-managed C++ COM add-in for MS Word 2003/2007 and I've
faced the following trouble.
When I show a modal dialog for example created with DialogBox WinAPI
function or even a simple MessageBox, it becomes impossible to type text in
all other previously opened Word documents (even if I don't pass a parent
window handle for this dialog). All document's windows retain enabled as
needed and I can perform any operations there but only with mouse, all
keypresses are ignored. I need to show modal dialog for specified document (I
now it's window handle), but others documents at this time must be available
for user interaction not only with mouse but keyboard as well.
I suppose it is very strange behavior of MS Word message handling routine.
You can see with the aid of Spy++ that windows receive WM_KEYDOWN, WM_CHAR
and WM_KEYUP messages during the modal dialog is being displayed, but nothing
happened.
I even tried to create pseudo-modal dialog similar to MFC CDialog (a
modeless dialog with it's own modal loop implementation), but the result was
the same.
Please help. Thanks.