Click here to Skip to main content
14,602,510 members

C / C++ / MFC

 
AnswerRe: CListCtrl Pin
Hamid_RT7-Aug-06 21:35
MemberHamid_RT7-Aug-06 21:35 
GeneralRe: CListCtrl Pin
Bravoone_20067-Aug-06 22:01
MemberBravoone_20067-Aug-06 22:01 
GeneralRe: CListCtrl Pin
Hamid_RT7-Aug-06 22:38
MemberHamid_RT7-Aug-06 22:38 
GeneralRe: CListCtrl Pin
Bravoone_20068-Aug-06 0:00
MemberBravoone_20068-Aug-06 0:00 
QuestionRe: CListCtrl [modified] Pin
Bravoone_20068-Aug-06 1:29
MemberBravoone_20068-Aug-06 1:29 
QuestionRe: CListCtrl Pin
David Crow8-Aug-06 3:09
MemberDavid Crow8-Aug-06 3:09 
AnswerRe: CListCtrl Pin
Hamid_RT8-Aug-06 7:53
MemberHamid_RT8-Aug-06 7:53 
QuestionRe: CListCtrl Pin
Bravoone_20068-Aug-06 19:44
MemberBravoone_20068-Aug-06 19:44 
How can I remove spaces from my string ? i don t now how ? how ?The spaces become from the database and when i loaded ... in list ctrl ....?
How can i : FindItem in the second column and the 3- column ...etc.?
Because my string searches only in the first column and GetItemText from second column , 3 column etc . this is my code the code from yesterday is not good for me :


void CMyList::OnOK()
{

UpdateData();
m_list2.RedrawItems(0,m_list2.GetItemCount());


CString sName = _T("Name");
m_name.GetWindowText(sName);


LVFINDINFO stInfo = {0};
stInfo.flags = LVFI_PARTIAL;
stInfo.psz = sName;
int nItem = m_list2.FindItem( &stInfo );
if( nItem != -1 )
{
// the item is in the list control
CString sSecondColumnText = m_list2.GetItemText( nItem, 1 );
// set the text to the second edit box
m_rezult.SetWindowText( sSecondColumnText );

}

}
Only this code works !
I remind you :

0 1 2
----------------------------------
| Name | City | Country |
-----------------------------------
-----------------------------------
| George | London | England |
-----------------------------------
|George | NewYork | USA |
-----------------------------------
|George | Madrid | Spain |
-----------------------------------

all i want is to find in my list the country from example from my both edit boxes : m_name (sName) , m_city (sCity) , m_rezult(sRezult)
Please help me with my code ....!!!!(The data are from a database fox pro and have spaces when i loaded )is works only with (LVFI_PARTIAL) and is not so good!
I promise you when i finish my program i will loaded on codeproject !
and will be very usefull for many things !
Thanks for your help ! And i will wait your answer because i dont now how to continue i will try something but ...





Bravoone

AnswerRe: CListCtrl Pin
Hamid_RT8-Aug-06 21:29
MemberHamid_RT8-Aug-06 21:29 
GeneralRe: CListCtrl Pin
Bravoone_20068-Aug-06 21:49
MemberBravoone_20068-Aug-06 21:49 
GeneralRe: CListCtrl Pin
Hamid_RT8-Aug-06 22:44
MemberHamid_RT8-Aug-06 22:44 
QuestionRe: CListCtrl Pin
Bravoone_20069-Aug-06 2:23
MemberBravoone_20069-Aug-06 2:23 
AnswerRe: CListCtrl Pin
Hamid_RT9-Aug-06 3:04
MemberHamid_RT9-Aug-06 3:04 
QuestionDisable an Item in CListBox By Double Clicking on it Pin
georgekjolly7-Aug-06 20:25
Membergeorgekjolly7-Aug-06 20:25 
AnswerRe: Disable an Item in CListBox By Double Clicking on it Pin
Naveen7-Aug-06 20:38
MemberNaveen7-Aug-06 20:38 
AnswerRe: Disable an Item in CListBox By Double Clicking on it Pin
Hamid_RT7-Aug-06 20:47
MemberHamid_RT7-Aug-06 20:47 
AnswerRe: Disable an Item in CListBox By Double Clicking on it Pin
georgekjolly7-Aug-06 21:16
Membergeorgekjolly7-Aug-06 21:16 
AnswerRe: Disable an Item in CListBox By Double Clicking on it Pin
Viorel.7-Aug-06 21:36
MemberViorel.7-Aug-06 21:36 
Questionactive xcontrol Pin
With_problem7-Aug-06 20:16
MemberWith_problem7-Aug-06 20:16 
QuestionSendMessage Function .... Pin
sach!!7-Aug-06 20:10
Membersach!!7-Aug-06 20:10 
AnswerRe: SendMessage Function .... Pin
Parthi_Appu7-Aug-06 20:27
MemberParthi_Appu7-Aug-06 20:27 
GeneralRe: SendMessage Function .... Pin
sach!!7-Aug-06 20:43
Membersach!!7-Aug-06 20:43 
GeneralRe: SendMessage Function .... Pin
Naren Neelamegam7-Aug-06 20:57
MemberNaren Neelamegam7-Aug-06 20:57 
GeneralRe: SendMessage Function .... Pin
sach!!7-Aug-06 21:07
Membersach!!7-Aug-06 21:07 
GeneralRe: SendMessage Function .... Pin
sach!!7-Aug-06 20:58
Membersach!!7-Aug-06 20:58 

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.