Click here to Skip to main content
15,171,576 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm looking to find some code or samples of projects or tutorials on creating a WebBrowser Control in MFC that would allow me to embed Google maps set markers and then use those markers as hyperlinks, any Help would be great, if anyone knows of a program that is already like this please comment thank you :)
Updated 19-Sep-11 5:18am

1 solution

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()

  SetIcon(m_hIcon, TRUE);
  SetIcon(m_hIcon, FALSE);

  IDispatch*  doc = m_web.get_Document();
    // from here you have full access to the complete document structure
  return TRUE;

for usage of _variant_t you need:
#include <comutil.h>
#pragma comment (lib,"comsuppw.lib")


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900