Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionS.M.A.R.T. support in Hard Disk Drive Pin
Abinash Mohanty4-May-09 23:09
Abinash Mohanty4-May-09 23:09 
AnswerRe: S.M.A.R.T. support in Hard Disk Drive Pin
Stuart Dootson4-May-09 23:12
professionalStuart Dootson4-May-09 23:12 
GeneralRe: S.M.A.R.T. support in Hard Disk Drive Pin
Abinash Mohanty4-May-09 23:22
Abinash Mohanty4-May-09 23:22 
AnswerRe: S.M.A.R.T. support in Hard Disk Drive Pin
Randor 5-May-09 11:08
professional Randor 5-May-09 11:08 
QuestionGetPath and "Cannot complete this function" error Pin
Code-o-mat4-May-09 23:05
Code-o-mat4-May-09 23:05 
AnswerRe: GetPath and "Cannot complete this function" error Pin
Iain Clarke, Warrior Programmer4-May-09 23:11
Iain Clarke, Warrior Programmer4-May-09 23:11 
GeneralRe: GetPath and "Cannot complete this function" error Pin
Code-o-mat4-May-09 23:19
Code-o-mat4-May-09 23:19 
QuestionGetting a Crash while browsing for a folder. Pin
V K 24-May-09 23:04
V K 24-May-09 23:04 
I am using the following code snippet. This is the code which gets executed when I click on a Browse button.

Function call - BrowseDialog( GetParent()->GetSafeHwnd(), csTitle, lpszBuf );

Function Definition -

BrowseDialog(HWND hWndParent,CString pszPath,LPSTR csDialogTitle)
{
_tcsncpy(szInitialDir, pszPath, _MAX_PATH-1);
int nLen = _tcslen(szInitialDir);
if (szInitialDir[nLen-1] == '\\')
szInitialDir[nLen-1] = '\0';

BROWSEINFO bi;
memset((LPVOID)&bi, 0, sizeof(bi));
TCHAR szDisplayName[_MAX_PATH];
szDisplayName[0] = '\0';
bi.hwndOwner = hWndParent;
bi.pidlRoot = NULL;
bi.pszDisplayName = (LPSTR)szDisplayName;
bi.lpszTitle = csDialogTitle;
bi.lpfn = RecipeBrowseCallbackProc;
bi.ulFlags = BIF_RETURNONLYFSDIRS|BIF_EDITBOX|BIF_VALIDATE|BIF_USENEWUI|BIF_STATUSTEXT;
LPITEMIDLIST pIIL = ::SHBrowseForFolder(&bi);

BOOL bRet = ::SHGetPathFromIDList(pIIL, (char*)&szSelectedDir);

}


Some times I am getting crash when clicking on browse button and sometimes after opening the browse button and selecting another directory..


Can I know what is the fault in above code
AnswerRe: Getting a Crash while browsing for a folder. Pin
Iain Clarke, Warrior Programmer4-May-09 23:16
Iain Clarke, Warrior Programmer4-May-09 23:16 
GeneralRe: Getting a Crash while browsing for a folder. Pin
V K 24-May-09 23:19
V K 24-May-09 23:19 
GeneralRe: Getting a Crash while browsing for a folder. Pin
Iain Clarke, Warrior Programmer4-May-09 23:47
Iain Clarke, Warrior Programmer4-May-09 23:47 
GeneralRe: Getting a Crash while browsing for a folder. Pin
David Crow5-May-09 2:52
David Crow5-May-09 2:52 
AnswerRe: Getting a Crash while browsing for a folder. Pin
Le@rner4-May-09 23:21
Le@rner4-May-09 23:21 
AnswerRe: Getting a Crash while browsing for a folder. Pin
CPallini4-May-09 23:33
mveCPallini4-May-09 23:33 
QuestionError: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' [modified] Pin
mmayur4-May-09 22:38
mmayur4-May-09 22:38 
AnswerRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
CPallini4-May-09 22:47
mveCPallini4-May-09 22:47 
AnswerRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
Cedric Moonen4-May-09 23:04
Cedric Moonen4-May-09 23:04 
GeneralRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
Stuart Dootson4-May-09 23:10
professionalStuart Dootson4-May-09 23:10 
AnswerRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
Stuart Dootson4-May-09 23:09
professionalStuart Dootson4-May-09 23:09 
GeneralRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
mmayur6-May-09 0:46
mmayur6-May-09 0:46 
GeneralRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
mmayur6-May-09 0:46
mmayur6-May-09 0:46 
GeneralRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
Stuart Dootson6-May-09 0:52
professionalStuart Dootson6-May-09 0:52 
GeneralRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
mmayur6-May-09 1:13
mmayur6-May-09 1:13 
GeneralRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
Stuart Dootson6-May-09 1:30
professionalStuart Dootson6-May-09 1:30 
GeneralRe: Error: Cannot convert from 'std::map<_Kty,_Ty> *' to 'LPCTSTR' Pin
mmayur8-May-09 0:15
mmayur8-May-09 0:15 

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.