Original Post
HI!
I decided to get MFC SDI modell and CD3DApplication together. (not trivial for me but I will do it)
I started to learn MFC last weekend so I'm a beginner here.
My question is a very basic one:
I created an MFC SDI application that doesn't use doc/view architecture (for simplicity).
Where my CChildView object is born?
In MyApp::InitInstance() there is a line:
CMainFrame* pFrame = new CMainFrame;
The constructor of CMainFrame is empty so only CFrameWnd's constructor is called to do something. _Stepping over_ (F10) that lines I returned to CMainFrame's ctor's empty lines. _Stepping into_ (F11) at that point first the CStatusBar's then CToolBar's and at last my CChildView's
ctor was called. WHY? In the source I couldn't see any lines that might initiate such an action. I've put here the related sections from the source:
How can my CChildView get instantiated?
Thx.
R
[edited by - xropi on March 12, 2003 4:08:33 PM]
class CMainFrame : public CFrameWnd
{
public:
CMainFrame();
protected:
DECLARE_DYNAMIC(CMainFrame)
// Attributes
.
.
.
}
CMainFrame::CMainFrame()
{
// TODO: add member initialization code here
}