16,472
社区成员
发帖
与我相关
我的任务
分享
HWND hWnd = ::FindWindowEx(this->GetSafeHwnd(),0,"Shell Embedding",NULL);
hWnd = ::FindWindowEx(hWnd,0,"Shell DocObject View",NULL);
hWnd = ::FindWindowEx(hWnd,0,"Internet Explorer_Server",NULL);
hWnd = ::FindWindowEx(hWnd,0,"Unity.MiddlemanControl",NULL);
hWnd = ::FindWindowEx(hWnd,0,"Button","UnityIntermediate");
hWnd = ::FindWindowEx(hWnd,0,"Unity.WebPlayer","Unity Web Player");
不过后面还是改用了调用JS来操作
CComQIPtr<IHTMLDocument2> spDoc = m_Web.get_Document();
CComDispatchDriver spScript;
spDoc->get_Script(&spScript);
CComVariant var1 = 10, var2 = 20, varRet;
HRESULT hr = spScript.Invoke0(L"SendMessageToUnity");
来人拿分吧