Article View: borland.public.cppbuilder.nativeapi
Article #4401Re: Eliminate delay in displaying hint
From: Remy Lebeau (TeamB)
Date: Fri, 03 Feb 2006 19:00
Date: Fri, 03 Feb 2006 19:00
42 lines
2370 bytes
2370 bytes
"TerryC" <user@server.net> wrote in message
news:43e37512$1@newsgroups.borland.com...
> I also added a handler for the OnMouseMove event of
> the control on which the first one lives, to reset the HintPause,
> etc. values back to defaults and detach the OnShowHint handler
> so other hints on the form will behave in the normal way.
If you want to effect the hint timeouts for only a specific control, then
there is a much more efficient way to do that - subclass the control's
WindowProc property so that you can intercept the CM_HINTSHOW message
directly. Then you don't need to use the TApplication::HintHidePause
property, the TApplication::OnShowHint event, or the parent control's
OnMouseMove event at all.
For example:
TWndMethod OldWndProc = NULL;
__fastcall TForm1::TForm1(TComponent *Owner)
: TForm(Owner)
{
OldWndProc = TheControl->WindowProc;
TheControl->WindowProc = TheControlWndProc;
}
void __fastcall TForm1::TheControlWndProc(TMessage &Message)
{
OldWndProc(Message);
if( (Message.Msg == CM_HINTSHOW) && (Message.Result == 0) )
{
THintInfo *HintInfo =
reinterpret_cast<THintInfo*>(Message.LParam);
HintInfo->HideTimeout = 10000;
HintInfo->ReshowTimeout = 15;
}
}
Gambit
Technical Details
Message-ID:
<43e3a7b6$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<43e27f33$1@newsgroups.borland.com> <43e284a8$3@newsgroups.borland.com> <43e28b6e$1@newsgroups.borland.com> <43e2cf80$1@newsgroups.borland.com> <43e37512$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d93bae9e3a2fedd4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <43e27f33$1@newsgroups.borland.com> <43e284a8$3@newsgroups.borland.com> <43e28b6e$1@newsgroups.borland.com> <43e2cf80$1@newsgroups.borland.com> <43e37512$1@newsgroups.borland.com> Subject: Re: Eliminate delay in displaying hint Date: Fri, 3 Feb 2006 11:00:41 -0800 Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <43e3a7b6$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1138993078 68.69.17.41 (3 Feb 2006 10:57:58 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail