Click here to Skip to main content
15,920,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to create static text dynamically on dialogbox? Pin
Hamid_RT12-Jul-06 20:01
Hamid_RT12-Jul-06 20:01 
AnswerRe: How to create static text dynamically on dialogbox? Pin
see me12-Jul-06 20:13
see me12-Jul-06 20:13 
AnswerRe: How to create static text dynamically on dialogbox? Pin
ThatsAlok12-Jul-06 20:55
ThatsAlok12-Jul-06 20:55 
QuestionOverloaded member function not found in CNoteMgr Pin
dashprasannajit12-Jul-06 18:50
dashprasannajit12-Jul-06 18:50 
AnswerRe: Overloaded member function not found in CNoteMgr Pin
nguyenvhn12-Jul-06 21:02
nguyenvhn12-Jul-06 21:02 
QuestionGet number of days used Pin
includeh1012-Jul-06 18:49
includeh1012-Jul-06 18:49 
AnswerRe: Get number of days used Pin
Ganesh_T12-Jul-06 19:19
Ganesh_T12-Jul-06 19:19 
AnswerRe: Get number of days used Pin
*Dreamz12-Jul-06 19:28
*Dreamz12-Jul-06 19:28 
QuestionPlay a movie clip Pin
see me12-Jul-06 18:00
see me12-Jul-06 18:00 
GeneralRe: Play a movie clip Pin
voorugonda prashanth12-Jul-06 18:10
voorugonda prashanth12-Jul-06 18:10 
AnswerRe: Play a movie clip Pin
Naveen12-Jul-06 18:19
Naveen12-Jul-06 18:19 
GeneralRe: Play a movie clip Pin
see me12-Jul-06 18:31
see me12-Jul-06 18:31 
AnswerRe: Play a movie clip Pin
A_Fa12-Jul-06 19:35
A_Fa12-Jul-06 19:35 
GeneralRe: Play a movie clip Pin
see me12-Jul-06 20:11
see me12-Jul-06 20:11 
AnswerRe: Play a movie clip Pin
Hamid_RT12-Jul-06 20:00
Hamid_RT12-Jul-06 20:00 
GeneralRe: Play a movie clip Pin
see me12-Jul-06 20:06
see me12-Jul-06 20:06 
GeneralRe: Play a movie clip Pin
Hamid_RT12-Jul-06 20:10
Hamid_RT12-Jul-06 20:10 
Questionmodulus operator Pin
thathvamsi12-Jul-06 16:25
thathvamsi12-Jul-06 16:25 
AnswerRe: modulus operator Pin
nguyenvhn12-Jul-06 17:29
nguyenvhn12-Jul-06 17:29 
GeneralRe: modulus operator Pin
thathvamsi12-Jul-06 17:36
thathvamsi12-Jul-06 17:36 
AnswerRe: modulus operator Pin
Naveen12-Jul-06 17:41
Naveen12-Jul-06 17:41 
GeneralRe: modulus operator Pin
thathvamsi12-Jul-06 18:06
thathvamsi12-Jul-06 18:06 
GeneralRe: modulus operator Pin
Naveen12-Jul-06 18:17
Naveen12-Jul-06 18:17 
Questionhelp useing Microsoft HTML Object Library in visual c++ 6 Pin
method00712-Jul-06 12:14
method00712-Jul-06 12:14 
Hi all . could any one show me how to use [B]Microsoft HTML Object Library [/B] in visual c++ 6 to extract data from html and populate it in listview. I have done this in visual basic 6 and i posted the code below . I be happy if an expert help me convert it to visual c++ 6 since i need it for a project that has to be done in visual c++ 6. My current visual c++ code retrives html of url and all now i need to be able to do extract the data i wanted from html and populate the listview with that data. I shown a picture of output in the pic.Thanks

code that retrives the html for me in visual c++ 6:

<br />
void CFindUserDlg::OnButton4() <br />
{<br />
	// TODO: Add your control notification handler code here<br />
	<br />
HINTERNET hNet = ::InternetOpen("MSDN SurfBear",PRE_CONFIG_INTERNET_ACCESS,NULL,INTERNET_INVALID_PORT_NUMBER,0) ;<br />
HINTERNET hUrlFile = ::InternetOpenUrl(hNet,"http://www.mysite.com/Display.php",NULL,0,INTERNET_FLAG_RELOAD,0) ;<br />
<br />
char buffer[10*1024] ;<br />
<br />
DWORD dwBytesRead = 0;<br />
BOOL bRead = ::InternetReadFile(hUrlFile,buffer,sizeof(buffer),&dwBytesRead);<br />
<br />
SetDlgItemText(IDC_EDIT2,buffer);<br />
<br />
::InternetCloseHandle(hUrlFile) ;<br />
::InternetCloseHandle(hNet) ;<br />
<br />
<br />
	<br />
}



visual basic 6 code:
<br />
<br />
Private Sub Command3_Click()<br />
  'this function places data into listview<br />
  ' requires that you add a reference to the Microsoft HTML Object Library<br />
    Dim mydoc As HTMLDocument<br />
    Dim wombat As IHTMLElementCollection<br />
    Dim lp As Long<br />
    <br />
    Set mydoc = New HTMLDocument<br />
    <br />
    'mydoc.body.innerHTML = "<html><head><p><ul><table border=1 cellpadding=4> " & _<br />
                          '  "<tr><th>Name</th> > <th> color </th> </tr> " & _<br />
                           ' "<tr><td>tony</td> <td>33023</td> " & _<br />
                           ' "<tr><td>cindy</td> <td>16711935</td> " & _<br />
                           ' "<tr><td>sarah</td> <td>3434343</td> " & _<br />
                           ' "</table> </body></html>"<br />
                            <br />
    mydoc.body.innerHTML = RichTextBox1.Text<br />
    <br />
 Set wombat = mydoc.getElementsByTagName("TR") ' Get the rows<br />
    For lp = 1 To wombat.length - 1 ' Ignore first row<br />
        Set LI = ListView1.ListItems.Add(lp, , wombat.Item(lp).All.Item(0).innerText)<br />
        ListView1.ListItems(lp).ForeColor = wombat.Item(lp).All.Item(1).innerText<br />
        LI.ListSubItems.Add , , wombat.Item(lp).All.Item(1).innerText<br />
        <br />
    Next<br />
End Sub


picuture of the output:

[IMG]http://i5.photobucket.com/albums/y180/method007/ListViewPop.jpg[/IMG]
AnswerRe: help useing Microsoft HTML Object Library in visual c++ 6 Pin
nguyenvhn12-Jul-06 17:32
nguyenvhn12-Jul-06 17:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.