🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: InitCommonControlsEx()???

#1429
From: Mike Collins
Date: Fri, 24 Aug 2007 12:26
63 lines
3567 bytes
Hi remy, i keep ranting on about these Balloon Tips but i'm struggling to 
get an consistancy in my depolyments.

In test / demo applications this code wrapper works fine but when i 
incorperate it into my GINA based help dialog (TForm based) the balloon tips 
display and then once they timeout, they won't display again.  The wrapper 
looks like this:


void 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,
                                 UINT p_uShowDelay)
{
   p_hTTips = CreateWindowEx(WS_EX_TOPMOST, "tooltips_class32", NULL,
                             WS_POPUP | TTS_NOPREFIX | TTS_BALLOON | 
TTS_ALWAYSTIP,
                             0, 0, 0, 0, p_WinControl->Handle, NULL, 
HInstance, NULL);
   if (p_hTTips)
   {
      ZeroMemory(&p_ti, sizeof(TOOLINFO));
      p_ti.cbSize   = sizeof(TOOLINFO);
      p_ti.uFlags   = p_uFlags;
      p_ti.hwnd     = p_WinControl->Handle;
      p_ti.uId      = 0;
      p_ti.hinst    = NULL;
      p_ti.lpszText = p_szBody.c_str();

      SetWindowPos(p_hTTips, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | 
SWP_NOMOVE | SWP_NOSIZE);
      ::GetClientRect(p_WinControl->Handle, &p_ti.rect);
      SendMessage(p_hTTips, TTM_SETTIPBKCOLOR, clBackCL, 0);
      SendMessage(p_hTTips, TTM_SETTIPTEXTCOLOR, clTextCL, 0);
      SendMessage(p_hTTips, TTM_SETTITLE, p_uIcon, (int)p_szTitle.c_str());
      SendMessage(p_hTTips, TTM_ADDTOOL, 0, (LPARAM)&p_ti);
      SendMessage(p_hTTips, TTM_SETDELAYTIME, TTDT_AUTOPOP, p_uShowDelay);
   }
}

and i assign it like this:

      AssignBalloonTip(hProxWnd, tiProxTip, Edit1,
                                 "Balloon Tip Title",
                                 "Balloon Tip body if information"
                                 TTI_INFO, TTF_SUBCLASS | TTF_TRANSPARENT, 
(TColor)clCream,
                                 (TColor)clBlack, 10000);

where hProxWnd and tiProcTip are privately declared varaible...  Might just 
be an issue with using these systems within the context of the Winlogon 
desktop.  I also don't see my icons / glyphs painted in the listview on the 
same dialog.

Cheers


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:46cdd634$1@newsgroups.borland.com...
>
Technical Details
Message-ID: <46cebdca@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!83.80.28.12.MISMATCH!multikabel.net!newsfeed10.multikabel.net!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46cdce8c@newsgroups.borland.com> <46cdd634$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,168916ec9e35fe7e
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mike Collins" <its@TheBottomOfThePost>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46cdce8c@newsgroups.borland.com> <46cdd634$1@newsgroups.borland.com>
Subject: Re: InitCommonControlsEx()???
Date: Fri, 24 Aug 2007 12:26:12 -0000
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.3959
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 84.13.105.128
Message-ID: <46cebdca@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1187954122 84.13.105.128 (24 Aug 2007 04:15:22 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!83.80.28.12.MISMATCH!multikabel.net!newsfeed10.multikabel.net!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail