In general, I need to make it so that a button is pressed in another application. Tried to catch the handler through FindWindow (); and do SendMessage (); on this handler - did not work.

switch (uMessage) { case WM_DESTROY: PostQuitMessage(0); break; case WM_KEYDOWN: if (wParam == VK_RETURN) { hCalc = FindWindow(NULL, L"Window"); HWND wnd; wnd = FindWindowEx(hCalc , 0, 0, L"Start"); } SendMessage(wnd, WM_LBUTTONUP, 0, 0); } 
  • And what's your problem? What you can not track clicking the "Start" button in your application? - Vladimir Martyanov
  • no, I just launch my application, after which I launch the one in which I want to press a button through my own, press Enter and 0 emotions, does not click Start in that application - Danya
  • Clicking a mouse button is never its “release”, but two whole events. You only send one - Vladimir Martyanov
  • I sent two events WM_LBUTTONDOWN, WM_LBUTTONUP. I also tried BM_CLICK And separately I tried it, it's just a fragment of the code of the very first attempt) - Danya
  • one
    Why then do not you write the left code in question at all? Check the result of the search box. - Vladimir Martyanov

0