Any clues?
Craig
chenders...@synertec.co.uk
remove _NOSPAM from email
If the "lpstrFile" member contains a string that specifies a valid path, the
common
dialog box procedure will use the path specified by "lpstrFile" instead of
the path
specified by the string to which lpstrInitialDir points.
Regards,
Sivakumar Velusamy
"Craig Henderson" <chenders...@synertec.co.uk> wrote in message
news:945773089.630.0....@news.demon.co.uk...
The m_ofn structure is
typedef struct tagOFN {
DWORD lStructSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCTSTR lpstrFilter;
LPTSTR lpstrCustomFilter;
DWORD nMaxCustFilter;
DWORD nFilterIndex;
LPTSTR lpstrFile;
DWORD nMaxFile;
LPTSTR lpstrFileTitle;
DWORD nMaxFileTitle;
LPCTSTR lpstrInitialDir;
LPCTSTR lpstrTitle;
DWORD Flags;
WORD nFileOffset;
WORD nFileExtension;
LPCTSTR lpstrDefExt;
DWORD lCustData;
LPOFNHOOKPROC lpfnHook;
LPCTSTR lpTemplateName;
#if (_WIN32_WINNT >= 0x0500)
void * pvReserved;
DWORD dwReserved;
DWORD FlagsEx;
#endif // (_WIN32_WINNT >= 0x0500)
} OPENFILENAME;
Craig Henderson <chenders...@synertec.co.uk> schrieb in im
Newsbeitrag: 945773089.630.0....@news.demon.co.uk...
"careca" <ko...@ti-nov3.fbe.fh-weingarten.de> wrote in message
news:83ptof$b4k$1...@kilbeggan.xlink.net...
"Charles Bisbee" <prin...@home.com> wrote in message
news:ECE078D19685D3119E980008C7F9E55D3FD2C9@CPECMAILE01...
>> Try
>> CFileDialog fileopendlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, NULL);
>> fileopendlg.m_ofn.lpstrInitialDir = "C:\\Temp";
>>
>Tries that, no luck ;(
>
Make sure you set the start directory after the dialogue is constructed but before it is displayed.
void CMyClass::OpenDocument(void)
{
CString strFilename;
CFileDialog dlg(TRUE, NULL, NULL,
OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY |
OFN_SHAREAWARE,
_TEXT("All Files (*.*)|*.*|"),
this);
dlg.m_ofn.lpstrInitialDir = "C:\\Temp";
::SetCurrentDirectory(dlg.m_ofn.lpstrInitialDir);
if (dlg.DoModal() != IDOK)
return;
}
Cheers,
Craig
chenders...@synertec.co.uk
remove _NOSPAM from email
"Scot T Brennecke" <mar...@airmail.net> wrote in message
news:386342A3...@airmail.net...