Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3029

Problem with MainFrame.cpp

$
0
0
Hi,
Sorry I cant see the text on the icons above this text box. I am trying to execute a tutorial code which I got from:
http://msdn.microsoft.com/en-us/library/gg466500.aspx

However, i cant perform step 8 which says:

Quote:

In Solution Explorer, double-click MainFrm.cpp to open it for modification. In the CMainFrame::OnCreate method, locate the section that has several calls to lstBasicCommands.AddTail. Just after that section, add the following code.

I have got following stuff in my OnCreate:
Code:

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
        if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
                return -1;
       
        if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
                | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
                !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
        {
                TRACE0("Failed to create toolbar\n");
                return -1;      // fail to create
        }

        if (!m_wndStatusBar.Create(this) ||
                !m_wndStatusBar.SetIndicators(indicators,
                  sizeof(indicators)/sizeof(UINT)))
        {
                TRACE0("Failed to create status bar\n");
                return -1;      // fail to create
        }

        // TODO: Delete these three lines if you don't want the toolbar to be dockable
        m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
        EnableDocking(CBRS_ALIGN_ANY);
        DockControlBar(&m_wndToolBar);

        return 0;
}

Somebody plz guide me.

Zulfi.

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images