Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi WH_CBT Hook mit HCBT_MOVESIZE (https://www.delphipraxis.net/136829-wh_cbt-hook-mit-hcbt_movesize.html)

MasterEvil 8. Jul 2009 16:35


WH_CBT Hook mit HCBT_MOVESIZE
 
Hallo,

ich habe eine Bildschirmtastatur entwickelt und brauchte einen WH_CBT Hook (lokaler Hook), um zu erkennen wann sich der Fokus auf ein anderes Control geändert hat (HCBT_SETFOCUS). Dies hat auch soweit alles wunderbar geklappt.

Ich blenden bei diesem Keyboard als TOPMOST-Fenster Wortvorschläge ein und dieses Fenster wird nicht mit verschoben, wenn sich das Formular verschiebt. Da ich nun schon einen Hook hatte, dachte ich, reagieren wir doch auch auf HCBT_MOVESIZE und verschieben das Fenster mit. HCBT_MOVESIZE soll immer ausgelöst werden, wenn ein Window sich verschiebt oder seine Größe ändert. Der Code wird nur leider nicht ausgelöst ...

Delphi-Quellcode:
function HookProc(Code: Integer; WParam: wParam; LParam: lParam): LRESULT;
begin
  if Code=HCBT_SETFOCUS then
  begin
    if FCompletionUse then FCompletion.CurrentWordClear;
  end else if Code=HCBT_MOVESIZE then
  begin
    if FCompletion.Visible then FCompletion.UpdatePosition;
  end;
  Result:=CallNextHookEx(FHook,Code,WParam,LParam);
end;
Code=HCBT_SETFOCUS kommt an, Code=HCBT_MOVESIZE kommt nicht an.

Hat evtl. jemand eine Idee, warum diese Meldung bei mir nicht ankommt?

Gruß,
Steffen

MasterEvil 13. Jul 2009 09:26

Re: WH_CBT Hook mit HCBT_MOVESIZE
 
Niemand eine Idee?


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:35 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz