|
What is the type of your variable ?
|
|
|
|
|
the variable is of CListBox type
Raja
|
|
|
|
|
CListBox does NOT have an InsertColumn() method. How many times have you been told? If you need to display information in columnar style, use a CListCtrl. I pointed out an example to use CListCtrl as well. Nobody can help you out if you are not willing to help yourself at first.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
i have done the following code inside the listctrl..there is no errors but while i run it iam not able to see the columns???
list.InsertColumn(0,"Heading 1" ,LVCFMT_LEFT, 100);
list.InsertColumn(1, "Heading 2",LVCFMT_LEFT, 120);
list.InsertItem(0,"Item1");
list.InsertItem(1,"Item2");
Raja
|
|
|
|
|
Mohanraj D wrote: i have done the following code inside the listctrl..
What do you mean "inside list control"? Where have you written this code?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
i have written here
void ClistctrlDlg::OnLvnItemchangedList1(NMHDR *pNMHDR, LRESULT *pResult)
{
list.InsertColumn(0,"Heading 1" ,LVCFMT_LEFT, 100);
list.InsertColumn(1, "Heading 2",LVCFMT_LEFT, 120);
list.InsertItem(0,"Item1");
list.InsertItem(1,"Item2");
LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
*pResult = 0;
}
Raja
|
|
|
|
|
What is the purpose of writing it up there? Do you even know what you are trying to do? Your need is to initialize some control and if you don't know where to do it, it is almost impossible for anybody to offer you help over forums like these. You will need to read a book on MFC (or whatever you want to do programming on).
Please write code to initialize controls on your InitDialog() function.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Mohanraj D wrote: what should be done???
You should use a list control instead of a listbox.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You still didn't answer the question, so here is an article about CListCtrl[^] and here is an article about CListBox[^]. Pick the one you need.
But as you need multiple columns, I would guess you need a CListCtrl.
|
|
|
|
|
how to add items to a report(listcontrol)column wise....as ....
list.Insertitem() adds items in the next row of the first column alone
Raja
|
|
|
|
|
Did you read the article ?
|
|
|
|
|
Do you want to use of a listbox or listctrl
|
|
|
|
|
iam using listbox and iam new to these concepts,will u pls explain how to create clistctrls and how to implement the concept
Raja
|
|
|
|
|
|
|
Hi all,
I want to get language of my system through coding, like if my system is supporting English or chinese then i should get the specified value....
I am not getting how to do it???
can anybody tell me how to do it???
thanks in advance
|
|
|
|
|
VCProgrammer wrote: I want to get language of my system through coding, ... if my system is supporting English or chinese
See GetLocaleInfo()[^] and EnumUILanguages()[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
hey thanks... it solved my problem...
|
|
|
|
|
Hi Every body...Iam sending Hello World Text From Flex To Html component ...but its displaying in Html like this
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Hello World!</FONT></P></TEXTFORMAT>
But i need only For Hello World ...
how to display Hello World only in Html component ..any body help me..
|
|
|
|
|
How did you send it? can you show your code?
|
|
|
|
|
Hi all,
I m using Droplist combobox because i want to use uneditable combobox.
but when i want to show particular string of combobox then it is blank.
I m using here SelectString but it is not working.
Please tell me how can i show the selected string in droplist combobox.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Can you please show us your code?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
But is working in case of Dropdown.
in my code at input side i m save a string from Combbox.and at the time output i m showing the saved string.
CCombobox m_mnts_combo;
m_mnts_combo.SelectString(0, (CString)m_PayMonth);
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Have you checked the return value of SelectSring?
The documentation says that the return value would be:
The zero-based index of the selected item if the string was found. If the search was unsuccessful, the return value is CB_ERR and the current selection is not changed.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
someone wrote: m_mnts_combo.SelectString(0, (CString)m_PayMonth);
What type is m_PayMonth ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|