|
(fied above post)
XML DOM is better only in some cases, I've tried a bit (rather, with the IE5 DOM, but the game is the same, isn't it?).
I frequently end up having to build some HTML, often the XML DOM feels heavy (though acceptable), and I usually end up rolling my own very specializred functions. Trying to generalize these, the interface always gets very convoluted, so I woukld at least like to see others ideas
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
peterchen wrote: I frequently end up having to build some HTML
Don't know what that means, example?
I have used DOM's for years to generate HTML and never had a problem. Acutally it's 2006 wouldn't you generate XHTML anyway. A DOM is little more than a tree structure that handles syntax for XML which is exactly what you need to generate HTML anyway right? I'm confused.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Hi i've strange problem.i've 4 columns Account,date,amount,address in a Clist Control.
//a breif abt my project
in my project am trying to slect a file by browsing (i used cfiledialog). & then pressing the button 'showbutton' i want to see all the documents(i.e.account,date,amount,address) of that file.this file is actually a list of several transaction.........
now in this project i didn't use classwizard, all the message mapping,dialog creation i've done mannually...............
//the problem
now, the problem is, while am trynig to insert items in the r8 column, only the 1st column is being populated , not the others....in the insertion column
CString strItem;
LVITEM lvi;
lvi.mask = LVIF_TEXT;
//Account no...
strItem.Format(_T(&TP->TR.Account[1]));
lvi.iSubItem = 0;
lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
m_cListCtrl.InsertItem( &lvi);
//Expirary Date
strItem.Format(_T(&TP->TR.ExpDate[1]));
lvi.iSubItem = 1;
lvi.pszText = (LPTSTR)(LPCTSTR)( strItem);
m_cListCtrl.InsertItem( &lvi);
nd this way only putting "lvi.iSubItem=2,3...4"
Don't get confused with TP,TR...these r my project variables for other issues.
using that above code.. am getting only 1st column....
waiting for quick reply.....A GOOD DAY to all.
kamalesh
|
|
|
|
|
kamalesh82 wrote: strItem.Format(_T(&TP->TR.Account[1]));
The _T() macro is only needed with string literals. Also, why use the Format() method when you can assign &TP->TR.Account[1] directly to strItem ?
Try:
int nItem = m_cListCtrl.InsertItem(0, &TP->TR.Account[1]);
m_cListCtrl.SetItemText(nItem, 1, &TP->TR.ExpDate[1]);
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
&TP->TR.Account[1] returns the string literal.so be sure that it's not making any problem. nd i used SetItemText as well as the SetItem both function.
Good Day
kamalesh
|
|
|
|
|
Hi,
here is my example without lvItem structure:
<br />
i -> my linenumber and 1 is the first subitem! <br />
ctrlList->SetItem(i, 1, LVIF_TEXT, MyTextHere, 0,NULL, NULL, 0);<br />
lvItem.iSubItem = 1;<br />
ctrlList.Setitem(&lvItem);<br />
i hope that helps!
regards
break;
-- modified at 10:07 Thursday 6th July, 2006
|
|
|
|
|
you should set the itemidentifier for the subitem, subitem must to know to witch item is to add!?
i solve your problem like this:
<br />
LVITEM lvItem;<br />
lvItem.iItem = 0;
lvItem.iSubItem = 1;
lvItem.mask = LVIF_TEXT;<br />
<br />
int i = 0;<br />
while(i < 10)<br />
{<br />
lvItem.iItem = i;
lvItem.pszText = (LPTSTR)(LPCTSTR) NewText;<br />
listCtrl->SetItem(&lvItem);<br />
i++;<br />
}<br />
<br />
i try this and it works!
regards
break;
-- modified at 10:43 Thursday 6th July, 2006
|
|
|
|
|
Hi All!
We have a system with, 256MB of memory. and the hard drive is 40GB but besides to it is written 37.2GB. Is this has to do with virtual memory???
Thanks!!!
|
|
|
|
|
See Here
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Dennis L wrote: ...the hard drive is 40GB but besides to it is written 37.2GB.
What exactly does this mean?
Dennis L wrote: Is this has to do with virtual memory???
Virtual memory
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
maybe he does not know that a HD will have its capacity reduced after being formatted ?
that the advertised 40GB will really be 37.2GB AFTER formatting.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
How we can change dialog from left to right,
please help me,
thank u
kanth
|
|
|
|
|
Can you please clarify a bit more on this?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Actually my project is i have one main dialog when we click on openbuttonchild dialog should attached the main dialog at the right side.if the child coordinates are grater than window coordinates then it move to left side of the main dialog. When press open button again the child shoud move back to the parent dialog from left side.
kanth
-- modified at 8:16 Thursday 6th July, 2006
|
|
|
|
|
So can't you just use MoveWindow() or SetWindowPos() with the child dialog?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hope I understood your question
You need to change Layout RTL in property window to true (Can you be more specific)
whitesky
|
|
|
|
|
i want to know,that as i insert a edit box on dialog box
and 10 buttons .
now i want that when i press these 1-10 buttons(choose randmly or choose two buttons) then that will be appear on edit box
as i try this on one button value is stored at a time when i press second button the preivious value is replaced from edit box.
and plz tell me as value in edit bos is started from left side but i want to print them on right side as in the phone system
plzz............
Ashish Dogra
MCA
Noida
|
|
|
|
|
You need to insert numbers in editbox like 1234,yes?
whitesky
|
|
|
|
|
YA I WANT TO SDO THAT
Ashish Dogra
MCA
Noida
|
|
|
|
|
You can use SetWindowText and you need to save previous values
whitesky
|
|
|
|
|
how can i save previous values
can you tell me some example
Ashish Dogra
MCA
Noida
|
|
|
|
|
well one simple way is when you insert values to editbox 1
now you want to insert value 2 use CString str;GetWindowText(str);str.insert(srt.getlenght(),yourvalue);now you have 12 and again ...12345
I think its a simple way
whitesky
|
|
|
|
|
i want to insert values when i press buttons which have values 1-9
i dont add values manually
as i press button value on that button will be displayed on edit box
as in phone system
when we press buttons they appear on screen
Ashish Dogra
MCA
Noida
|
|
|
|
|
dont need to send mail you said your dialog box closed why?
whitesky
|
|
|
|
|
Implement simple way.
Take data from edit box in one variable attach what u supposed to attach after that and again use SetWindowText() using the variable.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|