A question of capturing mouse information using hooks

xiaoxiao2021-03-06  97

Using SETWINDOWSHOKEX (Wh_Mouse?, Mousehookhandler, hinstance, 0) to capture mouse information, where the MouseHookHandler's format is as follows:

LResult Callback MouseProc

??? Int ncode,? // hook code ??? wparam wparam,? // message identifier ??? lparam lparam? // mouse coordinates ??);

The third parameter LPARAM is a pointer to the MousehookStruct structure. This structure contains what you want to get (eg hwnd), but weird is Delphi doesn't know MousehookStruct (this is written in its own help document), In addition, lParam ^ .hWnd or Pointer (lParam) ^. HWND is completed, how do you take out information in LPARAM? Thank you!

转载请注明原文地址:https://www.9cbs.com/read-122750.html

New Post(0)