Click here to Skip to main content
15,915,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error C2664: 'WideCharToMultiByte' : cannot convert parameter 3 from 'class CString' to 'const unsigned short *' Pin
KarstenK20-Aug-08 0:12
mveKarstenK20-Aug-08 0:12 
GeneralRe: error C2664: 'WideCharToMultiByte' : cannot convert parameter 3 from 'class CString' to 'const unsigned short *' Pin
Jijo.Raj20-Aug-08 3:20
Jijo.Raj20-Aug-08 3:20 
AnswerRe: error C2664: 'WideCharToMultiByte' : cannot convert parameter 3 from 'class CString' to 'const unsigned short *' Pin
David Crow20-Aug-08 3:23
David Crow20-Aug-08 3:23 
QuestionGet the program full path. Pin
Ahmed Charfeddine19-Aug-08 23:38
Ahmed Charfeddine19-Aug-08 23:38 
AnswerRe: Get the program full path. Pin
toxcct19-Aug-08 23:42
toxcct19-Aug-08 23:42 
AnswerRe: Get the program full path. Pin
SandipG 19-Aug-08 23:50
SandipG 19-Aug-08 23:50 
GeneralRe: Get the program full path. Pin
JudyL_MD20-Aug-08 7:05
JudyL_MD20-Aug-08 7:05 
QuestionFile Serach [modified] Pin
NewVC++19-Aug-08 23:29
NewVC++19-Aug-08 23:29 
Hi All

I want to show all file folder which is present in USB Device.At this time i am geting only file name.And main problem is that when device is blanck then it is showing some Dummy line. Show how can i remove that problem..

Code is here



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

//* 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 (!(FindFileData.dwFileAttributes &
FILE_ATTRIBUTE_DIRECTORY))
{
m_ListCountries.AddString(FindFileData.cFileName);

}


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

FindClose(hFind);

}

}

dwDrives = dwDrives >> 1;//next drive

chDriveLabel++;

}
return true;



Plz help me

modified on Wednesday, August 20, 2008 5:45 AM

AnswerRe: Off Topic Pin
toxcct19-Aug-08 23:30
toxcct19-Aug-08 23:30 
GeneralRe: Off Topic Pin
NewVC++19-Aug-08 23:40
NewVC++19-Aug-08 23:40 
GeneralRe: Off Topic Pin
toxcct19-Aug-08 23:44
toxcct19-Aug-08 23:44 
GeneralRe: Off Topic Pin
NewVC++19-Aug-08 23:47
NewVC++19-Aug-08 23:47 
QuestionRe: File Serach Pin
CPallini20-Aug-08 0:32
mveCPallini20-Aug-08 0:32 
AnswerRe: File Serach Pin
David Crow20-Aug-08 3:31
David Crow20-Aug-08 3:31 
Questionerror C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
Dhiraj kumar Saini19-Aug-08 22:58
Dhiraj kumar Saini19-Aug-08 22:58 
AnswerRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' [modified] Pin
toxcct19-Aug-08 23:11
toxcct19-Aug-08 23:11 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
Dhiraj kumar Saini19-Aug-08 23:14
Dhiraj kumar Saini19-Aug-08 23:14 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
_AnsHUMAN_ 19-Aug-08 23:17
_AnsHUMAN_ 19-Aug-08 23:17 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
toxcct19-Aug-08 23:26
toxcct19-Aug-08 23:26 
AnswerRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
Cedric Moonen19-Aug-08 23:12
Cedric Moonen19-Aug-08 23:12 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
Dhiraj kumar Saini19-Aug-08 23:16
Dhiraj kumar Saini19-Aug-08 23:16 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
_AnsHUMAN_ 19-Aug-08 23:19
_AnsHUMAN_ 19-Aug-08 23:19 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
toxcct19-Aug-08 23:20
toxcct19-Aug-08 23:20 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
Mark Salsbery20-Aug-08 6:36
Mark Salsbery20-Aug-08 6:36 
GeneralRe: error C2039: 'QueryStringValue' : is not a member of 'CRegKey' Pin
toxcct20-Aug-08 6:41
toxcct20-Aug-08 6:41 

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.