I have been using the windows API call GetOpenFileNameA to allow a user to browse for a file. You can set the starting directory of the dialog by specifying lpszInitialDir in the OPENFILENAME structure.
What's the easiest way to discover the user's desktop folder so I can pass this string in? Also, am I going to get the dialog navigated to the physical folder or to the Desktop-as-top-object item? I want the latter.
Passing %systemroot% as the string does work with GetOpenFileNameA to set to "C:\WINDOWS" or whatever. Is there an equivalent %desktopdir% or whatever? I tried "C:\..\.." but that didn't work.
A week or two ago I was about to use another group of functions where you set the starting folder using a callback function and a special kind "directory ID" whose name now escapes me (almost like an hWnd for directories instead of windows). If I cannot set the default directory with the above method (which I switched to because it was simpler) can anyone point me to the names of these functions? Once I have the name I'll be set with MSDN reference and online searches.
For what it's worth I'm programming in VB6. Thank you so much!
-E
What's the easiest way to discover the user's desktop folder so I can pass this string in? Also, am I going to get the dialog navigated to the physical folder or to the Desktop-as-top-object item? I want the latter.
Passing %systemroot% as the string does work with GetOpenFileNameA to set to "C:\WINDOWS" or whatever. Is there an equivalent %desktopdir% or whatever? I tried "C:\..\.." but that didn't work.
A week or two ago I was about to use another group of functions where you set the starting folder using a callback function and a special kind "directory ID" whose name now escapes me (almost like an hWnd for directories instead of windows). If I cannot set the default directory with the above method (which I switched to because it was simpler) can anyone point me to the names of these functions? Once I have the name I'll be set with MSDN reference and online searches.
For what it's worth I'm programming in VB6. Thank you so much!
-E