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

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


Tooltips on disabled controls in a DLL modeless dialog box

Severino Delaurenti -- del@alpha.ico.olivetti.com
Thursday, May 09, 1996

Platform: Windows 95, VC++ 4.0

I have written a DLL which displays a modeless dialog box and I have put =
tooltips on some control (buttons of class CBitmapButton).

I have used a Hook function to intercept messages to controls as =
explained in the KB article titled "Using a Tooltip Control with a =
Dialog Box", and all works fine, but I have a doubt:

The tooltip string is displayed only on buttons enabled, while disabled =
ones don't display anything: it is possible to have tooltips also on =
disabled buttons (as toolbars do) ?

Thanks in advance.

                                Severino Delaurenti
                                Olivetti Lexikon Spa
                                Italy





David W. Gillett -- DGILLETT@expertedge.com
Monday, May 13, 1996

> I have used a Hook function to intercept messages to controls as
> explained in the KB article titled "Using a Tooltip Control with a
> Dialog Box", and all works fine, but I have a doubt:
> 
> The tooltip string is displayed only on buttons enabled, while
> disabled ones don't display anything: it is possible to have
> tooltips also on disabled buttons (as toolbars do) ? 

  My hunch is that the messages your hook catches are not sent to 
disabled controls.  This suggests two possible approaches:

(1) Modify the button code so that when "disabled", the button window 
is actually still enabled but its behaviour is overridden.  This 
could be more effort than you'd like.

(2) When the buttons are disabled, the messages probably go to their 
parent intead.  Perhaps the parent can either handle the tooltip 
display, or redirect the messages to the buttons.

Dave





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