Click here to Skip to main content
15,904,497 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: static system wide singleton Pin
Dangleberry7-Aug-03 3:03
sussDangleberry7-Aug-03 3:03 
GeneralRe: static system wide singleton Pin
Ryan Binns7-Aug-03 3:10
Ryan Binns7-Aug-03 3:10 
GeneralRe: static system wide singleton Pin
Vitali Halershtein6-Aug-03 3:05
Vitali Halershtein6-Aug-03 3:05 
GeneralDirectory selection Pin
BoudewijnEctor6-Aug-03 1:58
BoudewijnEctor6-Aug-03 1:58 
GeneralRe: Directory selection Pin
Ryan Binns6-Aug-03 2:12
Ryan Binns6-Aug-03 2:12 
GeneralRe: Directory selection Pin
BoudewijnEctor6-Aug-03 3:10
BoudewijnEctor6-Aug-03 3:10 
GeneralRe: Directory selection Pin
Ryan Binns6-Aug-03 3:26
Ryan Binns6-Aug-03 3:26 
GeneralRe: Directory selection Pin
jhwurmbach6-Aug-03 2:32
jhwurmbach6-Aug-03 2:32 
To make things easier, cou could allocate your BROSEINFO on the stack and hand the address over to SHBrowseForFolder(). Also, zeroing the structure is a good practice to make clear which pointers have been set and which not.

I did include Ryan's fixes for your buffer memory issues in this version.
void IO_scherm_multiinput::OnBnClickedButton1()
{
 BROWSEINFO b = {0};   //fill with zero

 LPTSTR buf=new TCHAR[MAX_PATH];
 _tcscpy(buf, "Undef BE");
 
 int image=-1;
 b.hwndOwner=this->m_hWnd;
[...]. b.pszDisplayName=buf;

 b.ulFlags=BIF_BROWSEINCLUDEFILES;
 LPITEMIDLIST x=SHBrowseForFolder( &b );
 //save the name of the selected item from buf (if you need it)
 delete [] buf;
}



Who is 'General Failure'? And why is he reading my harddisk?!?
QuestionXP Problem with service ? Pin
Andreas@luk6-Aug-03 1:26
Andreas@luk6-Aug-03 1:26 
AnswerRe: XP Problem with service ? Pin
Vitali Halershtein6-Aug-03 3:42
Vitali Halershtein6-Aug-03 3:42 
GeneralLoad order of implicitly linked DLLs Pin
Wolfram Steinke6-Aug-03 1:26
Wolfram Steinke6-Aug-03 1:26 
GeneralRe: Load order of implicitly linked DLLs Pin
Chris Meech6-Aug-03 3:15
Chris Meech6-Aug-03 3:15 
GeneralRe: Load order of implicitly linked DLLs Pin
JT Anderson6-Aug-03 11:26
JT Anderson6-Aug-03 11:26 
GeneralMultiple file selection in Windows API Pin
Kayembi6-Aug-03 1:24
Kayembi6-Aug-03 1:24 
GeneralRe: Multiple file selection in Windows API Pin
David Crow6-Aug-03 3:09
David Crow6-Aug-03 3:09 
GeneralRe: Multiple file selection in Windows API Pin
Kayembi6-Aug-03 4:01
Kayembi6-Aug-03 4:01 
GeneralRe: Multiple file selection in Windows API Pin
David Crow6-Aug-03 4:23
David Crow6-Aug-03 4:23 
GeneralRe: Multiple file selection in Windows API Pin
Kayembi6-Aug-03 5:01
Kayembi6-Aug-03 5:01 
GeneralSaving/creating and Loading files Pin
Kayembi6-Aug-03 1:06
Kayembi6-Aug-03 1:06 
GeneralRe: Saving/creating and Loading files Pin
Dangleberry6-Aug-03 1:16
sussDangleberry6-Aug-03 1:16 
GeneralRe: Saving/creating and Loading files Pin
lawrence20006-Aug-03 3:13
lawrence20006-Aug-03 3:13 
GeneralRe: Saving/creating and Loading files Pin
David Crow6-Aug-03 3:19
David Crow6-Aug-03 3:19 
GeneralRe: Saving/creating and Loading files Pin
Kayembi6-Aug-03 4:06
Kayembi6-Aug-03 4:06 
GeneralRe: Saving/creating and Loading files Pin
David Crow6-Aug-03 4:18
David Crow6-Aug-03 4:18 
GeneralRe: Saving/creating and Loading files Pin
Kayembi6-Aug-03 4:45
Kayembi6-Aug-03 4:45 

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.