954,487 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

C++ Web Browser

I'm not sure how to do this, but i'm making a small shell in C++ in command line, with a few external scripts and executables being called. What I want to do is either make a simple web browser or a way to show web pages in C++, or if anyone can make one, or use a prebuilt small simple one file browser and figure a way to make it open pages. I just don't want to use the users default browser, as well as i want to be able to bundle it with the other files when i want to finish the project... what do you all suggest to go about doing this????

codercpp1
Newbie Poster
4 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

Here is one of several examples I found with google.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

Well... i'm really new to c++ though so i don't quite understand what to do. I've tried to make the code example into a displayhtml.exe , but i don't have that htmlwindow.h that it calls to... and don't know where to get it. uggh. its frusterating. i need more of a simple little walk through just for getting a simple browser running, or something. sorry.

codercpp1
Newbie Poster
4 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

Creating a web browser, especially in c++, is not an exercise newbies should be attempting.

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

mmk... i found a stand alone version... small app called K-Meleon that i can call to with an extended attribute for the web page i want. thx anyway.

codercpp1
Newbie Poster
4 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

If you are still interested a few things you could do / should do.

get an XML Parser and treat all pages like XML, since HTML follows a strict coding format (or at least properly built pages do) you could easily build a parser using an XML tool.

Secondly since it is going to be command line i am assuming no reason for graphics, so again it's just a matter of parsing the text and other style/placements

but then you get into the issue of the Styles.

because the grounds on how each browser displays is so poorly implimented by each side (microsoft,firefox,safari...etc) it would be in your best interest to look up the DOM (document object model) as well as http://www.w3.org/ as they are the people that set forth the guidlines.

Killer_Typo
Master Poster
781 posts since Apr 2004
Reputation Points: 152
Solved Threads: 39
 

I want to make a Web browser with c++ within two days. How should i make it

suraj_1470
Newbie Poster
1 post since Jul 2007
Reputation Points: 10
Solved Threads: 0
 
I want to make a Web browser with c++ within two days. How should i make it

Two Days :-O :icon_lol:

If you use VC++ 6.0 compiler it has CHTMLView that is a web browser which you can implement in just a few minutes. Not sure if VC++ 2005 has it or not, but I suspect it does.

Otherwise -- read the previous posts to this thead and the links they contain!

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

it does but im not sure about express (express doesnt do MFC so some of the GUI stuff is iffy)

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

to create a browser in c++ is not a esay task but what you need is to break the task in small parts.such as make the window,code to read html,and the userinterface. that how i create a simple one.

suedormo
Newbie Poster
2 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You