|
-
March 29th, 1999, 02:31 PM
#1
Re: CFileDialog - beginning in non-filesystem location
Michael,
To start in the Desktop directory, call ::SHGetSpecialFolderPath to get the desktop folder and set it as the initial
folder in the file dialog. Like this:
TCHAR szPath[MAX_PATH];
HRESULT hRes = ::SHGetSpecialFolderPath(NULL, szPath, CSIDL_DESKTOPDIRECTORY, FALSE);
if (SUCCEEDED(hRes))
{
CFileDialog dlg(TRUE);
dlg.m_ofn.lpstrInitialDir = szPath;
dlg.DoModal();
}
This should work. I haven't tryed it yet. It's probably possible to use SHGetSpecialFolderPath to get the Network
Neighborhood directory too.
Joseph
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|