You can for example:
1) create a dialog based project.
2) allow ocx controls.
3) open the dialog resource.
4) right click and select insert ocx-object.
5) select
Microsoft Web Browser.
6) right click on the ocx and select add a new member.
7) only type at member name (i.e.)
m_web
.
BOOL CGMapsDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
m_web.Navigate2(&_variant_t(L"http://maps.google.com/"),0,0,0,0);
IDispatch* doc = m_web.get_Document();
if(doc)
{
doc->Release();
}
return TRUE;
}
for usage of
_variant_t
you need:
#include <comutil.h>
#pragma comment (lib,"comsuppw.lib")
Regards.