Some resources on docking windows:
- DataMekanix CSizingControlBar
- Floating Windows at CodeGuru.com Visual C++ Forums
- Snappable Windows at CodeProject.com
- Resizable Docking Window article at CodeGuru.com, rather ancient but contains an excellent explanation of how docking works
- Professional UI Solutions provides an easy-to-use MFC extension library with a more professional and user-friendly interface. Not all of it is free, but the downloadable examples (with some source code) are really worth looking at.