function NHD_FlyWndProc(hWnd, Msg,wParam,lParam: Integer): Integer; stdcall;
function NHD_CreateWindow(hInst: Integer): HWND;
procedure NHD_BeginGetWord(ptMousePos: TPOINT);
function NHD_ExitGetWords(): boolean;
function NHD_DestroyWindow(): boolean;
procedure NHD_FreeLoadedLib();
function NHD_InitGetWords(hInst: THANDLE; hwnd: HWND): HWND;
function NHD_LoadGetWordLib(): boolean;
var
WinClass: TWndClassA;
Inst: Integer;
Msg: TMsg;
hwnd := CreateWindowEx (WS_EX_TOPMOST or WS_EX_TOOLWINDOW,
'NHD_FLYWIN_DEMO',
'NHD_FlyWindow_Demo',
WS_POPUP or WS_VISIBLE,
NHD_WIN_INITPOSX,
NHD_WIN_INITPOSY,
NHD_FLYWIN_WIDTH,
NHD_FLYWIN_HEIGHT,
0,
0,
hInst,
nil);
result := hwnd;
end;
function NHD_FlyWndProc(hWnd, Msg,wParam,lParam: Integer): Integer; stdcall;
begin
//Unhook textout when reveived msg from getword;
if msg = g_WM_GetWordOk then begin
if g_bInGetWord then begin
g_bInGetWord := FALSE;
KillTimer(g_hFlyWin, NHD_GETWORD_TIMER);
g_nGWTimerID := 0;
BL_SetFlag32(GETWORD_DISABLE, 0, 0, 0);
if wParam = 0 then begin
BL_GetText32(@g_TextBuffer, sizeof(g_TextBuffer), @G_Rect);
end;
PostMessage(g_hNHMainWin, NHD_WM_GETWORD_OK, 0, 0);
result := 0;
exit;
end;
end;
result := DefWindowProc(hWnd, msg, wParam, lParam);
end;