Home > Back-end >  Delphi xe2 compiled bubbles show not to come out
Delphi xe2 compiled bubbles show not to come out

Time:10-10

Why the Delphi 7 compile SherryHint unit have bubbles, according to the Delphi xe2 compiled showed not to come out? Why is that? How to revised, xe2 compiled to normal, thank you very much

The unit SherryHint;

Interface

USES the
Windows, Messages, Classes, Controls, Forms, CommCtrl;

Type
THintWin=class (THintWindow)
Private
FLastActive: THandle;
Public
Procedure ActivateHint (the Rect: TRect; Const AHint: string); Override.
end;

Implementation

Procedure AddTipTool (hWnd: dwords. IconType: Integer; The Title and Text: PChar);
Const
TTS_BALLOON=$0040;
TTM_SETTITLE=WM_USER + 32;
Var
HWndTip: DWORD;
ToolInfo: TToolInfo;
The begin
HWndTip:=CreateWindow (TOOLTIPS_CLASS, nil,
WS_POPUP or TTS_NOPREFIX or TTS_BALLOON or TTS_ALWAYSTIP,
0, 0, 0, 0, hWnd, 0, HInstance, nil);
If (hWndTip<> 0) then
The begin
ToolInfo. CbSize:=SizeOf (ToolInfo);
ToolInfo. UFlags:=TTF_IDISHWND or TTF_SUBCLASS or TTF_TRANSPARENT;
ToolInfo. UId:=hWnd;
ToolInfo. LpszText:=Text;
SendMessage (hWndTip TTM_ADDTOOL, 1, Integer (@ ToolInfo));
SendMessage (hWndTip, TTM_SETTITLE IconType, Integer (Title));
end;
The InitCommonControls ();
end;

Procedure THintWin. ActivateHint (the Rect: TRect; Const AHint: string);
The begin
If FLastActive<> WindowFromPoint (Mouse. CursorPos) then
AddTipTool (WindowFromPoint (Mouse. CursorPos), 1, 'Sherry SoftWare, PChar (AHint));//Application. Hint));
FLastActive:=WindowFromPoint (Mouse. CursorPos);
end;

Initialization
Application. HintPause:=0;
Application. ShowHint:=False;
HintWindowClass:=THintWin;
Application. ShowHint:=True;
End.
  • Related