Click here to Skip to main content
15,905,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Remove Duplicate Values Pin
Michael Schubert20-Aug-08 4:03
Michael Schubert20-Aug-08 4:03 
GeneralRe: Remove Duplicate Values Pin
Rajesh R Subramanian20-Aug-08 20:28
professionalRajesh R Subramanian20-Aug-08 20:28 
GeneralRe: Remove Duplicate Values Pin
CPallini20-Aug-08 21:04
mveCPallini20-Aug-08 21:04 
GeneralRe: Remove Duplicate Values Pin
NewVC++20-Aug-08 19:10
NewVC++20-Aug-08 19:10 
QuestionRe: Remove Duplicate Values Pin
CPallini20-Aug-08 21:36
mveCPallini20-Aug-08 21:36 
AnswerRe: Remove Duplicate Values Pin
Michael Schubert20-Aug-08 2:23
Michael Schubert20-Aug-08 2:23 
AnswerRe: Remove Duplicate Values Pin
Jijo.Raj20-Aug-08 3:36
Jijo.Raj20-Aug-08 3:36 
GeneralRe: Remove Duplicate Values Pin
NewVC++20-Aug-08 19:13
NewVC++20-Aug-08 19:13 
Here i am sending a code which is adding string.And plz tell me how can i remove to add duplicate string..

BOOL CUSBDlg::FileList()
{



//Get Logical Drives

DWORD dwDrives=GetLogicalDrives();



if(0==dwDrives)

{

// return FALSE;

}



DWORD dwCount=0;



char chDriveLabel='A';



char szRootpath[5]={0,0,0,0,0};



while(dwDrives !=0)

{

if ((dwDrives & 1) != 0)

{

sprintf(szRootpath,"%c:\\",chDriveLabel);



//removable drive

if(DRIVE_REMOVABLE==GetDriveType(szRootpath))

{

WIN32_FIND_DATA FindFileData;

HANDLE hFind;



//Removable dirve lable

// std::cout <<"Files in " << szRootpath << std::endl;



m_ListCountries.AddString(szRootpath);

m_tree.InsertItem(szRootpath);



//* represent search all files and directories

szRootpath[3]='*';



hFind=FindFirstFile(szRootpath,&FindFileData);



if (INVALID_HANDLE_VALUE == hFind)

{

// return FALSE;

}




// List all the files in the directory .

do

{


//ignore the sub directories

if (strcmp(FindFileData.cFileName,_T(".")) && strcmp(FindFileData.cFileName,_T("..")))

{

m_ListCountries.AddString(FindFileData.cFileName);
m_tree.InsertItem(FindFileData.cFileName);

}



}while (FindNextFile(hFind, &FindFileData) != 0);



FindClose(hFind);

}



}

dwDrives = dwDrives >> 1;//next drive

chDriveLabel++;

}

return true;

}

Plz help me
GeneralRe: Remove Duplicate Values Pin
Jijo.Raj21-Aug-08 3:38
Jijo.Raj21-Aug-08 3:38 
QuestionCan I show UI in Windows service in MFC? [modified] Pin
sumit.durg20-Aug-08 0:52
sumit.durg20-Aug-08 0:52 
AnswerRe: Can I show UI in Windows service? Pin
Nibu babu thomas20-Aug-08 1:15
Nibu babu thomas20-Aug-08 1:15 
AnswerRe: Can I show UI in Windows service in MFC? Pin
Jonathan [Darka]20-Aug-08 1:49
professionalJonathan [Darka]20-Aug-08 1:49 
AnswerRe: Can I show UI in Windows service in MFC? Pin
Mike Dimmick20-Aug-08 7:06
Mike Dimmick20-Aug-08 7:06 
QuestionListBox Pin
vcprog20-Aug-08 0:05
vcprog20-Aug-08 0:05 
AnswerRe: ListBox Pin
_AnsHUMAN_ 20-Aug-08 0:09
_AnsHUMAN_ 20-Aug-08 0:09 
GeneralRe: ListBox Pin
vcprog20-Aug-08 0:12
vcprog20-Aug-08 0:12 
GeneralRe: ListBox Pin
_AnsHUMAN_ 20-Aug-08 0:14
_AnsHUMAN_ 20-Aug-08 0:14 
GeneralRe: ListBox Pin
Cedric Moonen20-Aug-08 0:54
Cedric Moonen20-Aug-08 0:54 
AnswerRe: ListBox Pin
CPallini20-Aug-08 0:10
mveCPallini20-Aug-08 0:10 
GeneralRe: ListBox Pin
vcprog20-Aug-08 0:20
vcprog20-Aug-08 0:20 
AnswerRe: ListBox Pin
Jijo.Raj20-Aug-08 0:11
Jijo.Raj20-Aug-08 0:11 
AnswerRe: ListBox Pin
Hamid_RT20-Aug-08 2:21
Hamid_RT20-Aug-08 2:21 
QuestionCreate task manager icon Pin
hari_honey19-Aug-08 23:59
hari_honey19-Aug-08 23:59 
AnswerRe: Create task manager icon Pin
_AnsHUMAN_ 20-Aug-08 0:07
_AnsHUMAN_ 20-Aug-08 0:07 
GeneralRe: Create task manager icon Pin
hari_honey20-Aug-08 0:09
hari_honey20-Aug-08 0:09 

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.