Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: if statement help Pin
prasad_som27-Dec-06 19:04
prasad_som27-Dec-06 19:04 
GeneralRe: if statement help Pin
dellthinker27-Dec-06 19:15
dellthinker27-Dec-06 19:15 
AnswerRe: if statement help Pin
Michael Dunn27-Dec-06 19:29
sitebuilderMichael Dunn27-Dec-06 19:29 
QuestionRunning exe problem Pin
aaaan27-Dec-06 18:13
aaaan27-Dec-06 18:13 
GeneralRe: Running exe problem Pin
prasad_som27-Dec-06 18:21
prasad_som27-Dec-06 18:21 
GeneralRe: Running exe problem Pin
aaaan27-Dec-06 18:29
aaaan27-Dec-06 18:29 
AnswerRe: Running exe problem Pin
prasad_som27-Dec-06 18:36
prasad_som27-Dec-06 18:36 
QuestionQuestion is for prasad_som Pin
amitmistry_petlad 27-Dec-06 17:29
amitmistry_petlad 27-Dec-06 17:29 
Well i have been waiting for your replay for the solution for

<br />
ListView_GetItemText(hwndListview,i,0,(LPWSTR)&buff,MAX_PATH);<br />


i had my previous thread i asked you about the following.
i repeat it again.


the follwing is working but for the fetching ListView_GetItemText is not working. please let check our last discussion.

<br />
LRESULT iCount=ListView_GetItemCount(hwndListview);	<br />


then i iterate the loop.

<br />
if(iCount > 0)<br />
{<br />
for(int i=0;i<iCount;i++)<br />
{<br />
	WCHAR szInputFile[MAX_PATH];<br />
//	string File;<br />
	char buff[500];<br />
//	LV_ITEM  _ms_lvi; <br />
							  <br />
							//SendMessage(hwndListbox,LVM_GETITEM,(WPARAM)i,(LPARAM)&_ms_lvi.pszText);<br />
<br />
							ListView_GetItemText(hwndListview,i,0,(LPWSTR)&buff,MAX_PATH);<br />
							std::string buff_input(buff);<br />
<br />
							<br />
//size_t len = wcslen(szInputFile) * sizeof(LPCWSTR);<br />
//char* tempOutFile = new char[len];							//WideCharToMultiByte(CP_ACP,0,szInputFile,-1,tempOutFile,(int)len,NULL,NULL);<br />
/*string s = tempOutFile;<br />
if(tempOutFile)<br />
{<br />
delete[] tempOutFile;<br />
	}*/<br />
	<br />
//<br />
//strcpy(File,buff);							<br />
//File=(string)buff;<br />
<br />
//BOOL b=ListView_GetItem(hwndListbox,0);<br />
//if(wcslen(szInputFile) > 0)<br />
{<br />
//string sIn = util.ConvertWCHARToString(szInputFile);<br />
//if(sIn == uploadedFile)<br />
<br />
<br />
							if(buff_input == uploadedFile)		<br />
							{<br />
							valid = false;<br />
							MessageBox(hDlg,_T("This item is already added to the list."),_T("Encode"),MB_ICONINFORMATION);<br />
							break;<br />
							}<br />
							}						<br />
							}						<br />
						}



i have tried to fetch the list view's first o colum strings in so many way
1) i have used string but no result gives ,error
2) using WHAR but when tring to convert it into string. it gives question mark
3)i have used char array but it gives me the result but when i am trying to convert it only convert first char and terminate.
i have checked everything with did debugging.

give me some idea or guid line to avoid the duplication in the list view control.









amit
GeneralRe: Question is for prasad_som Pin
prasad_som27-Dec-06 17:38
prasad_som27-Dec-06 17:38 
AnswerRe: Question is for prasad_som Pin
Hamid_RT27-Dec-06 18:14
Hamid_RT27-Dec-06 18:14 
GeneralRe: Question is for prasad_som Pin
amitmistry_petlad 27-Dec-06 20:38
amitmistry_petlad 27-Dec-06 20:38 
QuestionRe: Question is for prasad_som Pin
prasad_som27-Dec-06 21:54
prasad_som27-Dec-06 21:54 
AnswerRe: Question is for prasad_som Pin
amitmistry_petlad 27-Dec-06 22:06
amitmistry_petlad 27-Dec-06 22:06 
AnswerRe: Question is for prasad_som Pin
prasad_som27-Dec-06 22:12
prasad_som27-Dec-06 22:12 
GeneralRe: Question is for prasad_som Pin
amitmistry_petlad 27-Dec-06 22:44
amitmistry_petlad 27-Dec-06 22:44 
GeneralRe: Question is for prasad_som [modified] Pin
prasad_som27-Dec-06 22:57
prasad_som27-Dec-06 22:57 
GeneralRe: Question is for prasad_som Pin
amitmistry_petlad 27-Dec-06 23:01
amitmistry_petlad 27-Dec-06 23:01 
AnswerRe: Question is for prasad_som Pin
prasad_som27-Dec-06 23:16
prasad_som27-Dec-06 23:16 
GeneralRe: Question is for prasad_som Pin
amitmistry_petlad 28-Dec-06 2:16
amitmistry_petlad 28-Dec-06 2:16 
Questioncommand bar problem Pin
eantaru27-Dec-06 17:28
eantaru27-Dec-06 17:28 
AnswerRe: command bar problem Pin
Paul Conrad27-Dec-06 17:56
professionalPaul Conrad27-Dec-06 17:56 
GeneralRe: command bar problem Pin
eantaru27-Dec-06 18:01
eantaru27-Dec-06 18:01 
QuestionBlocking call to ShellExecuteEx? Pin
devvvy27-Dec-06 13:48
devvvy27-Dec-06 13:48 
AnswerRe: Blocking call to ShellExecuteEx? Pin
baloneyman27-Dec-06 13:59
baloneyman27-Dec-06 13:59 
AnswerRe: Blocking call to ShellExecuteEx? Pin
Mark Salsbery27-Dec-06 14:00
Mark Salsbery27-Dec-06 14:00 

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.