请问这是怎么实现的

yangzhang 2003-09-14 10:33:14
请各位大侠指教,WIN的画图程序中那个面板用的是工具栏还是非模式对话框 
是怎么做出来的啊
...全文
79 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Freshyy 2003-09-21
  • 打赏
  • 举报
回复
是DialogBar 继承关系:CDialogBar<-CControlBar<-CWnd
步骤:
1.首先在资源中建立以对话框 Styles中设置:style=child,border=none
2.在CMainFrame中建立变量m_wndPaintBar
3.
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
.......

if (!m_wndPaintBar.Create(this, WS_CHILD|WS_VISIBLE|CBRS_SIZE_FIXED|CBRS_GRIPPER|CBRS_LEFT|CBRS_TOOLTIPS, 0x1208) ||!m_wndPaintToolBar.LoadToolBar(IDR_PAINTTOOL))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}

m_wndPaintBar.SetWindowText(_T("工具箱"));
m_wndPaintBar.EnableDocking(CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT);
DockControlBar(&m_wndPaintBar);

.....
}
yangzhang 2003-09-21
  • 打赏
  • 举报
回复
详细点啊,大哥,我可是菜鸟
woolgate 2003-09-21
  • 打赏
  • 举报
回复
不是Toolbar,用Spy++可以探测出来,
不过Toolbar也可以作出来
cjbok 2003-09-21
  • 打赏
  • 举报
回复
是工具栏,用ToolBar就可以作出来的!!
captainliyun 2003-09-21
  • 打赏
  • 举报
回复
CDialogBar
zouzhigoodman 2003-09-21
  • 打赏
  • 举报
回复
对话框
bluebohe 2003-09-21
  • 打赏
  • 举报
回复
是对话框栏吧

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧