• C


How can I insert an HTML code in a C program?? is that possible?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent OlsenDBACommented:

What do you mean by insert?
msaaAuthor Commented:
I mean if I have any HTML code and I want to make the code run from an exe file without letting anyone know the source of it
Kent OlsenDBACommented:

HTML is a display language.  Why would you want to run a display language that doesn't display?

Prepare for an Exciting Career in Cybersecurity

Help prevent cyber-threats and provide solutions to safeguard our global digital economy. Earn your MS in Cybersecurity. WGU’s MSCSIA degree program curriculum features two internationally recognized certifications from the EC-Council at no additional time or cost.

msaaAuthor Commented:
I have a code, I dont need to display anything I just want this code to run from an Exe is that possible or not!
You need to further explain what you mean. Perhaps give an example. HTML is made up of simple characters, so in that respect it could be contained within a C program as a character array.
msaaAuthor Commented:
ok this is an HTML code which I want to run it from an executable program in C , I dont want to open an HTML file to run it I want it to be program.exe:


<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>


<p>Hello world!!</p>


HTML is not "executable" -- as Kdo said, it's a static display language. You cannot run HTML, you can only use a browser to view an HTML file.  It would be best to just write a batch file that opened the html file in a browser ... e.g.

-- Batch file:
"C:\Program Files\Internet Explorer\IExplore.exe" C:\YourFile.html

If you really want your C executable to display your HTML page in a browser then look into the system() method, and make the same call you would make from the batch file.
    system( "IExplore.exe C:\YourFile.html" );
msaaAuthor Commented:
Well I dont know what to say but this is not what I wanted.. I saw some programs which runs html files without including them on the system.. they will just run from the exe.. maybe they were done with VB?
Yes, Visual Basic can display web pages in the EXE using the Microsoft Internet Controls component (shdocvw.dll).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
msaaAuthor Commented:
thank you Timbo!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.