Thread: RE: [GD-Windows] Choosing a folder with a dialog
Brought to you by:
vexxed72
From: Pascal G. <pas...@ar...> - 2002-10-22 12:05:10
|
Thanks. Looking into it. Pascal. -----Original Message----- From: Dale Freya [mailto:df...@op...] Sent: 22 October 2002 12:50 To: 'WinProgramming (E-mail)' Subject: RE: [GD-Windows] Choosing a folder with a dialog SHBrowseForFolder Dale Freya Amaranth - Software Engineer Instructor - Vocational Education Computer Games & Interactive Entertainment Email: df...@op... <mailto:df...@op...> -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Pascal Gane Sent: Tuesday, 22 October 2002 9:38 PM To: WinProgramming (E-mail) Subject: [GD-Windows] Choosing a folder with a dialog Anybody knows which Win32 function to use (maybe MFC based) to allow the user to select a folder not file ?? Using CFileDialog is fine for files but it only allows me to select a folder that already contains a file. I'd like to be able to select any folder. Happy coding, Pascal. -------------------------------------------- Pascal Gane Tel : 07940 503 610 "Shine" Computer Artworks www.artworks.co.uk "Visiting is pretty Visiting is good Seems that all they ever Wanted was a brother." Foo Fighters - "This is a call" |
From: Pascal G. <pas...@ar...> - 2002-10-22 15:15:30
|
Nice, seems to do most of the job but how do you make it open at a specified folder without restrictiing the access to only the folders below that one ?? It seems that you always have to create it with the desktop as the default folder but then every time you want to choose a folder you have to navigate from the start again. Any ideas ??? Pascal. -----Original Message----- From: Pierre Terdiman [mailto:p.t...@wa...] Sent: 22 October 2002 12:46 To: WinProgramming (E-mail) Subject: Re: [GD-Windows] Choosing a folder with a dialog SHBrowseForFolder ? ----- Original Message ----- From: Pascal Gane <mailto:pas...@ar...> To: WinProgramming <mailto:gam...@li...> (E-mail) Sent: Tuesday, October 22, 2002 1:37 PM Subject: [GD-Windows] Choosing a folder with a dialog Anybody knows which Win32 function to use (maybe MFC based) to allow the user to select a folder not file ?? Using CFileDialog is fine for files but it only allows me to select a folder that already contains a file. I'd like to be able to select any folder. Happy coding, Pascal. -------------------------------------------- Pascal Gane Tel : 07940 503 610 "Shine" Computer Artworks www.artworks.co.uk "Visiting is pretty Visiting is good Seems that all they ever Wanted was a brother." Foo Fighters - "This is a call" |
From: Rich <leg...@xm...> - 2002-10-22 16:16:36
|
In article <B14C9D7F1977D111AD740060970ACBDA011A5304@warhol>, Pascal Gane <pas...@ar...> writes: > Nice, seems to do most of the job but how do you make it open at a specified > folder without restrictiing the access to only the folders below that one ?? RTFMSDN -- Ask me about my upcoming book on Direct3D from Addison-Wesley! Direct3D Book <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net> |
From: Pascal G. <pas...@ar...> - 2002-10-22 16:27:34
|
That was nice and really unhelpful. I'd rather you sent me an e-mail directly that waste bandwidth here. And I read the MSDN, thank you, otherwise I would have posted here. Since you apparently read better than I did, would you mind telling me which chapter should I turn my attention to ?? Thanks, Pascal. -----Original Message----- From: Rich [mailto:leg...@xm...] Sent: 22 October 2002 17:17 To: gam...@li... Subject: Re: [GD-Windows] Choosing a folder with a dialog In article <B14C9D7F1977D111AD740060970ACBDA011A5304@warhol>, Pascal Gane <pas...@ar...> writes: > Nice, seems to do most of the job but how do you make it open at a specified > folder without restrictiing the access to only the folders below that one ?? RTFMSDN -- Ask me about my upcoming book on Direct3D from Addison-Wesley! Direct3D Book <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net> ------------------------------------------------------- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Rich <leg...@xm...> - 2002-10-22 16:34:54
|
In article <B14C9D7F1977D111AD740060970ACBDA011A530B@warhol>, Pascal Gane <pas...@ar...> writes: > That was nice and really unhelpful. ...and with that opening remark, you want me to take you on a personalized guided tour of the documentation? The reason I posted only RTFMSDN is that the information you desire is 1 mouse click away from the page describing SHBrowseForFolder. Therefore, I conclude that you really haven't bothered to look at the documentation and instead want us to handhold you through the entire process. Therefore, I suggest that you RTFMSDN yourself. -- Ask me about my upcoming book on Direct3D from Addison-Wesley! Direct3D Book <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net> |
From: Rich <leg...@xm...> - 2002-10-24 16:54:34
|
Thinking about this a little more, I'll start over and apologize if you felt my last response was too brutal. Everyone has their up and down moments and I should probably learn to post less in my down moments... Look at the MSDN docs for BROWSEINFO, specifically the pidlRoot member: "Pointer to an ITEMIDLIST structure (PIDL) specifying the location of the root folder from which to start browsing. Only the specified folder and any subfolders that are beneath it in the namespace hierarchy will appear in the dialog box. This member can be NULL; in that case, the namespace root (the desktop folder) is used." Look in the MSDN Shell docs if you don't know what it means by PIDL or ITEMIDLIST. If you want to browse for a folder and allow the user to navigate up above pidlRoot, then I think you need to make your own dialog for that. -- Ask me about my upcoming book on Direct3D from Addison-Wesley! Direct3D Book <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net> |
From: Pascal G. <pas...@ar...> - 2002-10-24 17:17:00
|
As I stated I had read the MSDN and I saw that stuff about the root folder but as you say this is locking the browsing to folders below the root. It turns out that having a callback function might be the way to do it but I don't have time to investigate further. That was not said in a very clear like "this will set the starting browsing folder". So I am still a bit mystified. But I still think that instead of pointing the obvious (and being patronising while at it :)), a short "Check the browseinfo stuff in the MSDN" for example would have at least been helpful. But now I have other MFC problems.... Will it ever stop ??? Pascal. -----Original Message----- From: Rich [mailto:leg...@xm...] Sent: 24 October 2002 17:54 To: gam...@li... Subject: Re: [GD-Windows] Choosing a folder with a dialog Thinking about this a little more, I'll start over and apologize if you felt my last response was too brutal. Everyone has their up and down moments and I should probably learn to post less in my down moments... Look at the MSDN docs for BROWSEINFO, specifically the pidlRoot member: "Pointer to an ITEMIDLIST structure (PIDL) specifying the location of the root folder from which to start browsing. Only the specified folder and any subfolders that are beneath it in the namespace hierarchy will appear in the dialog box. This member can be NULL; in that case, the namespace root (the desktop folder) is used." Look in the MSDN Shell docs if you don't know what it means by PIDL or ITEMIDLIST. If you want to browse for a folder and allow the user to navigate up above pidlRoot, then I think you need to make your own dialog for that. -- Ask me about my upcoming book on Direct3D from Addison-Wesley! Direct3D Book <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net> |
From: Colin F. <cp...@ea...> - 2002-10-24 19:09:13
|
RE: [GD-Windows] Choosing a folder with a dialog>>> But now I have other MFC problems.... >>> Will it ever stop ??? >>> Pascal. The answer to that question might very well drive you insane! The truth is out there, but I've been told that I can't handle the truth. --- Colin cp...@ea... |