ToolBar的Customize为什么不起作用??

shuinu 2000-02-28 01:31:00
加精
(VC6中)我在程序中加入以下一行代码想对工具条进行定制,但定制窗口只是闪了一下就关闭了,哪位指点一下吧。
m_toolbar.GetToolBarCtrl().Customize();
我的环境是NT4+SP6+IE4,
...全文
179 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
longx 2000-02-29
  • 打赏
  • 举报
回复
你必须至少处理这两个消息,TBN_QUERYINSERT,TBN_QUERYDELETE才正常显示
要想有用你得处理更多的有关工具条消息。请看下面演示代码.

在CMainFrame头文件中申明:
afx_msg void NotifyQI(NMHDR* hdr,LRESULT* res);
在CMainFrame实现文件中:
1.) 加上消息映射
ON_NOTIFY(TBN_QUERYINSERT,AFX_IDW_TOOLBAR,NotifyQI)
ON_NOTIFY(TBN_QUERYDELETE,AFX_IDW_TOOLBAR,NotifyQI)
2.)消息处理函数的实现.
void CMainFrame::NotifyQI(NMHDR* hdr,LRESULT* res)
{
*res=(LRESULT)TRUE;
}
这样你就会看到定制界面了。


shuinu 2000-02-29
  • 打赏
  • 举报
回复
已经设置了CCS_ADJUSTABLE
Jackzhu 2000-02-28
  • 打赏
  • 举报
回复
你的toolBar设置如下类型吗?
CCS_ADJUSTABLE
可以随时监测上网情况,和有无被攻击 X-NetStat is a program that displays information on your current Internet and network connections, much like the console netstat.exe program, but in a graphical interface. These connections are established each time you visit a web page, send an instant message, check your email, or anytime you do network activity that requires you to connect to another computer. They also appear when outside computers attempt to connect to your machine, authorized or not. Features: - Display all TCP Connections & UDP listens - Connection Info: Addresses, Status, Ports, etc - Process Info: Show program EXE behind connections - Location Info: 1-Click Auto-WHOIS - System Info: Uptime, MAC Address, Workgroup, etc - Ability to Kill/Disconnect connections - Nuke Connections (mass kill) - DNS Cache for fast hostname resolution - Log XNS activity to file / Log Manager - Feature-Centric customizable toolbar - ViewBar & System Tray Access - Remote Access thru X-NetStat Web Server - Comprehensive Port Information Database - Get External IP address - Show In/Out Traffic Rates / LED traffic lights - 1-Click access to common DOS network commands - Banish Hostname (prevent outgoing connections) - Condition/Action Rules system - Print / Save Connection Table - Customize Columns & Toolbar buttons - Customize Status Bar - Customize External Programs - Customize Font & Appearance - Extensive set of configurable Options - Lookup Tools (WHOIS, TraceRoute, etc) - Net Stats (Interface, TCP, IP, ICMP, UDP) - Check for Updates - Assign addresses ”friendly” names - Filter/Search Connections - Bulk IP Import Tool (resolve IP lists) - AutoRefresh & Pause buttons

16,470

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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