showing tooltip on controls (description on TTN_NEEDTEXT)

  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.     
 

转载于:https://www.cnblogs.com/cy163/archive/2006/11/10/556070.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值