I'm using a framework that themes controls to look like office 2007, XP, etc. This particular framework has a resizeable dialog window in which you can anchor controls so they are automatically sized when the dialg is sized, and will add scrollbars when necessary.
I'm using a CTreeCtrl on this particular dialog, so I need to make the CTreeCtrl non-scrollable, and resize it to fit the contents (along with it's parent dialog) so the framework will draw the scroll bars instead of the CTreeCtrl.
Is there a way to resize the CTreeCtrl to fit it's contents? I would assume it boils down to calculating how much space the items to be displayed would take up, then send the CTreeCtrl and dialog a WM_SIZE message. But I'm not sure how I'd calculate the amount of space required by the items to be displayed.
Any help would be appreciated. Thanks.
I'm using a CTreeCtrl on this particular dialog, so I need to make the CTreeCtrl non-scrollable, and resize it to fit the contents (along with it's parent dialog) so the framework will draw the scroll bars instead of the CTreeCtrl.
Is there a way to resize the CTreeCtrl to fit it's contents? I would assume it boils down to calculating how much space the items to be displayed would take up, then send the CTreeCtrl and dialog a WM_SIZE message. But I'm not sure how I'd calculate the amount of space required by the items to be displayed.
Any help would be appreciated. Thanks.