CFrameWnd::LoadFrame

The following is a summary of what CFrameWnd::LoadFrame does.

MFC WindowCreate Hook

That does not appear to be much that LoadFrame does; it might appear that a view is never created by LoadFrame. However AfxHookWindowCreate sets a hook that does do more. I do not know the details of how it works but based on the call stack when the view is constructed, the hook results in CFrameWnd::OnCreate being called. I assume this is the mechanism always used to execute OnCreate when a window is created. CFrameWnd::OnCreate calls OnCreateHelper using the LPCREATESTRUCT parameter and the pContext from the LPCREATESTRUCT parameter.

CFrameWnd::OnCreateHelper does the following:


See my Visual C++ Programmer Stuff page for more C++ stuff.