Skip to content

How to add webbrowser controle to visual c++ 6 MFC project

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #191463
    method
    Member

    Hi all. could any one tell me how i can add webbrowser controle to my visual c++ 6 MFC project? I already have project made by MFC AppWizard which has a few conroles such as buttons an textbox/editbox and i want to add to it a webbrowser controle just like visual basic 6.Thanks

    #191467
    Dody
    Member

    Project -> Add To Project -> Components and controls -> Microsoft Web Browser

    #191466
    method
    Member

    @Dody wrote:

    Project -> Add To Project -> Components and controls -> Microsoft Web Browser

    Thanks man . i already found solution for that but do not know how to extract data from webbrowser!!

    #191465

    You have to create a variable for that control and in the procedure DoDataExchange, link your variable to your control and know you can access all properties of you control by nameofyourcontrol.propertieofyourcontrol

    like vb6 😆

    #191464
    method
    Member

    @nanomachine007 wrote:

    You have to create a variable for that control and in the procedure DoDataExchange, link your variable to your control and know you can access all properties of you control by nameofyourcontrol.propertieofyourcontrol

    like vb6 😆

    i have no idea how to use those functions u mentioned to be able to extract my data from webbrowser.My webbrowser has this html and i want to collect the bold data from it and place it in listview!

      <table border=1 cellpadding=4

      Name code code2

      tony 123 454352 cindy 45245 245245 sarah 452454 245545

      could u just show me how get the bold html data and populate it in listview. I searched all over inernet and i could not find a single example of how to get html using visual c++ 6.!!THanks

      Here the code for loading url:

      BOOL CFindUserDlg::OnInitDialog()
      {
      CDialog::OnInitDialog();

      // Add “About…” menu item to system menu.

      // IDM_ABOUTBOX must be in the system command range.
      ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
      ASSERT(IDM_ABOUTBOX < 0xF000);

      CMenu* pSysMenu = GetSystemMenu(FALSE);
      if (pSysMenu != NULL)
      {
      CString strAboutMenu;
      strAboutMenu.LoadString(IDS_ABOUTBOX);
      if (!strAboutMenu.IsEmpty())
      {
      pSysMenu->AppendMenu(MF_SEPARATOR);
      pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
      }
      }

      // Set the icon for this dialog. The framework does this automatically
      // when the application’s main window is not a dialog
      SetIcon(m_hIcon, TRUE); // Set big icon
      SetIcon(m_hIcon, FALSE); // Set small icon

      // TODO: Add extra initialization here

      COleVariant vtOptional((long)DISP_E_PARAMNOTFOUND,VT_ERROR);
      m_wbrow.Navigate2(COleVariant(_T(“http://localhost/Display.php&#8221;)),
      vtOptional, vtOptional, vtOptional, vtOptional);

      return TRUE; // return TRUE unless you set the focus to a control
      }

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.