HTML output from another language
My app has some text output which needs to be formatted. It would be convenient for me to use HTML tags in the text stream and use the default browser to show it in a popup window.
How is this going to happen?
********
I am not the Iraqi information minister.
GSACP : GameDev Society Against Crap Posting
To join: Put these lines in your signature and don''t post crap!
You could do it by using WinSock to listen on internet port 80. Then you could enter the url http://localhost/ to get to your application.
That said, it''d probably be much easier to just draw some text in a window.
That said, it''d probably be much easier to just draw some text in a window.
Write the stuff out to a temporary file, ShellExecute or CreateProcess, WaitForSingleObject (if required, i.e. if you want the person to close the popup window first), then delete the temp file at some point. That should work, no?
Do we know the name of the window class used for popup adverts? That would probably work a treat.
Edit: this is an interesting example. The home_page() function appears to dump HTML to the default browser, but I don't really understand the code well enough to pick out the relevant parts.
********
I am not the Iraqi information minister.
RESIST!
[edited by - walkingcarcass on August 13, 2003 11:08:10 AM]
Edit: this is an interesting example. The home_page() function appears to dump HTML to the default browser, but I don't really understand the code well enough to pick out the relevant parts.
********
I am not the Iraqi information minister.
RESIST!
[edited by - walkingcarcass on August 13, 2003 11:08:10 AM]
Simply writing out a .HTML file and then launching it (I think ShellExecute, when used on a document, will open the app required to view it, won't it?) would probably be easiest... plus the text is then already on disk so you don't need to have the user save it down.
Edit: Oh, or you could look into the MSHTML component; you could display the text from within your application that way, but it would always be using the IE components.
Superpig
- saving pigs from untimely fates, and when he's not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
[edited by - Superpig on August 13, 2003 11:26:15 AM]
Edit: Oh, or you could look into the MSHTML component; you could display the text from within your application that way, but it would always be using the IE components.
Superpig
- saving pigs from untimely fates, and when he's not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
[edited by - Superpig on August 13, 2003 11:26:15 AM]
You''re misunderstanding. I want to dynamically update the HTML of a web page.
I think the "Internet Explorer_Server" class is the one that actually does HTML rendering. I''m also considering "CabinetWClass". Can I reliably create and use one? Google isn''t very cooperative with the WM_USER+X messages, and most useful results seem to be Delphi and MFC.
Comments? Suggestions?
********
I am not the Iraqi information minister.
RESIST!
I think the "Internet Explorer_Server" class is the one that actually does HTML rendering. I''m also considering "CabinetWClass". Can I reliably create and use one? Google isn''t very cooperative with the WM_USER+X messages, and most useful results seem to be Delphi and MFC.
Comments? Suggestions?
********
I am not the Iraqi information minister.
RESIST!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement