SubclassWindow causes stack overflow in CMainFrame::OnCreate()
I recently upgraded my MS Visual Studio 2008 to Service Pack 1 to take advantage of the MFC enhacements (Feature Pack).
I orginally had an MDI app in which I had changed the background in the main client area to tile a company logo. I originally followed the instructions in MSDN: Q129471. Worked beautifully since MS VS 2002 .NET.
CMainFrame was derived from CMDIFrameWnd, and my overloaded CMainFrame::OnCreate() looked like
BUT, now with the CMainFrame derived from CMDIFrameWndEx, the call to SubclassWindow() causes a stack overflow.
BOOL CMainFrame::CreateClient(LPCREATESTRUCT lpCreateStruct, CMenu* pWindowMenu)
Someone else has had to come across this same issue!
Re: SubclassWindow causes stack overflow in CMainFrame::OnCreate()
CMainFrame::OnCreate and CMainFrame::CreateClient are different functions, isn't it?
Originally Posted by spectre72