Click here to Skip to main content
15,909,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: get value(address) from ipaddress control Pin
David Crow15-May-07 6:28
David Crow15-May-07 6:28 
QuestionGet dynamic web content Pin
Mathefreak15-May-07 2:31
Mathefreak15-May-07 2:31 
AnswerRe: Get dynamic web content Pin
Paresh Chitte15-May-07 3:01
Paresh Chitte15-May-07 3:01 
QuestionRe: Get dynamic web content Pin
David Crow15-May-07 3:17
David Crow15-May-07 3:17 
AnswerRe: Get dynamic web content Pin
Ravi Bhavnani15-May-07 3:31
professionalRavi Bhavnani15-May-07 3:31 
GeneralRe: Get dynamic web content Pin
Mathefreak15-May-07 3:56
Mathefreak15-May-07 3:56 
GeneralRe: Get dynamic web content Pin
Ravi Bhavnani15-May-07 5:50
professionalRavi Bhavnani15-May-07 5:50 
GeneralRe: Get dynamic web content Pin
Mathefreak20-May-07 9:21
Mathefreak20-May-07 9:21 
Hi Ravi,

it's not only plain html, unfortunately. There are some java functions embedded to grab the actual quotes.

Nevertheless, after searching around the net a bit, I'm proudly present the solution, which works for me Big Grin | :-D
Sample application:
- simple MFC-Dialog
- one Webbrowser control (m_WebBrowserCtrl)
- website is loaded and refreshed by button click
- by clicking on a button the content of the site (plain text, not the html source) is copied into a CString variable to parse the data.

<br />
void CWebbrowser_TestDlg::OnCopy() <br />
{<br />
	IHTMLDocument2* m_pHTMLDocument2;<br />
	LPDISPATCH lpDispatch;<br />
	lpDispatch = m_WebBrowserCtrl.GetDocument();<br />
	HRESULT hr;<br />
	if (lpDispatch)<br />
	{<br />
	hr =<br />
	lpDispatch->QueryInterface(IID_IHTMLDocument2,<br />
	 (LPVOID*)&m_pHTMLDocument2);<br />
	lpDispatch->Release();<br />
	ASSERT(SUCCEEDED(hr));<br />
	}<br />
<br />
	<br />
	CString sText;<br />
	IHTMLElement *iSource;<br />
	BSTR bstrSource;<br />
<br />
	m_pHTMLDocument2->get_body(&iSource);<br />
	iSource->get_outerText(&bstrSource);<br />
	sText = bstrSource;<br />
<br />
	MessageBox(sText);<br />
	<br />
}<br />


Comments are welcome.

Next step is to use the code in my application, but that seems to be easy.

Greets M.
Questionhow to import jpeg images into workspace Pin
kiranin15-May-07 2:28
kiranin15-May-07 2:28 
AnswerRe: how to import jpeg images into workspace Pin
Hamid_RT15-May-07 2:45
Hamid_RT15-May-07 2:45 
QuestionHow to call MSExcel from MFC? Pin
HiFive15-May-07 2:02
HiFive15-May-07 2:02 
AnswerRe: How to call MSExcel from MFC? Pin
David Crow15-May-07 3:19
David Crow15-May-07 3:19 
QuestionTracking when Windows are maximized and restored. Pin
Eoinoc15-May-07 1:55
Eoinoc15-May-07 1:55 
QuestionImage Capturing from clipboard and store into file Pin
Sethuraman.K15-May-07 1:26
Sethuraman.K15-May-07 1:26 
AnswerRe: Image Capturing from clipboard and store into file Pin
Mark Salsbery15-May-07 4:57
Mark Salsbery15-May-07 4:57 
QuestionHow To Pass Value From One Dialog To Another [modified] Pin
jannathali15-May-07 1:23
jannathali15-May-07 1:23 
AnswerRe: How To Pass Value From One Dialog To Another Pin
Hamid_RT15-May-07 1:26
Hamid_RT15-May-07 1:26 
AnswerRe: How To Pass Value From One Dialog To Another [modified] Pin
Sherin Iranimose15-May-07 1:49
Sherin Iranimose15-May-07 1:49 
GeneralRe: How To Pass Value From One Dialog To Another Pin
vivekphlp15-May-07 23:06
vivekphlp15-May-07 23:06 
AnswerRe: How To Pass Value From One Dialog To Another Pin
Arman S.15-May-07 1:58
Arman S.15-May-07 1:58 
AnswerRe: How To Pass Value From One Dialog To Another Pin
JimmyRopes15-May-07 3:59
professionalJimmyRopes15-May-07 3:59 
Questionfunction pointers Pin
Sonia Gupta15-May-07 1:17
Sonia Gupta15-May-07 1:17 
AnswerRe: function pointers Pin
Hamid_RT15-May-07 1:25
Hamid_RT15-May-07 1:25 
AnswerRe: function pointers Pin
CPallini15-May-07 1:37
mveCPallini15-May-07 1:37 
QuestionException code: c0000090 (FLT_INVALID_OPERATION) - I am in despair! Pin
Best Kiluyar15-May-07 0:25
Best Kiluyar15-May-07 0:25 

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.