Tout est dans le titre , j'aimerais , avec un dialogue "classique" n'afficher que le 'voisinage réseau' ou d'ailleurs son contraire 'tout sauf le voisinage réseau' .
c'est possible si j'en crois cette source en VB
je pense que je dois jouer avec SHBrowseForFolder et browseInfo et les flags , mais là , je sèche lamentablement
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 function BrowseDialog (const Title: string; const Flag: integer): string; var lpItemID : PItemIDList; BrowseInfo : TBrowseInfo; DisplayName : array[0..MAX_PATH] of char; TempPath : array[0..MAX_PATH] of char; begin Result:=''; FillChar(BrowseInfo, sizeof(TBrowseInfo), #0); with BrowseInfo do begin hwndOwner := Application.Handle; pszDisplayName := @DisplayName; lpszTitle := PChar(Title); ulFlags := Flag; lpfn := BrowseDialogCallBack; pidlRoot:= // <<<-------------------------------------ici est la vraie question end; lpItemID := SHBrowseForFolder(BrowseInfo); if lpItemId <> nil then begin SHGetPathFromIDList(lpItemID, TempPath); Result := TempPath; GlobalFreePtr(lpItemID); end; end;
Partager