如何修改VC的Menu和ToolBar

Happy_Wawe 2004-01-04 03:28:03
我用的是VC 6.0。

VC的菜单->Insert->New Class可以添加一个Class。
我想增加一个New XXX,用来添加一个自定义的东西。

如果不知道怎么搞这个,能增加个ToolBar也好。

我知道一定可以,因为有很多辅助开发的软件都在VC里搞了不少东西。

大侠,请帮忙。
...全文
475 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
蒋晟 2004-01-12
  • 打赏
  • 举报
回复
msdn.microsoft.com
fzd999 2004-01-12
  • 打赏
  • 举报
回复
jiangsheng(蒋晟.Net) 你的那个MSDN是哪个版本的?

我这里也有一段:
Visual C++ Developer Studio add-ins are in-process COM components (DLLs) that you write in Visual C++ or Visual Basic. With add-ins, you can automate tasks in Visual C++ by adding commands to perform these tasks, by adding toolbar buttons to carry out these commands, and by responding to events inside the development environment.
happlyman 2004-01-12
  • 打赏
  • 举报
回复
一般这种问题,如果你不是专门研究这个的话可以去网上找一个现成的类,有很多风格的,然后放到自己的工程里,把自己的主框的基类改为它就可以了,TOOLBAR一样
蒋晟 2004-01-09
  • 打赏
  • 举报
回复
Visual C++ Samples

Extensibility

This section includes the abstracts for the Visual C++ extensibility samples.

In This Section
Code Model Samples
Provides links to samples demonstrating various features of the Visual C++ Code Model.
Custom Wizard Samples
Provides links to samples demonstrating how to create your own wizards.
Project Model Samples
Provides links to samples showing how to programmatically use objects in the project model.
Related Sections
Visual C++ Sample Applications
Provides links to sample code showing the capabilities of Visual C++ and the libraries and technologies it supports.
Visual C++ Walkthroughs
Provides links to walkthroughs that discuss the development of a specific application type or major application feature using a serious of steps.

Happy_Wawe 2004-01-05
  • 打赏
  • 举报
回复
我知道VC是留了这样的接口的,也可能是VC的plug-in。
因为有不少辅助开发的软件都可以这么做。
lambochan 2004-01-04
  • 打赏
  • 举报
回复
哦~~Sorry,原来是修改VC本身的界面,kaka..
偶也想知道..
lambochan 2004-01-04
  • 打赏
  • 举报
回复
倒~~粘错了
http://www.vckbase.com/document/indexold.html
sjd163 2004-01-04
  • 打赏
  • 举报
回复
要修改VC本身的Menu和ToolBar,想法找VC的源程序。
lambochan 2004-01-04
  • 打赏
  • 举报
回复
那就派生,自绘制了...
look look这个吧:http://www.vchelp.net/vchelp/file2003_2/scrollbmpclass.asp?type_id=4&class_id=1&cata_id=1&article_id=996&search_term=
Happy_Wawe 2004-01-04
  • 打赏
  • 举报
回复
1楼2楼,可能我没说清楚,我的目的是要修改VC本身的Menu和ToolBar.

fzd999 2004-01-04
  • 打赏
  • 举报
回复
ps 假如你得到了正确方法,麻烦告诉我好吗?100分相送
fzd999 2004-01-04
  • 打赏
  • 举报
回复
楼主,你的问题很有趣。我以前曾经看过类似的介绍,印象已经不深了,概略说一下,但愿对你有所帮助。

想要在VC中插入自己的菜单或者ToolBar,一般自己制作一个dll插件放到VC的安装目录下,然后在DevelopStudio里面设置。也可以通过修改注册表来完成。具体方法已经没有印象了。对不起。

建议你到看雪学苑去求助一下,那里的软件调试高手可能能告诉你一些具体的细节。
lambochan 2004-01-04
  • 打赏
  • 举报
回复
ToolBar容易啊,插入个ToolBar资源,然后在MainFrm.h声明:
CToolBar MyToolBar;
在OnCreate()加入:
if(!MyToolBar.CreateEx(this,TBSTYLE_FLAT,WS_CHILD|WS_VISBILE|CBRS_TOP
|CBRS_GRIPPER|CRBS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC)
|| !MyToolBar.LoadToolBar(工具条ID))
{//Create失败?
TRACE0("Failed to Create toolbar\n");
return -1;
}
MyToolBar.EnbleDocking(CBRS_ALIGN_ANY);//使工具栏可停靠
DockControlBar(&MyToolBar);//停靠工具栏~~
windyloft 2004-01-04
  • 打赏
  • 举报
回复
新建toolbar
if (!m_wndLogToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE
| CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY
| CBRS_SIZE_DYNAMIC)
|| !m_wndLogToolBar.LoadToolBar(IDR_TOOLBAR_LOGTOOL))
{
TRACE0("Failed to create toolbar\n");
return -1;
}

2,586

社区成员

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

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