B
BatKing
Hi,
I am working on a outlook shared add-in.
what I am trying to do is trying to add a button on the reading pane and
mail inspector window's header place (at the right side of the from, to
......). This is kind like Linkedin outlook tool bars. while Outlook object
model doesn't support this, I had to learn win32 API to add the button.
after some learning and research, I found what I need to do were
1. I need to find the reading pane window and it's child windows by using
FindWindow win32 API
2. resize the child window to make space for my button
3. use CreateWindowEX to create the button
4. set the reading pane window as the parnet window of my created button.
everything working fine except I don't know which event is the best event
for me to do the above step #1 for finding the reading pane window when a
mail reading pane wasn't there before. for inspector window the active event
is the right event. However for reading pane, all the event on the explorer
windows doesn't seems care about the reading pane window's initialization. I
have try both Selection change event and Active event of explorer, but both
doesn't seems works during outlook start up. this means the reading pane
window is not fully instantiated yet during the 2 events. so the reading pane
window is not there yet ( or I should say I could only get a weak reading
pane window object which is the fake one. but this is not 100% always the
case. there are some case if the reading pane window instantiated fast
enough, then everything works fine. but this is very rare and usually durng
debug).
everything works fine once outlook is fully started AND if I un-focus
outlook window and focus outlook again (active event), or select another
email (selection change event), at this time since the reading pane is fully
instantiated, then I can find the findow correctly. but during start up and
when outlook shows the 1st email in the reading pane, even selection change
event is fired but the reading pane is not fully instantiated yet. and my
findwindows method won't find the reading pane windows.
I am working on a outlook shared add-in.
what I am trying to do is trying to add a button on the reading pane and
mail inspector window's header place (at the right side of the from, to
......). This is kind like Linkedin outlook tool bars. while Outlook object
model doesn't support this, I had to learn win32 API to add the button.
after some learning and research, I found what I need to do were
1. I need to find the reading pane window and it's child windows by using
FindWindow win32 API
2. resize the child window to make space for my button
3. use CreateWindowEX to create the button
4. set the reading pane window as the parnet window of my created button.
everything working fine except I don't know which event is the best event
for me to do the above step #1 for finding the reading pane window when a
mail reading pane wasn't there before. for inspector window the active event
is the right event. However for reading pane, all the event on the explorer
windows doesn't seems care about the reading pane window's initialization. I
have try both Selection change event and Active event of explorer, but both
doesn't seems works during outlook start up. this means the reading pane
window is not fully instantiated yet during the 2 events. so the reading pane
window is not there yet ( or I should say I could only get a weak reading
pane window object which is the fake one. but this is not 100% always the
case. there are some case if the reading pane window instantiated fast
enough, then everything works fine. but this is very rare and usually durng
debug).
everything works fine once outlook is fully started AND if I un-focus
outlook window and focus outlook again (active event), or select another
email (selection change event), at this time since the reading pane is fully
instantiated, then I can find the findow correctly. but during start up and
when outlook shows the 1st email in the reading pane, even selection change
event is fired but the reading pane is not fully instantiated yet. and my
findwindows method won't find the reading pane windows.