Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDatabase problems Pin
Anonymous6-Aug-03 4:01
Anonymous6-Aug-03 4:01 
GeneralEmptying editbox Pin
BoudewijnEctor6-Aug-03 2:53
BoudewijnEctor6-Aug-03 2:53 
GeneralRe: Emptying editbox Pin
Chris Meech6-Aug-03 3:10
Chris Meech6-Aug-03 3:10 
GeneralRe: Emptying editbox Pin
BoudewijnEctor6-Aug-03 3:23
BoudewijnEctor6-Aug-03 3:23 
GeneralRe: Emptying editbox Pin
David Crow6-Aug-03 3:10
David Crow6-Aug-03 3:10 
GeneralRe: Emptying editbox Pin
Vitali Halershtein6-Aug-03 3:20
Vitali Halershtein6-Aug-03 3:20 
GeneralCheckListBox event for checkbox Pin
rohit.dhamija6-Aug-03 2:24
rohit.dhamija6-Aug-03 2:24 
GeneralRe: CheckListBox event for checkbox Pin
David Crow6-Aug-03 2:48
David Crow6-Aug-03 2:48 
GeneralRe: CheckListBox event for checkbox Pin
rohit.dhamija6-Aug-03 3:09
rohit.dhamija6-Aug-03 3:09 
GeneralRe: CheckListBox event for checkbox Pin
David Crow6-Aug-03 3:15
David Crow6-Aug-03 3:15 
GeneralInserting extended character Pin
JensB6-Aug-03 2:06
JensB6-Aug-03 2:06 
Generalstatic system wide singleton Pin
Dangleberry6-Aug-03 1:58
sussDangleberry6-Aug-03 1:58 
GeneralRe: static system wide singleton Pin
jhwurmbach6-Aug-03 2:19
jhwurmbach6-Aug-03 2:19 
GeneralRe: static system wide singleton Pin
Ryan Binns6-Aug-03 2:25
Ryan Binns6-Aug-03 2:25 
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 

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.