• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

HTML CODE IN C??

How can I insert an HTML code in a C program?? is that possible?
0
msaa
Asked:
msaa
  • 5
  • 2
  • 2
  • +1
1 Solution
 
Kent OlsenData Warehouse Architect / DBACommented:

What do you mean by insert?
0
 
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
0
 
Kent OlsenData Warehouse Architect / DBACommented:

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

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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!
0
 
smitty22Commented:
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.
0
 
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:

<html>

<head>
<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>
</head>

<body>

<p>Hello world!!</p>

</body>

</html>
0
 
smitty22Commented:
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" );
0
 
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?
0
 
Timbo87Commented:
Yes, Visual Basic can display web pages in the EXE using the Microsoft Internet Controls component (shdocvw.dll).
0
 
msaaAuthor Commented:
thank you Timbo!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now