Click here to Skip to main content
15,921,210 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Bring window to top? Pin
Michael Dunn2-Apr-05 16:37
sitebuilderMichael Dunn2-Apr-05 16:37 
GeneralRe: Bring window to top? Pin
Ravi Bhavnani2-Apr-05 16:41
professionalRavi Bhavnani2-Apr-05 16:41 
General3ds max XFile Export Pin
akira322-Apr-05 13:04
akira322-Apr-05 13:04 
GeneralDownload XskinExp for 3ds max7 Pin
akira322-Apr-05 12:58
akira322-Apr-05 12:58 
GeneralXSkinExp for 3ds max7 Pin
akira322-Apr-05 12:29
akira322-Apr-05 12:29 
GeneralInheritance Question Pin
sacoskun2-Apr-05 7:21
sacoskun2-Apr-05 7:21 
GeneralRe: Inheritance Question Pin
Michael Dunn2-Apr-05 7:33
sitebuilderMichael Dunn2-Apr-05 7:33 
GeneralA question to save html file Pin
Anonymous2-Apr-05 6:25
Anonymous2-Apr-05 6:25 
Hi ALL

I have one problem need you help , I want to save a html file as below

<br />
CString filename="c://test.html";<br />
CStringarray array;<br />
CFile file;	<br />
if(file.Open(filename,CFile::modeCreate|CFile::modeWrite)==0)<br />
{<br />
    AfxMessageBox("Error happen from opening file",MB_OK,0);<br />
    return false;<br />
}<br />
CArchive html(&file,CArchive::store);<br />
<br />
// HTML HEAD<br />
	array.Add("<HTML><HEAD><TITLE>");<br />
	array.Add("test.html");<br />
	array.Add("Report </TITLE></HEAD>"); <br />
	<br />
// HTML BODY<br />
	array.Add("<BODY BGCOLOR=Silver>");<br />
        array.Add("</BODY>");<br />
<br />
for(int i=0;i<array.GetSize();i++)<br />
{<br />
	if(html.IsStoring()) html << array[i];<br />
}	<br />
html.Close();<br />
file.Close();<br />


When I open html file , it is as blow:

<br />
<HTML><HEAD><TITLE>test.html</TITLE></HEAD><BODY BGCOLOR=Silver>M</BODY><br />
^                   ^                        ^                     ^<br />


It added some abnormal word that I don't want.
Coulde you give me any solution or suggestion?
Thank you!!
GeneralRe: A question to save html file Pin
Michael Dunn2-Apr-05 7:38
sitebuilderMichael Dunn2-Apr-05 7:38 
GeneralRe: A question to save html file Pin
Anonymous2-Apr-05 13:33
Anonymous2-Apr-05 13:33 
GeneralCan't get the data from a loaded vector Pin
Larry Mills Sr2-Apr-05 3:49
Larry Mills Sr2-Apr-05 3:49 
Generalclipboard Pin
Stirfie2-Apr-05 1:50
Stirfie2-Apr-05 1:50 
GeneralRe: clipboard Pin
Tareq Ahmed Siraj2-Apr-05 5:25
Tareq Ahmed Siraj2-Apr-05 5:25 
GeneralRe: clipboard Pin
Stirfie4-Apr-05 1:19
Stirfie4-Apr-05 1:19 
GeneralRe: clipboard Pin
David Crow4-Apr-05 3:24
David Crow4-Apr-05 3:24 
GeneralRe: clipboard Pin
Tareq Ahmed Siraj4-Apr-05 19:48
Tareq Ahmed Siraj4-Apr-05 19:48 
GeneralRe: clipboard Pin
Stirfie4-Apr-05 23:09
Stirfie4-Apr-05 23:09 
GeneralSolution Explorer Pin
NewbieStats1-Apr-05 23:40
NewbieStats1-Apr-05 23:40 
GeneralTo find used space in folders or path without searching files Pin
inbakumar.G1-Apr-05 23:18
inbakumar.G1-Apr-05 23:18 
Generalhelp Pin
stammer1-Apr-05 23:04
stammer1-Apr-05 23:04 
GeneralRe: help Pin
Alexander M.,2-Apr-05 3:11
Alexander M.,2-Apr-05 3:11 
GeneralRe: help Pin
stammer2-Apr-05 14:07
stammer2-Apr-05 14:07 
GeneralRe: help Pin
ThatsAlok2-Apr-05 18:11
ThatsAlok2-Apr-05 18:11 
GeneralRe: help Pin
stammer3-Apr-05 13:53
stammer3-Apr-05 13:53 
GeneralRe: help Pin
Christian Graus2-Apr-05 10:35
protectorChristian Graus2-Apr-05 10:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.