vc++高手,请进!!

来源:百度知道 编辑:UC知道 时间:2024/05/26 01:26:51
m_wndToolBar.EnableDocking (CBRS_ALIGN_TOP|CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT);

EnableDocking(CBRS_ALIGN_TOP|CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT);

DockControlBar(&m_wndToolBar,AFX_ IDW_DOCKBAR_LEFT);
这三句在工具栏创建中必不可少么,前两个说明工具栏可停靠和框架窗口可停靠,好理解,可是第三个干什么的阿,如果说是把工具栏停靠在窗口上,那第2个参数,默认为0,表示可任意停靠又是怎么回事,不是多此一举么??

查查msdn吧。
Causes a control bar to be docked to the frame window.

void DockControlBar(
CControlBar* pBar,
UINT nDockBarID = 0,
LPCRECT lpRect = NULL
);
Parameters
pBar
Points to the control bar to be docked.
nDockBarID
Determines which sides of the frame window to consider for docking. It can be 0, or one or more of the following:
AFX_IDW_DOCKBAR_TOP Dock to the top side of the frame window.
AFX_IDW_DOCKBAR_BOTTOM Dock to the bottom side of the frame window.
AFX_IDW_DOCKBAR_LEFT Dock to the left side of the frame window.
AFX_IDW_DOCKBAR_RIGHT Dock to the right side of the frame window.
If 0, the control bar can be docked to any side enabled for docking in the destination frame window.

lpRect
Determines, in screen coordinates, where the control bar will be docked in the nonclient area of the destination frame window.
Remarks
The control bar will b