UI オートメーションを使用してボタンをクリックしたい。Winform VC++ で UI オートメーションを使用しています。
これが私のコードです..
AutomationElement^ Select_connect_button= aeForm->FindFirst(TreeScope::Children,gcnew PropertyCondition(AutomationElement::NameProperty, "Select/Connect"));
InvokePattern^ ipClickButton1 = (InvokePattern)Select_connect_button->GetCurrentPattern(InvokePattern::Pattern);
ipClickButton1->Invoke();
しかし、これらのエラーが表示されています:
error C2440: 'type cast' : cannot convert from 'System::Object ^' to 'System::Windows::Automation::InvokePattern'
error C2440: 'initializing' : cannot convert from 'System::Windows::Automation::InvokePattern' to 'System::Windows::Automation::InvokePattern ^'
誰でもこれらのエラーを解決するのを手伝ってくれませんか?
ありがとう。