I want the main window of my app divided into two, with a tree view on the left and an MDI area on the right. The tree window must be resizable from its right edge, and when it is resized the MDI area must adjust accordingly.

It is easy to do this without the resizing - just use a CDialogBar for the tree window. It is a lot more tricky to do it with the resizing - I considered the following possibilities, but nothing seems to be completely satisfactory. I am also trying to do it without using undocumented parts of MFC.

1. Somehow make the CDialogBar resizable (simply making the dialog resizable, i.e. WS_THICKFRAME, has some bizzare effects).

2. Derive a class for the window containing the tree, create this window as a child of the main window and respond to the MFC message WM_SIZEPARENT which allows windows (usually toolbars etc.) to specify how much room is left for the MDI client area. However, this message is not a fully documented and supported part of MFC.

3. Have a splitter window as the main window and somehow put the MDI client in one pane.

Any ideas / suggestions would be greatly appreciated.