I have a splitter window (CCustomSplitterWnd) embedded in a CWnd. I have written my own version of Create so that before the view is created, the splitter is resized to the size of its parent using MoveWindow.
The problem is that CSplitterWnd's implementation of OnSize calls RecalcLayout, which fails because there is no view to layout.
My solution was to override OnSize in CCustomSplitterWnd and not call RecalcLayout when I MoveWindow (using a bool flag).
The resulting problem is that my implementation is not getting called. It's still calling CSplitterWnd::OnSize. I have rebuilt all and double checked my declaration in the AFX_MSG_MAP. I will post my source in a comment