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

C / C++ / MFC

 
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 
Your display name buffer is probably being overrun. The SHBrowseForFolder() function assumes that pszDisplayName is MAX_PATH characters long, whereas in your code it is only 9 characters long. Do it like this:
void IO_scherm_multiinput::OnBnClickedButton1()
{
    BROWSEINFO* b=new BROWSEINFO();
    LPTSTR buf=new TCHAR[MAX_PATH];
    _tcscpy(buf, "Undef BE");
 
    int image=-1;
    b->hwndOwner=this->m_hWnd;
    b->iImage=image;
 
    b->lpszTitle="Please select a driectory for IO";
    b->pidlRoot=NULL;
    b->pszDisplayName=buf;
 
    b->ulFlags=BIF_BROWSEINCLUDEFILES;
    LPITEMIDLIST x=SHBrowseForFolder(b);
    delete [] buf;  // Delete the memory when you're finished with it
}
Hope this helps,

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

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 
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 

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.