Solved

HTML CODE IN C??

Posted on 2003-10-31
10
239 Views
Last Modified: 2012-05-04
How can I insert an HTML code in a C program?? is that possible?
0
Comment
Question by:msaa
[X]
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
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 9659374

What do you mean by insert?
0
 

Author Comment

by:msaa
ID: 9659434
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
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 9659495

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!

 

Author Comment

by:msaa
ID: 9659507
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
 
LVL 2

Expert Comment

by:smitty22
ID: 9660468
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
 

Author Comment

by:msaa
ID: 9660544
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
 
LVL 2

Expert Comment

by:smitty22
ID: 9660678
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
 

Author Comment

by:msaa
ID: 9660762
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
 
LVL 15

Accepted Solution

by:
Timbo87 earned 20 total points
ID: 9660946
Yes, Visual Basic can display web pages in the EXE using the Microsoft Internet Controls component (shdocvw.dll).
0
 

Author Comment

by:msaa
ID: 9660979
thank you Timbo!
0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
why debugging a macro i s difficult 10 45
Inorder binary search tree 5 185
Raspberry Pi 3 to send text message 9 242
Can someone explain the following statement in C? 4 70
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

737 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