Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void callJavaScriptFunc(int Fruit)
- {
- HRESULT hRes;
- CString FuncStr;
- CString LangStr = "javascript";
- VARIANT vEmpty = {0};
- CComPtr<IHTMLDocument2> HTML2Doc;
- CComPtr<IHTMLWindow2> HTML2Wind;
- hRes = GetDHtmlDocument(&HTML2doc);
- hRes = HTML2doc->get_parentWindow(&HTML2Wind);
- if( Fruit > 0 )
- {
- FuncStr = "myFunc(808)";
- hRes = HTML2Wind->execScript(FuncStr.AllocSysString(), LangStr.AllocSysString(), &vEmpty);
- }
- }
Add Comment
Please, Sign In to add comment