Outlook::ExplorerEvents::SelectionChange()

  • Thread starter Thread starter John Erickson
  • Start date Start date
J

John Erickson

I'm adding a custom form region for Outlook 2007 and it's working great.
Since Outlook 2003 and below doesn't support form regions I am planning on
popping up a modal dialog box to accomplish the same thing that my custom
form region does for 2007. I was hoping to use the
Outlook::ExplorerEvents::SelectionChange() event to pop the modal dialog box.
However, at the time this event is triggered, the reading pane hasn't been
displayed yet. It's empty. I can't seem to find an event that fits that
timeframe. I want the reading pane to be done painting so that my user can
see it's contents while he is answering the question in my dialog box. My
alternative is to make the popup modeless, but I'd prefer not to do that. The
modeless dialog(s) may get lost and forgotten behind some other window and
I'd have to deal with multiple occurences of them, etc... Is there an event
I'm missing that would trigger after the reading pane is done displaying the
contents of a new selection?
 
You can use a timer: activate thetimer in the SelectionChange event handler,
then handle the Timer event later when it fires up.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
If you're referring to SetTimer and then reacting to the WM_TIMER message,
then I would have to sublass Outlook's window to catch the message.
Subclassing their window is something I'm trying to avoid. Not because it's
difficult, but because I want to be as friendly to Outlook as possible. Plus
I would still have issues with what do I do if another selection change
occurs. It could be possible to make another selection before the timer went
off. Dealing with all that may be more trouble than just making it modeless.
I have to deal with selection changes while I'm modeless, but I don't have to
deal with the timer and the subclassing.
 
Just a system timer, set that and when it fires you have the event to handle
displaying your dialog. As long as the timer runs on the main thread there
should be no problems.
 
Back
Top