Moin
asked on
Displaying HTML control?
Hi, I want to develop a WIN32 application which should display a HTML control in it, which in turn should display an HTML/DHTML page? How can I do this and how can my app capture which link of the HTML page is clicked that is displayed in the HTML control?
Please write in detail.
Thanx in advance.
Please write in detail.
Thanx in advance.
since you have posted this in the MFC section I am going to assume you are familier with MFC.
create a project MDI/SDI and use CHtmlView as the base class of the CView object
you can then navigate using the NavigateMethod.
you can capture which URLs are clicked on using the BeginNavigate notification method that is sent to your base class
create a project MDI/SDI and use CHtmlView as the base class of the CView object
you can then navigate using the NavigateMethod.
you can capture which URLs are clicked on using the BeginNavigate notification method that is sent to your base class
ASKER
Thanx for your comments...
Mr. ShaunWilde! please also tell me whether I can load a pre-written DHTML file into that view also.
Thanx
Mr. ShaunWilde! please also tell me whether I can load a pre-written DHTML file into that view also.
Thanx
sure you can .
if it is a file you can just navigate to this file
or if it is in memory you could use the about: protocol or the IPersistStreamInit::Load(. ..) method
if it is a file you can just navigate to this file
or if it is in memory you could use the about: protocol or the IPersistStreamInit::Load(.
ASKER
Mr. Suni and Mr. ShaunWilde! Comments from both of you has helped me. Please tell me how should I divide the points.
:)
Thanks
:)
Thanks
post a 0 point question in the following board
http://www1.experts-exchange.com/Customer_Service/Experts_Exchange/
explain what you want to do referrring to this question.
you will probably get this question as answered to either Suni or myself and then be requested to post another question with the remainder points and with a name like
Points for ShaunWilde
or
Points for Suni
http://www1.experts-exchange.com/Customer_Service/Experts_Exchange/
explain what you want to do referrring to this question.
you will probably get this question as answered to either Suni or myself and then be requested to post another question with the remainder points and with a name like
Points for ShaunWilde
or
Points for Suni
ASKER
But please tell me one thing. How can I get the URL of the link that is being clicked from the CHTMLView in my MFC application. Whoever will answer this question will get the points. :)
Thanks
Thanks
ASKER
Please write code examples
override OnBeforeNavigate2
void CYourHtmlView::OnBeforeNav igate2( LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel )
{
TRACE (_T("URL=%s"),URL);
}
void CYourHtmlView::OnBeforeNav
{
TRACE (_T("URL=%s"),URL);
}
oops that should be
TRACE (_T("URL=%s"),lpszURL);
TRACE (_T("URL=%s"),lpszURL);
ASKER
Thanx a lot. can u please write ur e-mail so that i can stay in touch with u.
Don't worry points are yours now. :)
Don't worry points are yours now. :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
That answers all (and more) your questions.