|
你是不是要在程序里嵌入浏览器 ?
用IBrowser3*接口实现
CAxWindow* m_paxWindow;
IBrowser3* m_ipBrowser3;
CComPtr m_ipHost;
hr = CoInitializeEx(NULL, 0);
if(!SUCCEEDED(hr))return FALSE;
if(!AtlAxWinInit()) return FALSE;
m_paxWindow = new CAxWindow();
m_paxWindow->Create(hwnd, &rc, _T("{698E3FCA-70C3-11D0-81E8-00A0C90AD20A}"), (WS_CHILD|WS_VISIBLE|WS_BORDER));
hr = m_paxWindow->QueryHost(&m_ipHost);
if(!SUCCEEDED(hr))return FALSE;
hr = m_paxWindow->QueryControl(IID_IBrowser3, (void**)&m_ipBrowser3);
|
|