Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Displaying HTML control?

Posted on 2000-04-26
13
163 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:Moin
  • 6
  • 6
13 Comments
 
LVL 1

Expert Comment

by:sunj
ID: 2750689
http://www.microsoft.com/msj/0100/c++/c++0100.asp

That answers all (and more) your questions.
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2750747
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
0
 

Author Comment

by:Moin
ID: 2751527
Thanx for your comments...
Mr. ShaunWilde! please also tell me whether I can load a pre-written DHTML file into that view also.
Thanx
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2751763
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
0
 

Author Comment

by:Moin
ID: 2754186
Mr. Suni and Mr. ShaunWilde! Comments from both of you has helped me. Please tell me how should I divide the points.
:)
Thanks
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2754512
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
0
 

Author Comment

by:Moin
ID: 2754721
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
0
 

Author Comment

by:Moin
ID: 2754725
Please write code examples
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2754737
override OnBeforeNavigate2

void CYourHtmlView::OnBeforeNavigate2( LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel )
{
TRACE (_T("URL=%s"),URL);
}



0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2754744
oops that should be

TRACE (_T("URL=%s"),lpszURL);


0
 

Author Comment

by:Moin
ID: 2754987
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. :)
0
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 200 total points
ID: 2755567
shaun_wilde@hotmail.com
0
 

Author Comment

by:Moin
ID: 2758284
Thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 54
unable to delete all specified values regedit 38 531
Best tools for Backup and restore of Wordpress site 6 57
twoTwo  challenge 35 107
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question