15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Adding Tooltip to Scroll bar

R Venkat Raghavan -- venkat.raghavan@blr.sni.de
Tuesday, December 31, 1996

Environment : VC++ 4.0, Win NT 3.51

Hi,

I am trying to develop a Tooltip ScrollBar.
I created a Scroll bar and AddTool-ed it to my TooltipCtrl. It all works
fine 
but I need the tooltip to appear on the left side of the thumb and not
on the center
of the Scrollbar. And the tooltip should appear only when I click or
drag the thumb.

So I would like to know the following :

(i) Can I position the tooltip anywhere around the Tool's bounding rect
? 
   (I see that I can use TTF_CENTERTIP for centering the tooltip. This
displays 
    the tooltip at the center of the Scrollbar, which I do not want )

(ii) Can I get the thumb's rectangle so that I can pass that to AddTool
and it displays
     the tooltip over the Thumb ?


Thanx in advance.

Bye
Venkat




ktm@ormec.com
Tuesday, December 31, 1996

On mfc-l, Venkat Raghavan (venkat.raghavan@blr.sni.de) wrote:
> Environment : VC++ 4.0, Win NT 3.51
> 
> I am trying to develop a Tooltip ScrollBar.
> I created a Scroll bar and AddTool-ed it to my TooltipCtrl. It all works 
> fine but I need the tooltip to appear on the left side of the thumb 
> and not on the center of the Scrollbar. And the tooltip should 
> appear only when I click or drag the thumb.

This was discussed on the list a few months ago - check the archives for 
September 1996 (ftp://advn.com/pub/mfc/mfcl0139.zip or thereabouts). The title 
of the relevant messages is "tooltips w/ scroll bar thumb".

Mark Conway (mrc@mfltd.co.uk) was kind enough to provide a sample application 
that appears to do what you want, which is at 
  http://ourworld.compuserve.com/homepages/MRConway/

  Katy
-- 
Katy Mulvey                            ktm@ormec.com
Software Development Engineer
ORMEC Systems                          http://www.ormec.com




| Вернуться в корень Архива |