View Single Post
  #4  
Old October 13th 09, 08:55 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to get active inspector window handle?

If you have multiple Inspectors that have the same class name and caption
then FindWindow() could retrieve any of them.

In that case you might want to use FindWindowEx() and test each found window
for size and location on the screen to figure out which is which.

Of course that test case is an edge case, it's not likely in the real world
that a user would have multiple Inspectors opened at the same time all with
the same caption.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"madhavi" madhavi.4002py@invalid wrote in message
news:madhavi.4002py@invalid...

I am using findwindow method to find the handle of the active inspector
window. But my doubt is if we have two three inspector windows with same
caption, as I am supplying classname and caption to the findwindow
method, will I get the handle of active inspector.

Because for testing purpose I sent mails with same subject and body, so
multiple inspectors can have same window class and caption.

Earlier I forgot to mention this.
Thank you for looking into this. Please let me know whether I am doing
correctly or not.


Ads