Discussion:
MFC standard-projects MainFrame failes to be a parent window
(too old to reply)
JiiPee
2016-08-05 11:54:36 UTC
Permalink
If I create a a MFC project with Project style: "Visual Studio" and then
create my own child window (frame plus view) and set the MainFrame to be
its parent all works fine (the child window will be inside the mainframe
all the time). But if I create the old "MFC standard" style project and
do the same then wierd things happen and if failes (its there but first
hidden and all kind of drawing/update problems). Any idea why the old
mainframe cannot be a parent window? I can see that the old has
mainframe derived from CFrameWnd and in the new project its
CFrameWndEx.... is this the reason?
JiiPee
2016-08-05 12:49:40 UTC
Permalink
Just found out that if I do not create a view for the old MFC project
(so in app classes CSingleDocTemplate I set view to NULL) then it works.
So somehow the view get on top of the window I create. But its
interesting this does not seem to happen in the new style of MFC projects
Post by JiiPee
If I create a a MFC project with Project style: "Visual Studio" and
then create my own child window (frame plus view) and set the
MainFrame to be its parent all works fine (the child window will be
inside the mainframe all the time). But if I create the old "MFC
standard" style project and do the same then wierd things happen and
if failes (its there but first hidden and all kind of drawing/update
problems). Any idea why the old mainframe cannot be a parent window?
I can see that the old has mainframe derived from CFrameWnd and in the
new project its CFrameWndEx.... is this the reason?
Loading...