Ps: so sieht es nun in meiner Klasse aus:
SetWindowLongPtr(fHiddenWnd, GWL_USERDATA, NativeInt(Self));
Delphi-Quellcode:
function HiddenProc(AWnd: HWND; AMsg: UINT; AWParam: WPARAM; ALParam: LPARAM): LRESULT; stdcall;
var
Shot: TkzScreenShot;
begin
Result := 0;
case AMsg of
WM_HOTKEY: case AWParam of
kzHotkeyID: begin
Shot := TkzScreenShot(GetWindowLongPtr(AWnd, GWL_USERDATA));
if Assigned(Shot) then
Shot.Shot;
Result := 1;
end;
end;
end;
if (Result = 0) then
Result := DefWindowProc(AWnd, AMsg, AWParam, ALParam);
end;
Vielen Dank Peter und Uwe!