sarfaraznawaz wrote:
m_listCrl->InsertColumn(1,(LPWSTR)szNewText,LVCFMT_LEFT,75+75+25+50+25+25+25,-1);
Are you seriously doing this in production code or is this just a personal project?
sarfaraznawaz wrote:
m_listCrl->InsertItem(0,File_Name,NULL); m_listCrl->SetItemText(0,1,m_Filepath); m_listCrl->SetItemText(0,2,_T("10KB"));
This should be:
int nItem = m_listCrl->InsertItem(0, File_Name);
m_listCrl->SetItemText(nItem, 1, m_Filepath);
m_listCrl->SetItemText(nItem, 2, _T("10KB"));
sarfaraznawaz wrote:
here is the code
am adding the file name and file path in an Clist ctl.
am dont want to add the same file name or path in an list .
i tried with FindItem
You should be using some other data structure that is better suited for searching, or one that doesn't allow duplicates to begin with. Populate the list control from that.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous