showing tooltip on controls (description on TTN_NEEDTEXT)
2006-11-10 06:20
429 查看
Before the tool tip is displayed, the TTN_NEEDTEXT notification message is sent to the owner window of the toolbar to retrieve the descriptive text for the button. If the owner window of the toolbaris a CFrameWnd window, tool tips are displayed wihout any extra effort, because CFrameWnd has a default handler for the TTN_NEEDTEXT notification. If the owner window of the toolbaris not derived from CFrameWnd, such as a dialog box or form view, you must add an entry to the message map of your owner window and provide a notification handler in the message map. The entry to the message map of your owner window is as follows:
ON_NOTIFY_EX( TTN_NEEDTEXT, 0, memberFxn )
memberFxn
The method to be called when text is needed for this button.
Note that the id of a tool tip is always 0.
In addition to the TTN_NEEDTEXT notification, a tool tip control can send the following notifications to a toolbar control:
Notification Meaning
TTN_NEEDTEXTA Tool tip control requires ASCII text (Win95 only).
TTN_NEEDTEXTW Tool tip control requires UNICODE text (Windows NT only).
TBN_HOTITEMCHANGE Indicates that the hot (highlighted) item has changed.
NM_RCLICK Indicates the user has right-clicked a button.
TBN_DRAGOUT Indicates the user has clicked the button and dragged the pointer off the button. It allows an application to implement drag and drop from a toolbar button. When receiving this notification, the application will begin the drag and drop operation.
TBN_DROPDOWN Indicates the user has clicked a button that uses the TBSTYLE_DROPDOWN style.
TBN_GETOBJECT Indicates the user moved the pointer over a button ithat uses the TBSTYLE_DROPPABLE style. The message.
ON_NOTIFY_EX( TTN_NEEDTEXT, 0, memberFxn )
memberFxn
The method to be called when text is needed for this button.
Note that the id of a tool tip is always 0.
In addition to the TTN_NEEDTEXT notification, a tool tip control can send the following notifications to a toolbar control:
Notification Meaning
TTN_NEEDTEXTA Tool tip control requires ASCII text (Win95 only).
TTN_NEEDTEXTW Tool tip control requires UNICODE text (Windows NT only).
TBN_HOTITEMCHANGE Indicates that the hot (highlighted) item has changed.
NM_RCLICK Indicates the user has right-clicked a button.
TBN_DRAGOUT Indicates the user has clicked the button and dragged the pointer off the button. It allows an application to implement drag and drop from a toolbar button. When receiving this notification, the application will begin the drag and drop operation.
TBN_DROPDOWN Indicates the user has clicked a button that uses the TBSTYLE_DROPDOWN style.
TBN_GETOBJECT Indicates the user moved the pointer over a button ithat uses the TBSTYLE_DROPPABLE style. The message.
相关文章推荐
- CToolBar 实现工具栏及提示功能 ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTip)
- CToolBar CImageList 实现工具栏及提示功能 ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTip)
- Showing Tool Tips on controls
- ongettext 事件
- how to put the text on the left of a radio button in android
- You need to run build with JDK or have tools.jar on the classpath.
- ArcGIS Engine Controls fail to build using Visual Studio 2010 on a 64-bit OS
- Material Theme on sublime text 3 一个用起来很好的Sublime主题
- [Accessibility] Missing contentDescription attribute on image
- Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- A Survey on Automatic Text Summarization
- EasyDemo*事件监听之EditText~addTextChangedListener(on Github)
- Building ASP.NET Server Controls-TextChanged.cs
- Showing Images and Text in Toolbar
- On-Line Rich Text Editor.
- ruby on rails 使用text存储hash类型的数据 Use text filed to store the hash map
- 关于 Missing contentDescription attribute on image 警告的问题解决
- [zz]javascript: Dynamically change a normal text statement on a html page
- 安装wampserver3.0.6后进phpmyadmin报错D:\wamp64\apps\phpmyadmin4.6.4\libraries\php-gettext\gettext.inc on l