如何让浮动工具栏竖着显示
怎么让浮动工具栏竖着显示
每次它都自动横着显示
代码如下:
if (!m_tool.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE |CBRS_FLOATING|CBRS_SIZE_DYNAMIC|CBRS_TOOLTIPS ) ||
!m_tool.LoadToolBar(IDR_TOOLBAR1))
{
TRACE0( "Failed to create toolbar\n ");
return -1; // fail to create
}
m_tool.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
CPoint point(100,100);
ClientToScreen(&point);
FloatControlBar(&m_tool,point);
------解决方案--------------------
CBRS_ALIGN_LEFT Allows the control bar to be docked to the left side of the client area of a frame window.
CBRS_ALIGN_RIGHT Allows the control bar to be docked to the right side of the client area of a frame window.
每次它都自动横着显示
代码如下:
if (!m_tool.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE |CBRS_FLOATING|CBRS_SIZE_DYNAMIC|CBRS_TOOLTIPS ) ||
!m_tool.LoadToolBar(IDR_TOOLBAR1))
{
TRACE0( "Failed to create toolbar\n ");
return -1; // fail to create
}
m_tool.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
CPoint point(100,100);
ClientToScreen(&point);
FloatControlBar(&m_tool,point);
------解决方案--------------------
CBRS_ALIGN_LEFT Allows the control bar to be docked to the left side of the client area of a frame window.
CBRS_ALIGN_RIGHT Allows the control bar to be docked to the right side of the client area of a frame window.