Click here to Skip to main content
15,923,389 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to show browse button? Pin
puppya30-Nov-08 18:05
puppya30-Nov-08 18:05 
AnswerRe: how to show browse button? Pin
Hamid_RT30-Nov-08 18:11
Hamid_RT30-Nov-08 18:11 
GeneralRe: how to show browse button? Pin
puppya30-Nov-08 18:15
puppya30-Nov-08 18:15 
GeneralRe: how to show browse button? Pin
Hamid_RT30-Nov-08 18:32
Hamid_RT30-Nov-08 18:32 
GeneralRe: how to show browse button? Pin
puppya30-Nov-08 19:29
puppya30-Nov-08 19:29 
GeneralRe: how to show browse button? Pin
Hamid_RT30-Nov-08 20:20
Hamid_RT30-Nov-08 20:20 
GeneralRe: how to show browse button? Pin
puppya30-Nov-08 21:25
puppya30-Nov-08 21:25 
GeneralRe: how to show browse button? Pin
kamalesh821-Dec-08 1:12
kamalesh821-Dec-08 1:12 
I hope this little sample code will help you if you want to select the folder,

void CFolderSelectionDlg::OnBrowseClick()
{
BROWSEINFO brwsInfo;
ZeroMemory(&brwsInfo,sizeof(BROWSEINFO));
int iImage = 0;
char szFolderPath[MAX_PATH];
char szTitle[255];
memset(szFolderPath,'\0',sizeof(szFolderPath));
memset(szTitle,'\0',sizeof(szTitle));


brwsInfo.hwndOwner = GetSafeHwnd();
brwsInfo.iImage = iImage;
brwsInfo.lpfn = NULL;
brwsInfo.pidlRoot = NULL;
brwsInfo.pszDisplayName = szFolderPath;
brwsInfo.lpszTitle = szTitle;

//InitCommonControls();

ITEMIDLIST *ptrItemList = SHBrowseForFolder(&brwsInfo);
if(ptrItemList != NULL)
m_strFolderPath = szFolderPath;
UpdateData(FALSE);

}

this is the simplest. if you want all advanced functionality, you should inherit yoour custom fileDialog class. please go thourh the MSDN.you have to write your version of
virtual void OnFolderChange();
virtual BOOL OnFileNameOK();

best of luck...

kamalesh

QuestionRe: how to show browse button? Pin
David Crow1-Dec-08 10:59
David Crow1-Dec-08 10:59 
QuestionHow to change from VC++ 6 to .Net Pin
CodingLover30-Nov-08 17:27
CodingLover30-Nov-08 17:27 
AnswerRe: How to change from VC++ 6 to .Net Pin
Randor 30-Nov-08 19:32
professional Randor 30-Nov-08 19:32 
QuestionWhat's the meaning of 'nocreate' identifier Pin
CodingLover30-Nov-08 16:33
CodingLover30-Nov-08 16:33 
AnswerRe: What's the meaning of 'nocreate' identifier Pin
Fernando A. Gomez F.30-Nov-08 17:50
Fernando A. Gomez F.30-Nov-08 17:50 
QuestionCAnimateCtrl in modeless dialog... Pin
Cpt Rick30-Nov-08 12:18
Cpt Rick30-Nov-08 12:18 
AnswerRe: CAnimateCtrl in modeless dialog... Pin
Hans Dietrich30-Nov-08 23:57
mentorHans Dietrich30-Nov-08 23:57 
GeneralRe: CAnimateCtrl in modeless dialog... Pin
Cpt Rick1-Dec-08 4:26
Cpt Rick1-Dec-08 4:26 
AnswerRe: CAnimateCtrl in modeless dialog... Pin
Cpt Rick1-Dec-08 11:32
Cpt Rick1-Dec-08 11:32 
QuestionDestroying controls created by CWinFormControl Pin
astibich230-Nov-08 11:45
astibich230-Nov-08 11:45 
QuestionC++ destructor Pin
Fred Andres30-Nov-08 5:35
Fred Andres30-Nov-08 5:35 
AnswerRe: C++ destructor Pin
PJ Arends30-Nov-08 7:03
professionalPJ Arends30-Nov-08 7:03 
GeneralRe: C++ destructor Pin
Fred Andres30-Nov-08 7:27
Fred Andres30-Nov-08 7:27 
AnswerRe: C++ destructor Pin
Mark Salsbery30-Nov-08 7:19
Mark Salsbery30-Nov-08 7:19 
QuestionConverting an integer to a string. Pin
Quecumber25630-Nov-08 5:17
Quecumber25630-Nov-08 5:17 
AnswerRe: Converting an integer to a string. Pin
PJ Arends30-Nov-08 6:57
professionalPJ Arends30-Nov-08 6:57 
AnswerRe: Converting an integer to a string. Pin
Mark Salsbery30-Nov-08 7:24
Mark Salsbery30-Nov-08 7:24 

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.