How to Refresh Outlook Explorer

Add-in Express™ Support Service
That's what is more important than anything else

How to Refresh Outlook Explorer
 
Andrew Lockwood


Guest


At some point during / after the startup process, my add-in needs to perform a number of database routines.

If I do this in the StartupComplete procedure, my custom pane does not show in the main Explorer window.

If I move my routines to the Initialize procedure, my custom pane shows, but the Explorer is not drawn correctly, so I then have to do something (eg: change the window size) in order for it to redraw correctly.

Is there a way of forcing the Explorer to redraw in the StartupComplete procedure, after I have performed all my database routines?
Posted 06 May, 2015 05:38:33 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Andrew,

I'm not sure that I understand what occurs when performing the routines in the StartupComplete event handler. What do you mean by "my custom pane does not show in the main Explorer window"? Does your code prevents it from being shown? Or, you think Outlook doesn't redraw itself in this case as well?

The custom pane, is it an ADXOlForm?


Andrei Smolin
Add-in Express Team Leader
Posted 06 May, 2015 06:05:47 Top
Andrew Lockwood


Guest


I have created an ADXOlForm (using the ADXOlFormsManager) which should show in my Explorer window if I am looking at a Mail folder. When Outlook opens, it goes to my Inbox by default, but the form does not show in the Explorer window. But if I swap folders, then it appears.
Posted 06 May, 2015 09:45:43 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Andrew,

Could you please send me a project reproducing this issue? You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 06 May, 2015 09:52:52 Top
Andrew Lockwood


Guest


I have tried to strip it down into a form that would run on your computer, but when I do so, the problem goes away. But since the add-in is linked into our bespoke database, there is no point in sending you the entire project because you would not be able to run it.

All I need to know is if there is a way that I can force Outlook to redraw the whole Explorer window - not just repaint it, but redraw it.
Posted 06 May, 2015 12:30:41 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Andrew,

The standard way is to use the InvalidateRect API function. Still, using this function doesn't seem really correct.

You can access the DB in a background thread to let Outlook redraw.


Andrei Smolin
Add-in Express Team Leader
Posted 07 May, 2015 05:49:24 Top