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!