Minimize an Inspector over another Inspector.

  • Thread starter Thread starter George
  • Start date Start date
G

George

I have made an addin to be used within Outlook 2000+ (Word as editor)
which adds a toolbar with buttons in the inspector.

Now to my problem:

I have two Inspectors open, they are both in normal view.
I dubbelclick on the one of them to minimize it to the windowtoolbar
and then i push it open in the windowtoolbar to get it open again.

This goes fin until i did se that the inspecter that is active
didnt get the active message, the other inspector gets it but still
the window i activated is active (not grayed).

Now i wonder if there are a way to get past this problem or if it is
only I who have this problem?

I need to featch activate or else i cant create the toolbar right!

Thanks

//George
 
If I follow what you are asking you can use the Activate method on any
Inspector to make it the ActiveInspector. First you need a handle to the
Inspector you want of course. You can get that using the NewInspector event.
However, although you can trap the Inspector.Activate event be aware that
the Activate event may fire many times and in cases where you don't expect
it to fire. Also, in most versions of Outlook 2000 you may not get a
NewInspector event when an item is opened and Word is the editor.
 
No, You did not get my question right.
I didn't formulate it so good =)

I try to explain me better:

Im using:
Win XP, Outlook 2003, COM addin to Outlook that i have written,
MSOutl9.olb, MSO.dll

I have en event to catch,
and i do catch it in the Inspector Invoke methode (Activate - 0xf001).

Does this event fire correctly when using Outlook WordMail and you got
two "New mail" inspectors open and sends one to taskbar ( Inspector 1
is still in normalsize when Inspector 2 get minimized to taskbar) and
after that you reopen (Inspector 2) it from taskbar.

The Inspector that is in normalsize (Inspector 1) gets the activate
messages instead of the one that i reopen (Inspector 2).

Is it only me who have this problem or is it an bug in
Outlook COM addin interface?
 
The Outlook library you are using is for Outlook 2000, although it will work
when used with Outlook 2003 but you won't be able to use any of the new
methods, properties, events or bug fixes in the latest versions. If you only
are targeting Outlook 2003 I'd suggest using the Outlook 2003 library.

When you are using WordMail you will not get a NewInspector event if you are
using Outlook 2000. So you have no way to track that in Outlook. For newer
versions of Outlook with or without WordMail, and for Outlook 2000 without
WordMail you do get a NewInspector event when a new item is opened.

The trick to handling events correctly for any Inspector even if there are
more than one open is to use an Inspector wrapper class and a collection to
hold one class per open Inspector. Then you can handle various events for
the Inspector and for the item opened in that Inspector and not get
interference from any other open Inspector.

You can Google for Inspector wrapper in the newsgroups, I and others have
posted examples of them a number of times recently.

Also, if you are using VB6 or can read it take a look at the ItemsCB COM
addin sample on the Resources page at www.microeye.com to see how to handle
common workarounds for bugs in the Outlook COM addin model and for a look at
an Explorer class wrapper and collection that is similar to the Inspector
wrapper I mentioned.
 
Im developing the addin for outlook w2000+ in C++.

I have already the wrapper classes for collection of inspector and so
on but that was not my problem. I wonder if there where more people
than me who have the problem with two Inspector both opened and then
minimize one of them and then maximize the same one from the taskbar.
The first inspector that i didn't tutch gets the activate instead of
the one i maximized.

Now i solve the problem to remove whole toolbar( with buttons )if it
is not the right tag (Tag = Inspector ID) on the button. But this will
result in that the active window dont have my buttons in the
inspector, instead the other inactive inspector will have the toolbar.

This solution i dont like thats why i wonder if someone else got an
solution to solve this problem.
 
Back
Top