Click here to Skip to main content
15,902,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIIS managing Pin
corwin322-Oct-03 2:44
corwin322-Oct-03 2:44 
GeneralDIB problems Pin
Anthony_Yio2-Oct-03 1:56
Anthony_Yio2-Oct-03 1:56 
QuestionHow to insert Button to titleBar ? Pin
vgrigor2-Oct-03 0:58
vgrigor2-Oct-03 0:58 
AnswerRe: How to insert Button to titleBar ? Pin
Mike Dimmick2-Oct-03 4:14
Mike Dimmick2-Oct-03 4:14 
GeneralRe: How to insert Button to titleBar ? Pin
vgrigor2-Oct-03 5:20
vgrigor2-Oct-03 5:20 
GeneralExtracting info from a web page Pin
doctorpi2-Oct-03 0:36
doctorpi2-Oct-03 0:36 
GeneralRe: Extracting info from a web page Pin
David Crow2-Oct-03 2:49
David Crow2-Oct-03 2:49 
GeneralRe: Extracting info from a web page Pin
RobJones2-Oct-03 7:07
RobJones2-Oct-03 7:07 
Another idea..
In the past I have used the following function to pull HTML code from a url.. I then parse the HTML code and pull out the info I want.. Not sure if this is what your looking for but here's some code..

CString strUrl,	  // Holds url.
	strBuff,  // Holds data collected from the opened url.
	strError; // Holds error info.
	 
// Internet session object
CInternetSession mysession;
CStdioFile* remotefile;
 
char httpbuff[4096];
int numbytes;
 
strUrl = _T("HTTP://www.someurl.com/index.htm");
strError = _T("SUCCESS");
 
TRY
{
	remotefile = mysession.OpenURL(strUrl,1,INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD);
	 	
	// Read the contents of the remote file into the temp string.
	while (numbytes = remotefile->Read(httpbuff, sizeof(httpbuff)-1))
	{
		// Null terminate the buffer..
		httpbuff[NULL];
 
		// add the contents to our temp string..
		strBuff += (CString)httpbuff;
	}
		 
	// Clean up.
	mysession.Close();
	remotefile->Close();
	delete remotefile;
}
									
// Catch any errors and format the error msg..
CATCH_ALL(error)
{
	TCHAR szCause[4096];
	error->GetErrorMessage(szCause,4096,NULL);
	strError.Format("%s",szCause);
}
END_CATCH_ALL;
									
if(!strError.CompareNoCase(_T("SUCCESS")))
{
	// Do the parsing..

}
else
{
	// Display the error..
}


Rob




Whoever said nothing's impossible never tried slamming a revolving door!
GeneralCRecordset input parameters Pin
pocovnicu1-Oct-03 23:19
pocovnicu1-Oct-03 23:19 
GeneralRe: CRecordset input parameters Pin
vcplusplus2-Oct-03 1:50
vcplusplus2-Oct-03 1:50 
GeneralRe: CRecordset input parameters Pin
pocovnicu2-Oct-03 2:50
pocovnicu2-Oct-03 2:50 
GeneralRe: CRecordset input parameters Pin
David Crow2-Oct-03 3:06
David Crow2-Oct-03 3:06 
GeneralRe: CRecordset input parameters Pin
pocovnicu2-Oct-03 3:17
pocovnicu2-Oct-03 3:17 
GeneralRe: CRecordset input parameters Pin
David Crow2-Oct-03 3:33
David Crow2-Oct-03 3:33 
Questionhow to set the height of a truetype font ? Pin
JP GOBLET1-Oct-03 23:19
JP GOBLET1-Oct-03 23:19 
AnswerRe: how to set the height of a truetype font ? Pin
Mike Dimmick2-Oct-03 4:25
Mike Dimmick2-Oct-03 4:25 
GeneralRe: how to set the height of a truetype font ? Pin
JP GOBLET2-Oct-03 4:48
JP GOBLET2-Oct-03 4:48 
AnswerRe: how to set the height of a truetype font ? Pin
G. Steudtel2-Oct-03 5:02
G. Steudtel2-Oct-03 5:02 
GeneralRe: how to set the height of a truetype font ? Pin
JP GOBLET2-Oct-03 5:51
JP GOBLET2-Oct-03 5:51 
GeneralRe: how to set the height of a truetype font ? Pin
G. Steudtel2-Oct-03 6:06
G. Steudtel2-Oct-03 6:06 
GeneralRe: how to set the height of a truetype font ? Pin
JP GOBLET4-Oct-03 5:34
JP GOBLET4-Oct-03 5:34 
GeneralAccessing document properties from a VC++ application Pin
jopett1-Oct-03 21:15
jopett1-Oct-03 21:15 
GeneralRe: Accessing document properties from a VC++ application Pin
Michael P Butler2-Oct-03 1:32
Michael P Butler2-Oct-03 1:32 
GeneralRe: Accessing document properties from a VC++ application Pin
jopett2-Oct-03 20:57
jopett2-Oct-03 20:57 
GeneralRide Control System Pin
immanis1-Oct-03 20:54
immanis1-Oct-03 20:54 

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.