PDA

View Full Version : مقاله: BALLOONTIP برای EDIT



mortezakiaee
شنبه 26 مرداد 1387, 10:54 صبح
type
tagEDITBALLOONTIP = record
cbStruct: Longword;
pszTitle: PWChar;
pszText: PWChar;
ttiIcon: Integer;
end;
type
PEDITBALLOONTIP = ^tagEDITBALLOONTIP;

const
ECM_FIRST = $00001500;
EM_SHOWBALLOONTIP = ECM_FIRST + 3;

procedure TForm1.Button1Click(Sender: TObject);
var
ebt: tagEDITBALLOONTIP;
title, Text: Widestring;
icon: Integer;
begin
title := 'tooltip!!';
Text := 'in editbox :)';
icon := 1; //0,1,2,3
with ebt do
begin
cbStruct := SizeOf(ebt);
pszTitle := PWideChar(title);
pszText := PWideChar(Text);
ttiIcon := icon;
end;
SendMessage(Edit1.Handle, EM_SHOWBALLOONTIP, 0, Longint(@ebt));
end;


نقل از سایت TORRY
MSDN :
http://msdn.microsoft.com/en-us/library/bb761668(VS.85,printer).aspx (http://msdn.microsoft.com/en-us/library/bb761668%28VS.85,printer%29.aspx)

نکته مهم که جایی نبود. حتما از XPMAN استفاده کنید