⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_60300.htm

📁 vc
💻 HTM
字号:
<p>
序号:60300 发表者:夏雨天 发表日期:2003-11-12 17:31:00
<br>主题:请教高手!工具条怎么样不让它停靠在视图的边上,而是漂浮在视图的中间!
<br>内容:由于我的工具条的东西太多,我想把工具条放在悬浮在视图中间,不让它停靠在边上。好像画图工具的图形工具条!<BR><BR>那位高手能帮帮我呀!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:下次用什么名字? 回复日期:2003-11-12 17:34:50
<br>内容:// MainFrm.cpp文件:<BR>&nbsp;&nbsp;&nbsp;&nbsp;// TODO: Delete these three lines if you don't want the toolbar to<BR>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;be dockable<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnableDocking(CBRS_ALIGN_ANY);<BR>&nbsp;&nbsp;&nbsp;&nbsp;DockControlBar(&amp;m_wndToolBar);<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:浪际天涯 回复日期:2003-11-12 17:41:13
<br>内容:这个问题我也想问,哪位大侠知道呵,1楼的方法我试过了,但没有实现
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:夏雨天 回复日期:2003-11-12 17:42:51
<br>内容:mr_handou谢谢你回复我的贴子,可是我需要工具条一开始就在视图的中间,而不是后来用鼠标拖到中间!<BR>我的代码如下,用了MoveWindow可是它移动不出,只是水平移动!<BR>&nbsp;&nbsp;&nbsp;&nbsp;CPoint nlt(100,100),nrb(200,200);<BR>&nbsp;&nbsp;&nbsp;&nbsp;CRect MovePosition(nlt,nrb);<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMyToolBar-&gt;LoadToolBar(IDR_MYTOOLBARB);<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMyToolBar-&gt;Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP ,0x9100); <BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMyToolBar-&gt;LoadBitmap(IDR_MYTOOLBARB); <BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMyToolBar-&gt;SetButtons(My_Buttons, sizeof&nbsp;&nbsp;(My_Buttons)/sizeof(UINT));&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMyToolBar-&gt;EnableDocking(CBRS_ALIGN_ANY);<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnableDocking(CBRS_ALIGN_ANY); <BR>&nbsp;&nbsp;&nbsp;&nbsp;DockControlBar(m_pMyToolBar);<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMyToolBar-&gt;MoveWindow(MovePosition,true);
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:iwill 回复日期:2003-11-12 18:35:29
<br>内容:FloatControlBar
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:iwill 回复日期:2003-11-12 18:39:33
<br>内容:示例:<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;m_wndToolBar.EnableDocking(0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnableDocking(0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;FloatControlBar(&amp;m_wndToolBar,CPoint(100,100));<BR><BR>如果下面有其他的工具栏需要停靠 ,再次调用EnableDocking(CBRS_ALIGN_ANY); 即可
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:夏雨天 回复日期:2003-11-12 18:49:44
<br>内容:谢谢iwill!<BR>太感谢了!<BR>行了!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -