🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1849

Re: Balloon Tips auto popups

#1849
From: Bob Gonder
Date: Sat, 26 May 2007 00:26
63 lines
3021 bytes
Mike Collins wrote:

>However, i now need to force the Balloon To show, in order to bring the 
>users attention to the panel..  I need to force this from code, not from the 
>user mouse-overing.  I though i could do this simply enough by calling:
>
>   SendMessage(hWnd, (UINT)TTM_ACTIVATE,(WPARAM)TRUE, 0);

hWnd needs to be the HWND of the control (p_hTTips or
Panel1->Handle?).
Your code didn't show this line though.

>but it doesn't seem to do anything.  Can anyone point me in the right 
>direction here - sure i'm missing something with the flags but MSDN is a 
>nightmare.

>if (p_hTTips)
>   {
>      ZeroMemory(&p_ti, sizeof(p_ti));
>     p_ti.cbSize   = sizeof(p_ti);

	isn't p_ti a pointer (reference) ?
	what is the size of a reference?

>      p_ti.uFlags   = p_uFlags;		//NIF_INFO,

	NIF_INFO is not listed as a uFlag value.
http://msdn2.microsoft.com/en-us/library/ms650460.aspx
	Try TTF_SUBCLASS

>      p_ti.hwnd     = p_WinControl->Handle;//hSrcWnd;
>      p_ti.uId      = 0;
>      p_ti.hinst    = NULL;

I think that needs to be real (maybe only if Text is a resource)

>      p_ti.lpszText = p_szBody.c_str();

p_szBody is a temporary which is deleted as soon as you return from
this routine.

>void Form::AssignBalloonTip(HWND &p_hTTips,
>	TOOLINFO &p_ti,	TWinControl *p_WinControl,
>	const AnsiString &p_szTitle, const AnsiString&p_szBody,
>	UINT p_uIcon,	UINT p_uFlags,
>	TColor clBackCL, TColor clTextCL)

>   AssignBalloonTip(hPanWnd,
>	 tiPanTip,	 Panel1,
>	"Some title",            "body of text",
>	TTI_ERROR,	NIF_INFO,
>	(TColor)clCream, (TColor)clBlack);

Ok, now the Google links that show how do it another way:

THintWindow:
http://groups.google.com/group/alt.comp.lang.borland-delphi/browse_thread/thread/cedde909c84f8255/904d39234d8706b8
http://tinyurl.com/2nkhbp
(Expand the messages at the bottom)

THintWindow:
http://groups.google.com/group/borland.public.delphi.language.delphi.general/browse_thread/thread/e53c4da619491e3b/4bd61436f18c39f7
http://tinyurl.com/2au2vn
Technical Details
Message-ID: <a3re53du6q1745cm3g0575ppn2p9aa5185@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46576a88$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2d869665372650f7
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Balloon Tips auto popups
Date: Fri, 25 May 2007 17:26:52 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <a3re53du6q1745cm3g0575ppn2p9aa5185@4ax.com>
References: <46576a88$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.147.10
X-Trace: newsgroups.borland.com 1180139208 67.77.147.10 (25 May 2007 17:26:48 -0700)
Lines: 67
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail