Article View: borland.public.cppbuilder.nativeapi
Article #12775Re: Hooking to Windows ToolTips
From: Remy Lebeau (TeamB)
Date: Mon, 17 Nov 2003 18:01
Date: Mon, 17 Nov 2003 18:01
32 lines
2552 bytes
2552 bytes
"Marc" <remove_Bukwheat@axess.com> wrote in message news:3fb8e5d5$1@newsgroups.borland.com... > The class subclassing also doesn't seem to work. You cannot subclass external windows. If you want to intercept messages from other applications, then you must use a message hook dll via SetWindowsHookEx(). > What I am trying to do, is trap the fact that a tooltip is > about to be displayed, and modify the text of it, and maybe > even its location if needed. I already have achieved this > with system menus, but can't do it with tooltips. Where does > widows do its messaging for tooltips? Tooltips are handled on a per-application, per-window basis. Each individual application creates and displays its own tooltip windows when appropriate, like any other window. However, even that is not standardized. VCL apps, for example, handle tooltips very differently than, say, VB or VC++. The VCL uses its own standalone THintWindow class, which has nothing to do with the native tooltip features provided by the Win32 API. In fact, the VCL has no concept of the API tooltips at all. On the other hand, those applications that do use true API tooltips will most likely receive a WM_NOTIFY message containing either a TTN_GETDISPINFO or TTN_NEEDTEXT notification just prior to displaying the tooltip, so you can try looking for those notifications in your message hook. Gambit
Technical Details
Message-ID:
<3fb90c0a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fb3ef78$1@newsgroups.borland.com> <3fb3f737@newsgroups.borland.com> <3fb4ec69$1@newsgroups.borland.com> <3fb5015f$1@newsgroups.borland.com> <3fb514e5$1@newsgroups.borland.com> <3fb522c0$1@newsgroups.borland.com> <3fb8e5d5$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,77f5c963a5b23dbd X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-17 10:10:06 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fb3ef78$1@newsgroups.borland.com> <3fb3f737@newsgroups.borland.com> <3fb4ec69$1@newsgroups.borland.com> <3fb5015f$1@newsgroups.borland.com> <3fb514e5$1@newsgroups.borland.com> <3fb522c0$1@newsgroups.borland.com> <3fb8e5d5$1@newsgroups.borland.com> Subject: Re: Hooking to Windows ToolTips Date: Mon, 17 Nov 2003 10:01:11 -0800 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.137.149 Message-ID: <3fb90c0a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069091850 67.22.137.149 (17 Nov 2003 09:57:30 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail