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????

Recommended Answers

All 10 Replies

Here is one of several examples I found with google.

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.

Member Avatar for iamthwee

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

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.

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.

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

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!

commented: vc++ 6.0 ? -2
commented: lots of people use VC6 +22

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

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.

I'm using my c++ browser right now!

commented: Good for you, but we're not interested in that, and that is not a valid reason to post in a year old thread. -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.