Article View: borland.public.cppbuilder.nativeapi
Article #2348Re: Balloon Hint
From: Vladimir Stefanovic
Date: Mon, 05 Mar 2007 17:54
Date: Mon, 05 Mar 2007 17:54
30 lines
1706 bytes
1706 bytes
> [...] but I would like to beable to arbitrarily display a balloon
> hint anywhere on a window. How to do this ??
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
HWND const hToolTip =
CreateWindow( TOOLTIPS_CLASS, NULL, TTS_BALLOON, 0, 0, 0, 0, Handle,
NULL, HInstance, NULL );
if ( hToolTip != NULL )
{
TOOLINFO tool_info = {0};
tool_info.cbSize = sizeof(tool_info);
tool_info.uFlags = TTF_SUBCLASS | TTF_TRANSPARENT;
tool_info.hwnd = Edit1->Handle;
tool_info.lpszText = Edit1->Text.c_str();
CopyRect( &tool_info.rect, &(Edit1->ClientRect) );
SNDMSG( hToolTip, TTM_ADDTOOL, 0,
reinterpret_cast<LPARAM>(&tool_info) );
}
}
--
Best Regards,
Vladimir Stefanovic
Technical Details
Message-ID:
<45ec592f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45e98729$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b8b63689ab57ca91 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Newsgroups: borland.public.cppbuilder.nativeapi References: <45e98729$1@newsgroups.borland.com> Subject: Re: Balloon Hint Date: Mon, 5 Mar 2007 18:54:13 +0100 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 87.116.181.111 Message-ID: <45ec592f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1173117231 87.116.181.111 (5 Mar 2007 09:53:51 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail