c ++ ui自动化 - 以编程方式单击按钮

时间:2018-02-06 04:44:44

标签: c++ visual-c++ ui-automation sendmessage

我需要点击"我同意"以编程方式在下面的代码中的按钮,你能帮忙吗?这可以使用SendMessage(hButton,BM_CLICK,0,0); ?

typedef HRESULT STDAPICALLTYPE AcquireDeveloperLicense(
    _In_opt_ HWND     hwndParent,
    _Out_    FILETIME *pExpiration
    );
HINSTANCE hDll = LoadLibrary(TEXT("WSClient.dll"));
AcquireDeveloperLicense *acquire_license = (AcquireDeveloperLicense*)GetProcAddress(hDll, "AcquireDeveloperLicense");
FILETIME pExpiration = {};
HWND hwnd = GetConsoleWindow();
HRESULT result = acquire_license(hwnd, &pExpiration);

0 个答案:

没有答案