Click here to Skip to main content
15,924,581 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Select Directory throught File Open dialog Pin
Nishad S25-Oct-07 20:29
Nishad S25-Oct-07 20:29 
AnswerRe: How to Select Directory throught File Open dialog Pin
Anurag Gandhi25-Oct-07 22:57
professionalAnurag Gandhi25-Oct-07 22:57 
Use the followign code:

CString YourClassName::GetFolderName()
{
	BROWSEINFO br;

	CString title = "Select the folder to convert its files";
	char buff[MAX_PATH];

	br.hwndOwner = m_hWnd;
	br.pidlRoot = NULL;
	br.lParam = NULL;
	br.lpfn = NULL;
	br.lpszTitle =( (LPTSTR) ((LPCTSTR)title));
	br.pszDisplayName =(LPTSTR) buff;
	//br.ulFlags = BIF_BROWSEINCLUDEFILES;
	br.ulFlags = BIF_RETURNONLYFSDIRS;
	
	LPITEMIDLIST item;
	item = ::SHBrowseForFolder ( &br );
	::SHGetPathFromIDList ( item, buff );
	
	return buff;
}


Hoping that it will help you.

Anurag Gandhi.
http://www.softgandhi.co.nr
Life is a computer program and every one is the programmer of his own life.

GeneralRe: How to Select Directory throught File Open dialog Pin
JudyL_MD26-Oct-07 3:03
JudyL_MD26-Oct-07 3:03 
GeneralRe: How to Select Directory throught File Open dialog Pin
Anurag Gandhi26-Oct-07 3:42
professionalAnurag Gandhi26-Oct-07 3:42 
AnswerRe: How to Select Directory throught File Open dialog Pin
JudyL_MD26-Oct-07 3:04
JudyL_MD26-Oct-07 3:04 
QuestionFind the EOF in CFile Pin
CodingLover25-Oct-07 19:14
CodingLover25-Oct-07 19:14 
AnswerRe: Find the EOF in CFile Pin
chandu00425-Oct-07 19:38
chandu00425-Oct-07 19:38 
GeneralRe: Find the EOF in CFile Pin
CodingLover25-Oct-07 19:55
CodingLover25-Oct-07 19:55 
AnswerRe: Find the EOF in CFile Pin
Nishad S25-Oct-07 20:43
Nishad S25-Oct-07 20:43 
GeneralRe: Find the EOF in CFile Pin
CodingLover25-Oct-07 21:24
CodingLover25-Oct-07 21:24 
GeneralRe: Find the EOF in CFile Pin
chandu00425-Oct-07 22:02
chandu00425-Oct-07 22:02 
GeneralRe: Find the EOF in CFile Pin
Nishad S25-Oct-07 22:05
Nishad S25-Oct-07 22:05 
AnswerRe: Find the EOF in CFile Pin
CodingLover30-Oct-07 19:35
CodingLover30-Oct-07 19:35 
QuestionVarious projects in one workspace Pin
neha.agarwal2725-Oct-07 18:41
neha.agarwal2725-Oct-07 18:41 
AnswerRe: Various projects in one workspace Pin
Paresh Chitte25-Oct-07 18:51
Paresh Chitte25-Oct-07 18:51 
AnswerRe: Various projects in one workspace Pin
JudyL_MD26-Oct-07 3:07
JudyL_MD26-Oct-07 3:07 
QuestionFile Handaling Pin
manish.patel25-Oct-07 17:59
manish.patel25-Oct-07 17:59 
AnswerRe: File Handaling Pin
Nishad S25-Oct-07 18:16
Nishad S25-Oct-07 18:16 
QuestionRe: File Handaling Pin
manish.patel25-Oct-07 18:20
manish.patel25-Oct-07 18:20 
AnswerRe: File Handaling Pin
Nishad S25-Oct-07 18:27
Nishad S25-Oct-07 18:27 
QuestionRe: File Handaling Pin
manish.patel25-Oct-07 19:12
manish.patel25-Oct-07 19:12 
AnswerRe: File Handaling Pin
Nishad S25-Oct-07 19:17
Nishad S25-Oct-07 19:17 
AnswerRe: File Handaling Pin
Paresh Chitte25-Oct-07 18:27
Paresh Chitte25-Oct-07 18:27 
Question(MFC42D.DLL): 0xC0000005: Access Violation. Pin
riteshsv25-Oct-07 17:37
riteshsv25-Oct-07 17:37 
AnswerRe: (MFC42D.DLL): 0xC0000005: Access Violation. Pin
Roger Stoltz25-Oct-07 22:44
Roger Stoltz25-Oct-07 22:44 

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.