🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.migration
Article #142

Re: Tooltip problem

#142
From: Michael Corby
Date: Tue, 15 Jul 2008 15:54
61 lines
2978 bytes
Should have mentioned:-  C++Builder2007 on Windows Vista.

"Michael Corby" <mcorby@indigo.ie> wrote in message 
news:487cc7ee$1@newsgroups.borland.com...
>
> Tooltips that are working fine in BDS2006 are not showing in 
> C++Builder2007.
>
> Below are relevant code snippets:-
>
>
> HWND hWndTipAlpha;
> TOOLINFO tiAlpha;
>
> //---------------------------------------------------------------------------
> __fastcall TwMaintRegNewMod::TwMaintRegNewMod(TComponent* Owner) : 
> TForm(Owner)
> {
> AssignBalloonTip(hWndTipAlpha, tiAlpha, eAlphaCode, "Invalid Character",
>          "You can only type an alphabetic character here",
>          TTI_ERROR, TTF_ABSOLUTE | TTF_IDISHWND | TTF_SUBCLASS | TTF_TRACK 
> | TTF_TRANSPARENT,
>          (TColor)clCream, (TColor)clBlack);
>
> }
> //---------------------------------------------------------------------------
>
>
> The code below is in a KeyPress event:-
>
>
>       if (hWndTipAlpha)
>       {
>        // Set the position of the Editbox tooltip
>        // If the form moves, the co-ordinates are still valid
>        TPoint pSrcCo, pTipCo;
>        pSrcCo = Point((eAlphaCode->Left + (eAlphaCode->Width/2)),
>                (eAlphaCode->Top + eAlphaCode->Height));
>        pTipCo = ClientToScreen(pSrcCo);
>        SendMessage(hWndTipAlpha, TTM_TRACKPOSITION, 0,
>              (LPARAM)MAKELONG(pTipCo.x, pTipCo.y));
>        SetWindowPos(hWndTipAlpha, HWND_TOPMOST, 0, 0, 0, 0,
>               SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
>
>        SendMessage(hWndTipAlpha,(UINT)TTM_TRACKACTIVATE, TRUE,
>              (LPARAM)(LPTOOLINFO)&tiAlpha);
>        SetWindowPos(hWndTipAlpha, HWND_TOPMOST, 0, 0, 0, 0,
>               SWP_NOSIZE | SWP_NOMOVE);
>        eAlphaCode->SetFocus();
>       }
>
>
> Are any code changes required ?
>
> Help appreciated.
>
> Michael Corby
>
>
>
> 
Technical Details
Message-ID: <487cc85e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!news.isoc.lu!newsgroups.borland.com!not-for-mail
References: <487cc7ee$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 110f51,64137f8bec71eb44,start
X-Google-Attributes: gid110f51,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Michael Corby" <mcorby@indigo.ie>
Newsgroups: borland.public.cppbuilder.migration
References: <487cc7ee$1@newsgroups.borland.com>
In-Reply-To: <487cc7ee$1@newsgroups.borland.com>
Subject: Re: Tooltip problem
Date: Tue, 15 Jul 2008 16:54:51 +0100
Lines: 62
MIME-Version: 1.0
Content-Type: text/plain;
 format=flowed;
 charset="iso-8859-1";
 reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000
NNTP-Posting-Host: 83.71.100.21
Message-ID: <487cc85e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1216137310 83.71.100.21 (15 Jul 2008 08:55:10 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!news.isoc.lu!newsgroups.borland.com!not-for-mail