I have generated MDI application by means of MFC AppWizard. Then I have inserted in MainFrame.h in declaration of class CMainFrame the variable:
protected:
CDialogBar m_wndMainMenu;
I want to use m_wndMainMenu CMainFrame::OnCreate
( m_wndMainMenu.Create(this, IDD_MAIN_MENU,
CBRS_LEFT|CBRS_TOOLTIPS|CBRS_FLYBY, IDD_MAIN_MENU)
Program can be build, but it crashes in InitInstance() of the App in the line
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
When I define CDialogBar m_wndMainMenu as a pointer, then I call new for this variable in CMainFrame::CMainFrame(), program doesn't crush. I call delete of varible in CMainFrame::~CMainFrame(). But IDE detects memory leaks.
When I use CDialogBar in ChildFrame, it works fine.
Do you know how CDialogBar can be used in MainFrame of MDI application?
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.