Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1526 connectés 

  FORUM HardWare.fr
  Programmation
  C++

  open dialog

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

open dialog

n°237386
yayoo
Posté le 30-10-2002 à 16:32:03  profilanswer
 

je voudrais dans un open dialog pouvoir choisir un dossier et non pas un fichier
si quelqu'un sait comment on programme ça, qu'il me le fasse savoir
 
ps : j utilise VisualC++

mood
Publicité
Posté le 30-10-2002 à 16:32:03  profilanswer
 

n°237417
antp
Super Administrateur
Champion des excuses bidons
Posté le 30-10-2002 à 16:55:10  profilanswer
 

ShBrowseForFolder


---------------
mes programmes ·· les voitures dans les films ·· apprenez à écrire
n°237439
yayoo
Posté le 30-10-2002 à 17:13:19  profilanswer
 

antp a écrit a écrit :

ShBrowseForFolder




 
j'ai fait une recherche dans la msdn et ce n'est pas dans la documentation c++ mais dans la documentation visual basic

n°237445
antp
Super Administrateur
Champion des excuses bidons
Posté le 30-10-2002 à 17:18:00  profilanswer
 

Citation :


Displays a dialog box that enables the user to select a shell folder.


WINSHELLAPI LPITEMIDLIST WINAPI SHBrowseForFolder(
 
    LPBROWSEINFO lpbi  
   );  
 


Parameters
 
lpbi
 
Pointer to a BROWSEINFO structure that contains information used to display the dialog box.
 
 
 
Return Values
 
Returns a pointer to an item identifier list that specifies the location of the selected folder relative to the root of the name space. If the user chooses the Cancel button in the dialog box, the return value is NULL.
The calling application is responsible for freeing the returned item identifier list using the shell's task allocator.
 
See Also
 
BROWSEINFO  


 
extrait de la doc sur l'API Win32 de Delphi & Builder, qui a priori est une ancienne version de la MSDN.


---------------
mes programmes ·· les voitures dans les films ·· apprenez à écrire
n°237447
antp
Super Administrateur
Champion des excuses bidons
Posté le 30-10-2002 à 17:18:29  profilanswer
 

Citation :


Contains parameters for the the SHBrowseForFolder function and receives information about the folder selected by the user.


typedef struct _browseinfo {  
    HWND hwndOwner;          // see below  
    LPCITEMIDLIST pidlRoot;  // see below  
    LPSTR pszDisplayName;    // see below  
    LPCSTR lpszTitle;        // see below  
    UINT ulFlags;            // see below  
    BFFCALLBACK lpfn;        // see below  
    LPARAM lParam;           // see below  
    int iImage;              // see below  
} BROWSEINFO, *PBROWSEINFO, *LPBROWSEINFO;  
 


 
Members
 
hwndOwner
 
Handle of the owner window for the dialog box.
 
pidlRoot
 
Pointer to an item identifier list (an ITEMIDLIST structure) specifying the location of the "root" folder to browse from. Only the specified folder and its subfolders appear in the dialog box. This member can be NULL, and in that case, the name space root (the desktop folder) is used.
 
pszDisplayName
 
Pointer to a buffer that receives the display name of the folder selected by the user. The size of this buffer is assumed to be MAX_PATH bytes.
 
lpszTitle
 
Pointer to a null-terminated string that is displayed above the tree view control in the dialog box. This string can be used to specify instructions to the user.
 
ulFlags
 
Value specifying the types of folders to be listed in the dialog box as well as other options. This member can include zero or more of the following values:
 
BIF_BROWSEFORCOMPUTER Only returns computers. If the user selects anything other than a computer, the OK button is grayed.
BIF_BROWSEFORPRINTER Only returns printers. If the user selects anything other than a printer, the OK button is grayed.
BIF_DONTGOBELOWDOMAIN Does not include network folders below the domain level in the tree view control.
BIF_RETURNFSANCESTORS Only returns file system ancestors. If the user selects anything other than a file system ancestor, the OK button is grayed.
BIF_RETURNONLYFSDIRS Only returns file system directories. If the user selects folders that are not part of the file system, the OK button is grayed.
BIF_STATUSTEXT Includes a status area in the dialog box. The callback function can set the status text by sending messages to the dialog box.
 
 
lpfn
 
Address an application-defined function that the dialog box calls when events occur. For more information, see the description of the BrowseCallbackProc function. This member can be NULL.
 
lParam
 
Application-defined value that the dialog box passes to the callback function (if one is specified).
 
iImage
 
Variable that receives the image associated with the selected folder. The image is specified as an index to the system image list.


---------------
mes programmes ·· les voitures dans les films ·· apprenez à écrire
n°237458
yayoo
Posté le 30-10-2002 à 17:26:54  profilanswer
 

antp-> c'est la msdn qui est mal foutu, mais ça marche, merci pour ton aide.

n°237486
PassPassLe​Ouinj
Posté le 30-10-2002 à 17:47:53  profilanswer
 

t'as raison, c'est toujours la faute de l'outil. Des millions de developpeur utilisent le msdn ...
 
j'ai tappé dans mon index du msdn SHBrowseForFolder et j'ai eu les infos tout de suite. C'est a se demander comment tu cherches ...


---------------
il y a du monde sur la corde à linge
n°237639
yayoo
Posté le 31-10-2002 à 00:06:44  profilanswer
 

PassPassLeOuinj a écrit a écrit :

t'as raison, c'est toujours la faute de l'outil. Des millions de developpeur utilisent le msdn ...
 
j'ai tappé dans mon index du msdn SHBrowseForFolder et j'ai eu les infos tout de suite. C'est a se demander comment tu cherches ...




 
j'ai jamais dis que j'avais pas trouvé la doc, j'ai seulement dis qu elle etait mal placé. De toute façon la msdn est pas clair

n°237641
lorill
Posté le 31-10-2002 à 00:14:33  profilanswer
 

PassPassLeOuinj a écrit a écrit :

t'as raison, c'est toujours la faute de l'outil. Des millions de developpeur utilisent le msdn ...




 
tant que ca ?  :ouch:

n°237704
LeGreg
Posté le 31-10-2002 à 05:31:00  profilanswer
 

lorill a écrit a écrit :

 
tant que ca ?  :ouch:  




 
les logiciels sont tellement bugues
qu'il faut une armee pour les maintenir :)
 
LeGreg


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  open dialog

 

Sujets relatifs
[PHP & Apache] configuration: open_basedirboite de dialog.
je cherche une base de donnée open source pour openoffice[open gl] c quoi la différence entre une source de lumière et...
[open GL] je n'arrive pas à rester sur mon repère global fixe ![PHP] Jeux en open source e php/sql
creer une dialog box avec les templates[Delphi] Progress Dialog + Cancel => solutions dispo ...
[open gl] mon animation disparait au bout de quelque secondes !!!c quoi l'open ML ?
Plus de sujets relatifs à : open dialog


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR