如何禁用工具栏下拉按钮但不禁用箭头 [英] How to disable a toolbar dropdown button but not the arrow
问题描述
我的MFC应用程序中的
我有一个带有一些下拉按钮的工具栏。这些按钮是用
Hi,
in my MFC application I do have a toolbar with some dropdown buttons. These buttons are created with
SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS)
创建的,因此它们有两部分用户可以按:
1.主按钮部分
2.箭头按钮部分
在不同情况下我想禁用一些完全或部分按下这些按钮(下拉菜单中的一些菜单项)。
现在只有一个问题我找不到合适的解决方案:
我想禁用下拉按钮的主要部分并启用箭头部分以访问下拉菜单及其相关操作。
这是否可能没有写我自己的下拉按钮类(由mfc下拉按钮派生)?
如果是,怎么做?
So they have 2 parts the user can press:
1. Main button part
2. Arrow button part
In different situations I want to disable some of these buttons completely or just partly (some menu items of the dropdown menu).
There is now only one problem I can't find a proper solution for:
When I want to disable the main part of the dropdown button and leave the arrow part enabled to access the dropdown menu and its related actions.
Is this possible w/o writing my own dropdown button class (derived by the mfc dropdown button)?
If yes, how?
推荐答案
希望这有帮助,
http://msdn.microsoft.com/en-us/library/1ke6s1fc。 aspx [ ^ ]
所有最佳:)
Hope this helps,
http://msdn.microsoft.com/en-us/library/1ke6s1fc.aspx[^]
All the Best:)
这篇关于如何禁用工具栏下拉按钮但不禁用箭头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!