pickupfolder

Hello

I try to fine tune an application, and need to assign a button to open up a browse folder selection dialog. Please note the program is written using MSVCPP6, with no MFC and no classwizard syntax and it runs OK.

The button should open a folder select dialog (compared to the dialog found in winamp / when clicking FiLE/ADD DIR, to select a folder and up the contents in winamp playlist). The OK to open folder should return a path for working in a directory with some data. The user must enter the directory because the program uses files that are found in it. So the user may open a file in the diretory, and retreave the PATH using PathRemoveFileSpec(), but I want it nicer, so the user cannot delete the files in it.

the following lines of code written don't work, please help:
void pickupfolder(){

typedef struct _browseinfo {
HWND hwndOwner ;
// LPCITEMIDLIST pidlRoot;
// LPSTR pszDisplayName;
LPCSTR lpszTitle;
UINT ulFlags;
// BFFCALLBACK lpfn;
LPARAM lParam;
int iImage;
} BROWSEINFO;
//WINAPI SHBrowseForFolder (LPBROWSEINFO lpbi);
// SHBrowseForFolder(BROWSEINFO);
}

the function pickupfolder it's called from this main function:
BOOL CALLBACK ConfigProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
switch (uMsg){
case WM_INITDIALOG:
.....} return FALSE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
...
case IDBROWSE:
pickupfolder();
EndDialog(hwndDlg,0);
return FALSE;}
}
return FALSE;
}

Last edited on
Could you be more specific than the functions you have "don't work"?
Topic archived. No new replies allowed.