我做了一个MFC对话框浏览器 CWebBrowser2 m_web;
为什么m_web.Navigate2("http://www.sina.com",NULL,NULL,NULL,NULL);这句编译出错但是m_web.Navigate("http://www.sina.com",NULL,NULL,NULL,NULL);这样就是对的?
那么m_web.Navigate2()里面的参数应该如何呢?
为什么m_web.Navigate2("http://www.sina.com",NULL,NULL,NULL,NULL);这句编译出错但是m_web.Navigate("http://www.sina.com",NULL,NULL,NULL,NULL);这样就是对的?
那么m_web.Navigate2()里面的参数应该如何呢?
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
#include <comdef.h>CString str("http://www.baidu.com");
VARIANT var;
var.vt = VT_BSTR;
var.bstrVal = _bstr_t((LPCTSTR)str);
感谢各位!散分!