Programmatically press a button on another application (C, Windows)

前端 未结 12 1403
小蘑菇
小蘑菇 2021-01-30 14:47

I\'m trying to use the following code to press a button on my other application:

HWND ButtonHandle;
if( (wnd = FindWindow(0, \"Do you want to save?\")) )
{   
           


        
12条回答
  •  时光取名叫无心
    2021-01-30 15:28

    When I have to do these kind of things I use SendKeys. It is VB-ish and C# provides a nice interface to use but for C/C++ you'll have to do it . What is nice with it is that you could write scripts and run them instead of hard coding it in your code.

提交回复
热议问题