Skip to content

How to output html of url into a RichTextBox in visual c++ 6

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #191452
    method
    Member

    Hi all. could any one show me how i can get the html of a perticuler url and place that html inside a textbox/editbox for further manipulation. I have done such think in visual basic 6 but i do not know that can be done in visual c++ 6. I be happy if some one show me how i can achive that.Thanks

    visual basic 6 method:

    RichTextBox1.Text = Inet1.OpenURL(txtURL.Text, icString)

    #191462
    Dody
    Member

    oh well, you can do it with many ways.
    you can do it with a combination between CInternetSession and CHttpConnection.
    or also by using URLDownloadToFile will download the page to a file. You can then open and display the file
    URLDownloadToCacheFile will download the page to a cached file where you can access the data (this is what I have been told to do ages ago)

    #191461
    method
    Member

    @Dody wrote:

    oh well, you can do it with many ways.
    you can do it with a combination between CInternetSession and CHttpConnection.
    or also by using URLDownloadToFile will download the page to a file. You can then open and display the file
    URLDownloadToCacheFile will download the page to a cached file where you can access the data (this is what I have been told to do ages ago)

    I will be using this url’s html code every one min so saving it will not be good idea since it remains in cach and i will be using the old html again and again!!! i have no idea how to use those functions u mentioned 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.!!

      Dody u did not respond my other posts about how to color individual listview items!!! i just need to know that.THanks

      code that loads the url for me in webbrowser controle:

      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
      }

    #191460
    Dody
    Member

    you can point part of the code into a CString, and use the “Find” member to get what you are looking for

    #191459
    method
    Member

    @Dody wrote:

    you can point part of the code into a CString, and use the “Find” member to get what you are looking for

    not good idea!!!

    #191458

    oh what about get text like get paltalk text chat ❓

    how to get text like paltalk chat room in ie is using the same technic like get yahoo text chat

    with that methode you are free of html tag. if you dont want to do that, the only way you can do is trim your data but if i’m in your place i’ll use get text like get paltalk text chat and store each line to listview

    #191457
    method
    Member

    @nanomachine007 wrote:

    oh what about get text like get paltalk text chat ❓

    how to get text like paltalk chat room in ie is using the same technic like get yahoo text chat

    man i want to get some data from webbrowser controle and place it in listview. Life is easy in visual basic but not in visual c++ 6.

    The html behind the webbrowser is showne below and i be happy nano if u show me how i can get the data shown in bold in visual c++ 6.Thanks

      <table border=1 cellpadding=4

      Name code code2

      tony 123 454352 cindy 45245 245245 sarah 452454 245545
    #191456

    why you dont display your data with internet explore like this

    tony 123 xxxx
    Candy 123 xxxx
    Bob 123 xxxxxx

    and use api like you use to get yahoo text and stuck each like in listview ❓

    #191455
    method
    Member

    @nanomachine007 wrote:

    why you dont display your data with internet explore like this

    tony 123 xxxx
    Candy 123 xxxx
    Bob 123 xxxxxx

    and use api like you use to get yahoo text and stuck each like in listview ❓

    well the data is tables to make it look good. You mentioned a good trick but how i be able to place names in one column and the rest of integers in second and 3th columns of listview? Furthermore, could u tell me how to add a listiview with 3 columns in visual studio 6 and show me how to add add the data u show from textbox to listview.Thanks

    #191454

    a table or not is not matter, when you get text like get yahoo text chat is just getting the text

    #191453
    method
    Member

    @nanomachine007 wrote:

    a table or not is not matter, when you get text like get yahoo text chat is just getting the text

    oh then show me how to get the text from my webbrowser controle. my webbrowser controle is not external also show me how to make listview with 3 columns and populate them with data from webbrowser.Thanks

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