Click here to Skip to main content
16,019,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWriting plug-ins for media player Pin
dSolariuM12-Jul-06 5:31
dSolariuM12-Jul-06 5:31 
Questionwhat is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 5:22
method00712-Jul-06 5:22 
AnswerRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
David Crow12-Jul-06 5:31
David Crow12-Jul-06 5:31 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 6:04
method00712-Jul-06 6:04 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
led mike12-Jul-06 6:21
led mike12-Jul-06 6:21 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 [modified] Pin
method00712-Jul-06 6:40
method00712-Jul-06 6:40 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
led mike12-Jul-06 7:05
led mike12-Jul-06 7:05 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 [modified] Pin
method00712-Jul-06 7:18
method00712-Jul-06 7:18 
well i have done this in visual basic 6 but i am working in a project that is only possible in visual c++ and this has to be done in visual C++ as well

Any ways still i did not get my asnwer.!! i want to place the html code of the url inside a variable and editbox but adding SetDlgItemText(IDC_EDIT2,buffer); to your code did not compile and gave me 16 erros!!
could u just help me fix that problem


errors:
--------------------Configuration: FindUser - Win32 Debug--------------------<br />
Compiling...<br />
FindUserDlg.cpp<br />
C:\visualC\FindUser\FindUserDlg.cpp(330) : error C2065: 'HINTERNET' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(330) : error C2146: syntax error : missing ';' before identifier 'hNet'<br />
C:\visualC\FindUser\FindUserDlg.cpp(330) : error C2065: 'hNet' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(330) : error C2039: 'InternetOpen' : is not a member of '`global namespace''<br />
C:\visualC\FindUser\FindUserDlg.cpp(330) : error C2065: 'InternetOpen' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(330) : error C2065: 'PRE_CONFIG_INTERNET_ACCESS' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(330) : error C2065: 'INTERNET_INVALID_PORT_NUMBER' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(331) : error C2146: syntax error : missing ';' before identifier 'hUrlFile'<br />
C:\visualC\FindUser\FindUserDlg.cpp(331) : error C2065: 'hUrlFile' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(331) : error C2039: 'InternetOpenUrl' : is not a member of '`global namespace''<br />
C:\visualC\FindUser\FindUserDlg.cpp(331) : error C2065: 'InternetOpenUrl' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(331) : error C2065: 'INTERNET_FLAG_RELOAD' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(335) : error C2039: 'InternetReadFile' : is not a member of '`global namespace''<br />
C:\visualC\FindUser\FindUserDlg.cpp(335) : error C2065: 'InternetReadFile' : undeclared identifier<br />
C:\visualC\FindUser\FindUserDlg.cpp(339) : error C2039: 'InternetCloseHandle' : is not a member of '`global namespace''<br />
C:\visualC\FindUser\FindUserDlg.cpp(339) : error C2065: 'InternetCloseHandle' : undeclared identifier<br />
Error executing cl.exe.<br />
<br />
FindUser.exe - 16 error(s), 0 warning(s)


code that give me 16 errors:
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.cnn.com",NULL,0,INTERNET_FLAG_RELOAD,0) ;<br />
<br />
char buffer[10*1024] ;<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 />
}



My whole intention is to extract data once i get the html of perticuler url .
I want to extract the bold parts of html as below.could u show me how to collect the bold part data from a webbrowser controle html . I want to collect those data and place them in a listview and use the color code to color the name in listview.
Note: i want to extract the name and color1 and color2 data from webbrowsser controle as shown in pic

[IMG]http://i5.photobucket.com/albums/y180/method007/extractData.jpg[/IMG]

webbrowser html code:

<html><br />
<br />
<head><br />
<meta http-equiv="refresh" content="60"><br />
</head><br />
<br />
   <br />
    <p><ul><table border=1 cellpadding=4<br />
<br />
    <tr><th>Name</th>  <th> color </th> <th> color2 </th> </tr><br />
        <tr><td><font color="0800">tony</font></td> <td>32768</td> <td>0800</td><br />
      <br />
                <tr><td><font color="FF0FF">cindy</font></td> <td>16711935</td> <td>FF0FF</td><br />
      <br />
                <tr><td><font color="800FF">sarah</font></td> <td>16711808</td> <td>800FF</td> <br />
      <br />
            </table><br />
    </body><br />
    </html>




-- modified at 13:24 Wednesday 12th July, 2006
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
led mike12-Jul-06 8:22
led mike12-Jul-06 8:22 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 8:28
method00712-Jul-06 8:28 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
led mike12-Jul-06 9:05
led mike12-Jul-06 9:05 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 11:01
method00712-Jul-06 11:01 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
led mike12-Jul-06 12:11
led mike12-Jul-06 12:11 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 12:14
method00712-Jul-06 12:14 
QuestionUser Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 5:02
Harold_Wishes12-Jul-06 5:02 
QuestionRe: User Input revisted 2 Pin
David Crow12-Jul-06 5:17
David Crow12-Jul-06 5:17 
AnswerRe: User Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 5:39
Harold_Wishes12-Jul-06 5:39 
GeneralRe: User Input revisted 2 Pin
David Crow12-Jul-06 5:53
David Crow12-Jul-06 5:53 
GeneralRe: User Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 6:12
Harold_Wishes12-Jul-06 6:12 
GeneralRe: User Input revisted 2 Pin
David Crow12-Jul-06 6:33
David Crow12-Jul-06 6:33 
GeneralRe: User Input revisted 2 Pin
Zac Howland12-Jul-06 10:12
Zac Howland12-Jul-06 10:12 
GeneralRe: User Input revisted 2 [modified] Pin
earl12-Jul-06 8:52
earl12-Jul-06 8:52 
GeneralRe: User Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 10:04
Harold_Wishes12-Jul-06 10:04 
Questionpthread Pin
mehmetned12-Jul-06 4:55
mehmetned12-Jul-06 4:55 
AnswerRe: pthread Pin
toxcct12-Jul-06 4:58
toxcct12-Jul-06 4:58 

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.