您的位置:程序门 -> vc/mfc -> 界面



求教,鼠标移至文件夹时浮现的那个对话框在mfc如何实现


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


求教,鼠标移至文件夹时浮现的那个对话框在mfc如何实现[已结贴,结贴人:hhq188]
发表于:2007-04-12 08:49:23 楼主
鼠标移至文件夹时浮现的那个对话框叫什么??
              在mfc如何实现,
              现在要实现的是在mfc下画一个三角形,在鼠标移至三角形
              的任意一条边时,浮现一个气泡框(类似提示那种,显示三角形边长和宽度),
              现在不明白这个气泡框该如何理解和实现,所以给个文件夹的属性参照
              在几个论坛发帖都没人回,
              请高手解答,谢谢!!
发表于:2007-04-12 16:48:171楼 得分:15
mfc  
ctooltipctrl   class
发表于:2007-04-12 21:43:002楼 得分:5
mfc  
ctooltipctrl   class
发表于:2007-04-12 22:01:513楼 得分:50
view.h:
ctooltipctrl     tooltipctrl;

view.cpp:
pretranslatemessage(msg*   pmsg)  
{
      if   (null   !=   tooltipctrl)                        
            tooltipctrl-> relayevent(pmsg);
}

oninitialupdate()  
{
cview::oninitialupdate();
//   todo:   add   your   specialized   code   here   and/or   call   the   base   class

enabletooltips(true);
tooltipctrl.create(this);
tooltipctrl.activate(true);
  }

onmousemove(uint   nflags,   cpoint   point)
{
rect   rect;
rect.left   =   100;
rect.top   =   100;
rect.right   =   300;
rect.bottom   =   300;
if(ptinrect(&rect,   point))
{
tooltipctrl.addtool(this,   "idc_button1 ");
}
   
发表于:2007-04-13 08:43:444楼 得分:5
the   ctooltipctrl   class   encapsulates   the   functionality   of   a   “tool   tip   control,”   a   small   pop-up   window   that   displays   a   single   line   of   text   describing   the   purpose   of   a   tool   in   an   application.   a   “tool”   is   either   a   window,   such   as   a   child   window   or   control,   or   an   application-defined   rectangular   area   within   a   window's   client   area.   a   tool   tip   is   hidden   most   of   the   time,   appearing   only   when   the   user   puts   the   cursor   on   a   tool   and   leaves   it   there   for   approximately   one-half   second.   the   tool   tip   appears   near   the   cursor   and   disappears   when   the   user   clicks   a   mouse   button   or   moves   the   cursor   off   the   tool.

发表于:2007-04-13 08:47:125楼 得分:5
http://www.codeproject.com/miscctrl/pptooltip.asp
发表于:2007-04-14 09:38:136楼 得分:0
电脑上csdn很慢,打开网页总是不能显示,这几天也没看帖子,前天才知道这个东西是          
tooltip,怎么实现还得自己看了,先谢上面回复的几位


快速检索

最新资讯
热门点击