- UID
- 1
- 积分
- 16111
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
How to create the tooltip for a bitmap button?
ID 45283
Applies to: AutoCAD 2000
Date 5/31/2000
This document is part of AcUi/AdUi ObjectARX MFC User Interface ObjectARX Technical Newsletter - November 1999
Question
I have created a CAcUiBitmapButton. How do I create the tooltip text that
displays when the cursor is placed over the button?
Answer
CAcUiBitmapButton has implemented everything necessary for doing this; you only
need to provide the tooltip string within the caption, such as SAMP|Sample
Button1.
Notice the SAMP before the vertical bar is the bitmap's resource ID name. This
is when you design the dialog button and set the properties. Also, make sure you
choose owner draw style for the button.
Moreover, you can create multiple lines of tooltip by overriding OnGetTipText()
and modifying the reference parameter to the text string you want.
To demonstrate these approaches, the attached sample application has two
separate buttons; one uses CAcUiBitmapButton and the other is derived from
CAdUiOwnerDrawButton. In addition, it shows how to draw a text button that
changes it appearance when it is clicked.
Note that this approach also applies to all CAxUiWhatever control classes, such
as CAcUiColorComboBox, CAcUiAngleComboBox, CAcUiAngleEdit, and so on.
Also see DevNote #45267. |
|