Outlook PropertyPage width problems

S

sam

I've created a COM addin (using C++/VS2003/ATL7) for Outlook that adds a
property page (as a composite control that implements Olk::propertyPage). It
mostly works, but I cannot control the size of my page.

When I add my control to a folder's property sheet (by specifying the ProgId
in the NameSpace's OptionPagesAdd), the whole sheet ends up around 50 pixels
too wide, causing all pages (mine and the standard ones) to have 50 pixels of
blank space to their right.

If I add the exact same control to the application's options dialog (same
ProgId in Application's OptionPagesAdd), it works fine. If I look at the
control in any other container (e.g., the ActiveX Control Test Container, or
a web page), it has the right size.

Outlook doesn't seem to ever ask for Width and Height, or _cx and _cy, in
either case. If I try to set the Width and Height properties to some tiny
value, it doesn't matter. If I expose _cx and _cy or cx and cy and set them
to a tiny value, it doesn't matter.

Reading the documentation on the PropertyPage object in Outlook's VB
reference help, I don't see anything about any other properties, methods, or
events that seem relevant.

Am I missing something? Is there additional documentation somewhere?

Thanks!
 
K

Ken Slovak - [MVP - Outlook]

When I create a property page OCX using VB I specify the UserControl size as
no more than 5400 twips in height and no more than 6100 twips in width. I
don't know if that helps you any.
 
S

sam

Well, my page is exactly the same size as the default property pages--and it
shows up that way when viewed in another context (e.g., the Application
options window, or a web page, or a simple container app).

And if I change the size to something ridiculously tiny, it still does the
same thing--makes the sheet 50-some pixels wider.

As I mentioned before, Outlook creates the overly-wide propsheet without
creating my control's window or asking it for any properties. Something must
be causing it to do this, but I have no idea what....
 
K

Ken Slovak - [MVP - Outlook]

Other than setting the size, which you are already doing, I don't know of
any other methods of controlling the form size.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top