Click here to Skip to main content
15,917,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Static Text Control Wordwrap Pin
Gary R. Wheeler13-May-07 2:50
Gary R. Wheeler13-May-07 2:50 
QuestionMicrosoft Speech SDK Pin
smzhaq12-May-07 2:48
smzhaq12-May-07 2:48 
QuestionHow to show CTcxMsgbox and buttons in a different color [modified] Pin
Cyber Friend12-May-07 2:45
Cyber Friend12-May-07 2:45 
QuestionRe: How to show CTcxMsgbox and buttons in a different color Pin
Hamid_RT12-May-07 6:03
Hamid_RT12-May-07 6:03 
AnswerRe: How to show CTcxMsgbox and buttons in a different color Pin
Mark Salsbery12-May-07 6:27
Mark Salsbery12-May-07 6:27 
GeneralRe: How to show CTcxMsgbox and buttons in a different color Pin
Cyber Friend14-May-07 1:13
Cyber Friend14-May-07 1:13 
QuestionMouseover Pin
prathuraj12-May-07 2:41
prathuraj12-May-07 2:41 
AnswerRe: Mouseover Pin
Hans Dietrich12-May-07 3:04
mentorHans Dietrich12-May-07 3:04 
AnswerRe: Mouseover Pin
jk chan12-May-07 5:28
jk chan12-May-07 5:28 
GeneralRe: Mouseover Pin
Mark Salsbery12-May-07 6:14
Mark Salsbery12-May-07 6:14 
QuestionCListCrtl like in task manager Pin
Cedric Moonen12-May-07 2:25
Cedric Moonen12-May-07 2:25 
AnswerRe: CListCrtl like in task manager Pin
Hans Dietrich12-May-07 2:53
mentorHans Dietrich12-May-07 2:53 
GeneralRe: CListCrtl like in task manager Pin
Cedric Moonen12-May-07 2:58
Cedric Moonen12-May-07 2:58 
QuestionCallBack function Pin
Kiran Pinjala12-May-07 1:09
Kiran Pinjala12-May-07 1:09 
AnswerRe: CallBack function Pin
CPallini12-May-07 2:19
mveCPallini12-May-07 2:19 
AnswerRe: CallBack function Pin
Hamid_RT12-May-07 6:05
Hamid_RT12-May-07 6:05 
Questionsave results in xml Pin
lavy288312-May-07 0:31
lavy288312-May-07 0:31 
Hello....I have this function(printinstance()) who generate me randomly boxes(whith another function) with width,height and depth, and I want to save the results in XML, but it only save me just the last box generated...can you figure out what it is the problem in my code please...I have to do this very quick and I am a beginer in XML.

where f-is the first box generated and l-is the last box generated
void printinstance(item *f, item *l, itype W, itype H, itype D)
{ int p,Wcont,Hcont,Dcont;
int const max=1000;
item *i,*j;
itype x1, y1, z1,x2, y2, z2;
stype vol, totvol;
int notip,po;

Wcont=(int)(W);
Hcont=(int)(H);
Dcont=(int)(D);

for (i=f;i<=l;i++)
{
notip=1;
x1 = i->dx; y1 = i->dy; z1 = i->dz;
for (j=i+1;j<=l;j++)
{
if ((i->dx==j->dx)&&(i->dy==j->dy)&&(i->dz==j->dz)) notip++;
}
p=1;
for (j=f;j<i;j++)
if="" ((j-="">dx==i->dx)&&(j->dy==i->dy)&&(j->dz==i->dz))
{
p=0;
break;
}
if (p)
{
x1=i->dx;
y1=i->dy;
z1=i->dz;
XmlTextWriter^ writer = gcnew XmlTextWriter("d:\\contload.xml",Encoding::UTF8);
writer->Formatting = Formatting::Indented;
writer->Indentation=4;
writer->WriteStartDocument();
writer->WriteStartElement("ContainerSolution");

writer->WriteStartElement("ContainerDimensions");
writer->WriteAttributeString("ContainerWidth",W.ToString());
writer->WriteAttributeString("ContainerHeight",H.ToString());
writer->WriteAttributeString("ContainerDepth",D.ToString());
writer->WriteStartElement("Boxes");
writer->WriteAttributeString("BoxWidth",x1.ToString());
writer->WriteAttributeString("BoxHeight",y1.ToString());
writer->WriteAttributeString("BoxDepth",z1.ToString());
writer->WriteEndElement();
writer->WriteEndElement();
writer->WriteEndElement();
writer->WriteEndDocument();

writer->Close();
}}}

and I call my function in the main program like this printinstance(f, l, W, H, D);

lavi
AnswerRe: save results in xml Pin
Mark Salsbery12-May-07 5:22
Mark Salsbery12-May-07 5:22 
AnswerRe: save results in xml Pin
Hamid_RT12-May-07 6:07
Hamid_RT12-May-07 6:07 
AnswerRe: save results in xml Pin
S Douglas13-May-07 2:08
professionalS Douglas13-May-07 2:08 
QuestionOpen() function not opening file Pin
neha.agarwal2711-May-07 23:50
neha.agarwal2711-May-07 23:50 
AnswerRe: Open() function not opening file Pin
Rajesh R Subramanian12-May-07 0:15
professionalRajesh R Subramanian12-May-07 0:15 
GeneralRe: Open() function not opening file Pin
neha.agarwal2712-May-07 0:23
neha.agarwal2712-May-07 0:23 
GeneralRe: Open() function not opening file Pin
Rajesh R Subramanian12-May-07 0:34
professionalRajesh R Subramanian12-May-07 0:34 
QuestionQueue Pin
tamer hasasn11-May-07 23:47
tamer hasasn11-May-07 23:47 

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.