MSDN中有详细的例子,搜索一下.记得把活动子集设为Platform SDK

解决方案 »

  1.   

    初始化通用控件库
    创建工具栏窗体CreateToolbarEx
    设置参数
    主程序处理消息如zPerry(旧日重来) 所说,Platform SDK\user interface services\shell and common control\下有详尽说明
      

  2.   

    //添加主工具栏
    if (!m_wndtoolbar.CreateEx(this,
    TBSTYLE_FLAT,
    WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS,
    CRect(0,3,0,0)) 
    || !m_wndtoolbar.LoadToolBar(IDR_TOOLBAR_MAIN))
    {
    TRACE0("创建工具栏出错!\n");
    return false;
    }
    m_wndtoolbar.ShowWindow(SW_SHOW);
    //添加控制状态栏
    if (!m_wndStatusBar.Create(this)
    || !m_wndStatusBar.SetIndicators(indicators,
    sizeof(indicators)/sizeof(UINT)))
    {
    TRACE0("创建状态栏出错!\n");
    return false;
    }
    m_wndStatusBar.ShowWindow(SW_SHOW); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
    必须先声明m_wndStatusBar和m_wndtoolbar对象
    工具栏还应该先创建工具栏资源。
      

  3.   

    CreateStatusWindow
    Creates a status window, which is typically used to display the status of an application. The window generally appears at the bottom of the parent window, and it contains the specified text. HWND CreateStatusWindow(
        LONG style, 
        LPCTSTR lpszText, 
        HWND hwndParent, 
        UINT wID
    );
      

  4.   

    你可以直接用API函数CommandBar_Create(),CommandBar_AddBitmap(),CommandBar_InsertMenu()等函数添加菜单和工具栏