比着抄的,代码如下:
static UINT indicators[] =
{
ID_SEPARATOR,
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};响应对话框 CREATE 消息:if (!m_StatusBar.Create(this) ||
!m_StatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
{
return -1;
}明明创建成功了,怎么看不见?

解决方案 »

  1.   

    http://www.codeproject.com/statusbar/dlgstatbar01.aspm_bar.Create(this); //We create the status barm_bar.SetIndicators(indicators,2); //Set the number of panes CRect rect;
    GetClientRect(&rect);
    //Size the two panes
    m_bar.SetPaneInfo(0,ID_INDICATOR_NISH, 
        SBPS_NORMAL,rect.Width()-100);      
    m_bar.SetPaneInfo(1,ID_INDICATOR_TIME,SBPS_STRETCH ,0);//This is where we actually draw it on the screen
    RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,
        ID_INDICATOR_TIME);
      

  2.   

    if (!m_StatusBar.Create(this) ||
    /*这里用断点*/ !m_StatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
    {
    return -1;
    }我注释的地方加一断点,跟踪,观察m_StatusBar的窗口句柄是多少,保存该窗口句柄,看看是不是空,
    继续执行,如果该状态条没有出来,打开spy++,选择Find Window 在窗口句柄区域内输入刚才保存的窗口句柄,确定,看看状态条的rect等,通过此手段辅助分析,希望你能找到问题的根源。