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!
<html>
<head>
<meta http-equiv="refresh" content="60">
</head>
<p><ul><table border=1 cellpadding=4
<tr><th>Name</th> <th> code </th> <th> code2 </th> </tr>
<tr><td><font color="0800">
tony</font></td> <td>
123</td> <td>
454352</td>
<tr><td><font color="FF0FF">
cindy</font></td> <td>
45245</td> <td>
245245</td>
<tr><td><font color="800FF">
sarah</font></td> <td>
452454</td> <td>
245545</td>
</table>
</body>
</html>
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")),
vtOptional, vtOptional, vtOptional, vtOptional);
return TRUE; // return TRUE unless you set the focus to a control
}