复合砖是什么材质:vc++高手,请进!!

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/07 10:58:23
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 be docked to one of the sides of the frame window specified in the calls to both CControlBar::EnableDocking and CFrameWnd::EnableDocking. The side chosen is determined by nDockBarID.

正如你所说,第三个是把工具栏停靠在窗口上,第2个参数为0的话,停靠在默认位置,一般是在框架窗口的顶部之内