如何改变其他窗口状态栏的文字内容

解决方案 »

  1.   

    我建立了一个Frame类和一个ListView类
    在Frame类Create中通过
    m_pListView = new C***ListView;
    if (!m_pListView->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
    CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
    {
    TRACE0("Failed to create view window\n");
    return -1;
    }
    SetActiveView((CView*)m_pListView);
    进行显示该Frame中有状态栏问题是如何在ListView中改变Frame中状态栏信息呢
      

  2.   

    CMainFrame* pWnd = ((CMainFrame*)AfxGetApp()->GetMainWnd());
    pWnd->m_wndStatusBar.SetPaneText(0,"New");
      

  3.   

    试过了,有问题的
    在ListView类中包含Frame类头文件就出现错误
      

  4.   

    看你的状态栏在哪个Frame,找到对应的Frame窗口操作即可
      

  5.   

    CStatusBar *sb = (CStatusBar *)pWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR);