Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i change this "hint" [BCB]

Status
Not open for further replies.
It looks like you are using a newer version of C++Builder. Which version?

Also, is this a hint from the system or from a program you are working on?



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
using Borland C++ 2010. Hint form system...I do not know include. I would like to change only the language, if possible?
 
sorry using 2009 C++ Bilder
 
Both C++Builder 2009 and 2010 can use Unicode. I'm still struggling with that. That's about all I can help with.

James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Here is an example how to change "HINT" or create balloon tip

Code:
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
typedef struct{

 unsigned long     cbStruct;
 PWChar     pszTitle;
 PWChar     pszText;
 int         ttiIcon;
   } tagEDITBALLOONTIP;
  tagEDITBALLOONTIP *EDITHINT;


void __fastcall ShowBalloonTip(TWinControl *Control,int  Icon,char *Title,char *Text,TColor BackCL,TColor TextCL)
{
    HWND hWndTip;
	TOOLINFO ti;
    HWND hWnd;

	hWnd    = Control->Handle;
    hWndTip = CreateWindow(TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_BALLOON | TTS_ALWAYSTIP, 0, 0, 0, 0, hWnd, 0, HInstance, NULL);
	if( hWndTip )
    {
        SetWindowPos(hWndTip, HWND_TOPMOST, 0, 0, 0, 0,
		  SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
        ti.cbSize = sizeof(ti);
        ti.uFlags = TTF_CENTERTIP | TTF_TRANSPARENT | TTF_SUBCLASS;
        ti.hwnd = hWnd;
        ti.lpszText = Text;
        GetClientRect(hWnd, &ti.rect);
        SendMessage(hWndTip, TTM_SETTIPBKCOLOR, BackCL, 0);
        SendMessage(hWndTip, TTM_SETTIPTEXTCOLOR, TextCL, 0);
        SendMessage(hWndTip, TTM_ADDTOOL, 1, Integer(&ti));
        SendMessage(hWndTip, TTM_SETTITLE, Icon % 4, Integer(Title));
    }
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{

ShowBalloonTip(Button1, 1, "ik0","Example on how to create Balloon Tips in C++ Builder", ColorBox1->Selected,ColorBox2->Selected );

}

2afd3c5.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top