I want to send WM_HOTKEY to be captured by other application using a global desktop HotShortCut.
The expected Keys are CTRL + F10
This is the only way I found to trigger the capture of WM_HOTKEY:
procedure TfmMain.ButtonTalkClick(Sender: TObject);
var
Article: TArticleBase;
Msg: TMessage;
begin
Article:= GetSelectedArticle;
if Article <> nil then
begin
Clipboard.AsText:= Article.SelectedText;
Msg.LParamLo:= MOD_CONTROL;
Msg.LParamHi:= VK_CONTROL or VK_F10;
PostMessage(HWND_BROADCAST, WM_HOTKEY, 0, Msg.LParam);
end;
end;
if I change any of the values of Msg.LParamLo or Msg.LParamHi, WM_HOTKEY is not triggered by the other app. But using this way, before the message WM_HOTKEY is captured by the Method:
procedure ManageHotKeyMsg(var Msg: TMessage); message WM_HOTKEY;
The "Windows Execute Dialog" is executed (shortcut "Windows Key" + R)
How is the right way to pass Msg.LParamLo and Msg.LParamHi, to make sure Im sending WM_HOTKEY + "CTRL + F10".