A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to get active inspector window handle?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 12th 09, 08:32 AM posted to microsoft.public.outlook.program_addins
madhavi
external usenet poster
 
Posts: 12
Default How to get active inspector window handle?

Hi,

I am trying to get the inspector window handle as I need to add one or two components (like button etc) to the inspector. I used the below code and I am getting the active window of outlook is correct. But the handle I am getting is not correct when I examined it with spy++.

What could be wrong in this?

Also if I have more than one mail opened with same title, How can we get the handle of the actually the currently active inspector window? (As to find the handle, we are just passsing the tile and two or more windows have the same title)

Please provide me some help to resolve this problem.
Thanks in advance.
Submitted using http://www.outlookforums.com
  #2  
Old October 12th 09, 03:26 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?

I have no idea what code you're referring to, since you never showed in
either of your duplicate posts. Get the handle when the Inspector opens, in
the first Activate() event. At that time the Inspector will be the
ActiveInspector.

--
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_krishna[at]yahoo[dot]com wrote in message
...
Hi,

I am trying to get the inspector window handle as I need to add one or two
components (like button etc) to the inspector. I used the below code and I
am getting the active window of outlook is correct. But the handle I am
getting is not correct when I examined it with spy++.

What could be wrong in this?

Also if I have more than one mail opened with same title, How can we get
the handle of the actually the currently active inspector window? (As to
find the handle, we are just passsing the tile and two or more windows
have the same title)

Please provide me some help to resolve this problem.
Thanks in advance. Submitted using http://www.outlookforums.com


  #3  
Old October 13th 09, 05:00 PM posted to microsoft.public.outlook.program_addins
madhavi
external usenet poster
 
Posts: 12
Default How to get active inspector window handle?


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.


'Ken Slovak - [MVP - Outlook Wrote:
;83932']I have no idea what code you're referring to, since you never
showed in
either of your duplicate posts. Get the handle when the Inspector
opens, in
the first Activate() event. At that time the Inspector will be the
ActiveInspector.

--
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_krishna[at]yahoo[dot]com wrote in message
...
Hi,

I am trying to get the inspector window handle as I need to add one

or two
components (like button etc) to the inspector. I used the below code

and I
am getting the active window of outlook is correct. But the handle I

am
getting is not correct when I examined it with spy++.

What could be wrong in this?

Also if I have more than one mail opened with same title, How can we

get
the handle of the actually the currently active inspector window? (As

to
find the handle, we are just passsing the tile and two or more

windows
have the same title)

Please provide me some help to resolve this problem.
Thanks in advance. Submitted using http://www.outlookforums.com



--
madhavi
http://forums.slipstick.com

  #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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
disable a menu in active inspector Ashish Add-ins for Outlook 1 October 8th 09 03:38 PM
Getting handle of an active dialog window Ewgenij Sokolovski Outlook and VBA 6 December 16th 08 04:35 PM
no active inspector Jenn Outlook - Installation 2 March 23rd 07 08:32 PM
how to add commandbarbutton to inspector window Ram Outlook - General Queries 1 January 18th 06 09:42 PM
how to add commandbarbutton to inspector window Ram Add-ins for Outlook 0 January 18th 06 04:18 PM


All times are GMT +1. The time now is 12:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.