Neuen Ordner anlegen im Verzeichnisauswahldialog
-
BROWSEINFO Structure
MembersulFlags
BIF_NEWDIALOGSTYLE
Version 5.0. Use the new user interface. Setting this flag provides the user with a larger dialog box that can be resized. The dialog box has several new capabilities including: drag and drop capability within the dialog box, reordering, shortcut menus, new folders, delete, and other shortcut menu commands. To use this flag, you must call OleInitialize or CoInitialize before calling SHBrowseForFolder.
-
Aja... BROWSEINFO ... SHBrowseForFolder ... cool, jetzt weiß ich auch mal, wie man so nen Verzeichnisauswahldialog macht :D!
cya
-
Danke für die Antwort @kwoTx !
-
Hast jemand auch noch einen Beispiel-Code im Bezug auf OleInitialize ?
-
OleInitialize(NULL);
-
Scheint aber mit dem alten SDK nicht zu funktionieren, das Flag BIF_NEWDIALOGSTYLE ? Oder ?
-
Lad dir halt das neue SDK runter :D.
cya
-
Ich denke eher, das das an deinem System liegt! (brauchst IE5 oder neuer)
Shell and Common Controls Versions
-
Kann machen, was ich will aber auch nach dem SDK-Update und trotz IE Version 6 hat meine Pfad-Auswahldialog keine Verzeichnis-Neuerstellungs-Möglichkeit !
-
int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData) { switch(uMsg) { case BFFM_INITIALIZED: SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)BrowseSelection); break; case BFFM_SELCHANGED: SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)BrowseSelection); break; } return 1; } int GetBrowseFile(HWND hwnd, LPSTR pszDisplayName) { LPITEMIDLIST pidlRoot = NULL; LPITEMIDLIST pidlSelected = NULL; BROWSEINFO bi = {0}; char szFile[MAX_PATH] = {0}; int result = 0; LPMALLOC pMalloc = NULL; SHGetMalloc(&pMalloc); sprintf(BrowseSelection, "%s", pszDisplayName); bi.hwndOwner = hwnd; bi.pidlRoot = pidlRoot; bi.pszDisplayName = pszDisplayName; bi.lpszTitle = "Choose a folder..."; bi.ulFlags = BIF_EDITBOX | BIF_NEWDIALOGSTYLE; bi.lpfn = NULL; bi.lParam = TRUE; bi.lpfn = BrowseCallbackProc; pidlSelected = SHBrowseForFolder(&bi); if(pidlSelected != NULL) { SHGetPathFromIDList(pidlSelected, pszDisplayName); result = 1; } if(pidlSelected) pMalloc->Free(pidlSelected); if(pidlRoot) pMalloc->Free(pidlRoot); pMalloc->Release(); return result; }
[ Dieser Beitrag wurde am 05.01.2003 um 22:49 Uhr von esskar editiert. ]