我现在创建了两个工具栏,但它们一个在上面,一个在下面
我用movewindow,没有用
请高手指点

解决方案 »

  1.   

    EnableDocking(DWORD dwStyle) and DockControlBar(CControlBar* pBar,
    UINT nDockBarID = 0,LPCRECT lpRect = NULL ) fuction can answer your problem.
    Search in MSDN please
      

  2.   

    用ReBar实现
    http://www.vckbase.com/document/viewdoc/?id=625
      

  3.   

    REBAR ,REBARCTRL,DIALOGBAR
    找找资料都可以实现你的问题
      

  4.   

    void CMainFrame::DockControlBarLeftOf(CToolBar *Bar, CToolBar *LeftOf)
    {
    CRect rect;
    DWORD dw;
    UINT n;

    // get MFC to adjust the dimensions of all docked ToolBars
    // so that GetWindowRect will be accurate
    RecalcLayout(TRUE);

    LeftOf->GetWindowRect(&rect);
    rect.OffsetRect(1,0);
    dw = LeftOf->GetBarStyle();
    n = 0;
    n = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n;
    n = (dw&CBRS_ALIGN_BOTTOM && n==0) ? AFX_IDW_DOCKBAR_BOTTOM : n;
    n = (dw&CBRS_ALIGN_LEFT && n==0) ? AFX_IDW_DOCKBAR_LEFT : n;
    n = (dw&CBRS_ALIGN_RIGHT && n==0) ? AFX_IDW_DOCKBAR_RIGHT : n;

    // When we take the default parameters on rect, DockControlBar will dock
    // each Toolbar on a seperate line. By calculating a rectangle, we
    // are simulating a Toolbar being dragged to that location and docked.
    DockControlBar(Bar,n,&rect);
    }