How to add scrolling to a property page in ATL and WTL

Sometimes you may get into situation when you cannot put all the required controls into property page of fixed size (for example there are several property pages in a sheet and you cannot expand one so that other look ugly with new empty space).

Adding scrollbar that scrolls the controls might be a good solution for the problem. With CScrollablePropertyPageT template based on WTL’s CPropertyPageImpl it’s even easier.

image001.png

As a developer you need to put (in a dialog template resource editor in Visual Studio IDE) an invisible static control with an identifier of -2 at the position where the actual property page should end and the controls below would be available using scrolling down.

image002.png

Visual C++.NET 2003 source code can be downloaded here, compiled binary – here.

Leave a Reply