Seasonal difference: GetParentFrame and AFXGetMainwnd in the view.
The following code: // ((cmainframe *) getParentFrame ()) -> setStatusBarpositionText (12, 122); // cmainframe * PMAINFRAME = (CMAINFRAME *) (AFXGetApp () -> m_pmainwnd);
CMainFrame * pMainFrame = (CMainFrame *) AfxGetMainWnd (); pMainFrame-> m_wndStatusBar.SetPaneText (2, "abc"); // ((CMainFrame *) GetParentFrame ()) -> m_wndStatusBar.SetPaneText (2, "abc");
If you have never get Statusbar with getParentFrame. If you are, getParentFrame returns CWnd *, and this pointer points to the CFrameWnd object, not our CMAINFRAME object, only CMAINFRAME has STATUSBAR members.