I have a C++ application that I was porting from VS 2008 to VS 2010. I had a dialog where I added MFCTasksPanes to my dialog. I am not worried about docking within the dialog, but I wanted the functionality the control provides. This worked fine in VS 2008 with the feature pack, but with some changes you made to VS2010, I then received an exception in the CDockablePane::HitTest method. In order to get my dialog to work I ended up subclassing the CMFCTasksPane and overriding HitTest (where I got rid of the afxglobals) and GetDockSiteFrameWnd (where I now return NULL).
The common response is to say the taskspane control can only be used by dockable windows, but there are needs for these controls in dialogs and property pages, not just in main window or a child frame.
But that thing that disturbed me is the whole use afxGlobalUtils. When you try to subclass the CDockablePane::HitTest you CANNOT because if you are building the DLL version the afxGlobalUtils ends up being undefined when doing the link. Why can I not get to this? Why can I not subclass CGlobalUtils and change a method like GetDockingManager? Since you only want one copy there could be a pointer in CWinAppEx that we could set so this can be overridden. I am very concerned this class is very intertwined in a lot of classes, but yet we as programmers cannot adjust its behavior.