This topic is now archived and is closed to further replies.

IO Fission

Getting a folder to show

Recommended Posts

IO Fission    122
I wanna make it so that when a user presses a button in my prog, a folder window pops up, like some of those cd autoplay programs, how they have a button you can press just to browse the cd, you press it and the folder comes up in a window. How do you do that? I''ve tried fiddling with WinExec and CreateProcess, trying to load explorer.exe with the folder as the arg, but it doesn''t do anything. Any ideas? Thanx IO_FissionSig();
LilBudyWizer    491
SHBrowseForFolder is one way, but it isn''t going to be running in a seperate process. I believe ShellExecute will open explorer on the directory you specify. I ran...

ShellExecute(Form1->Handle, "explore", "c:", NULL, "c:", SW_SHOW);

and it opened explorer on the c: drive.

Share this post

Link to post
Share on other sites
IO Fission    122
Sounds good, and I tried it. It does the job I want, except I want the folder to open and my program to close, but for some reason the app doesn''t exit properly. I call DestroyWindow and that seems to run fine, but when I try to run the app again I''m told (by VisC++) that it has to build the exe again. I check in the running programs (Three finger salute style), win tells me my prog is still running, but to close it it tells me that the program is not responding. This is caused by the call to ShellExecute somehow. Ideas?