Click here to Skip to main content
14,633,725 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: click and see function? Pin
_AnsHUMAN_ 7-Aug-06 21:39
Member_AnsHUMAN_ 7-Aug-06 21:39 
AnswerRe: click and see function? Pin
Naveen7-Aug-06 21:50
MemberNaveen7-Aug-06 21:50 
QuestionCListCtrl Pin
Bravoone_20067-Aug-06 20:54
MemberBravoone_20067-Aug-06 20:54 
AnswerRe: CListCtrl Pin
Hamid_RT7-Aug-06 21:17
MemberHamid_RT7-Aug-06 21:17 
QuestionRe: CListCtrl Pin
Bravoone_20067-Aug-06 21:23
MemberBravoone_20067-Aug-06 21:23 
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 
//i write this example for you i hope its helpful for you
//in this example we have a CEdit and in this control we have a string(test) now we want to search this item in listctrl first we get this string from Editbox//and set it find1.psz = str22; in the loop we have a search and return value to index and convert(itoa) for show location these items in this list 0,3,6 and you get a -1 when it doesnt find any items//instead messagebox you can insert this value to another editbox
-----------------------------------------------
<br />
		USES_CONVERSION;<br />
	CEdit m_Edit;<br />
	CString str22;<br />
	TCHAR	buffer[100];<br />
	LVFINDINFO find1={0};<br />
<br />
	m_Ctrl1.InsertItem(0,"test");<br />
	m_Ctrl1.InsertItem(1,"test1");<br />
	m_Ctrl1.InsertItem(0,"a");	<br />
	m_Ctrl1.InsertItem(0,"b");	<br />
	m_Ctrl1.InsertItem(0,"test");	<br />
	m_Ctrl1.InsertItem(0,"a1");	<br />
	m_Ctrl1.InsertItem(0,"b1");	<br />
	m_Ctrl1.InsertItem(0,"test");	<br />
<br />
	m_Edit.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,100,23),this,1);<br />
	m_Edit.SetWindowText("test");<br />
	m_Edit.GetWindowText(str22);<br />
	int index=-1;<br />
<br />
<br />
find1.psz = str22;<br />
find1.flags = LVFI_STRING;<br />
	do<br />
	{<br />
	  index=m_Ctrl1.FindItem(&find1,index);<br />
	  MessageBox(itoa(index,buffer,10));<br />
	  <br />
  //m_Edit2.SetWindowText(buffer);//location from item in listctrl<br />
	}while(index!=-1);<br />
<br />




WhiteSky


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 
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 

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.