mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
parent
d5a4e534ae
commit
b1519f65a7
1 changed files with 0 additions and 7 deletions
|
@ -1149,22 +1149,15 @@ OpenFileDialog(HWND hwnd, DWORD dwFilterIndex, LPTSTR lpType)
|
||||||
{
|
{
|
||||||
OPENFILENAME OpenFileName;
|
OPENFILENAME OpenFileName;
|
||||||
TCHAR szFile[MAX_PATH + 1] = _T("");
|
TCHAR szFile[MAX_PATH + 1] = _T("");
|
||||||
TCHAR szCurrentDir[MAX_PATH];
|
|
||||||
|
|
||||||
ZeroMemory(&OpenFileName, sizeof(OpenFileName));
|
ZeroMemory(&OpenFileName, sizeof(OpenFileName));
|
||||||
|
|
||||||
if (!GetCurrentDirectory(ARRAYSIZE(szCurrentDir), szCurrentDir))
|
|
||||||
{
|
|
||||||
StringCbCopy(szCurrentDir, sizeof(szCurrentDir), _T("c:\\"));
|
|
||||||
}
|
|
||||||
|
|
||||||
OpenFileName.lStructSize = sizeof(OpenFileName);
|
OpenFileName.lStructSize = sizeof(OpenFileName);
|
||||||
OpenFileName.hwndOwner = hwnd;
|
OpenFileName.hwndOwner = hwnd;
|
||||||
OpenFileName.hInstance = hInstance;
|
OpenFileName.hInstance = hInstance;
|
||||||
OpenFileName.lpstrFilter = szFilter;
|
OpenFileName.lpstrFilter = szFilter;
|
||||||
OpenFileName.lpstrFile = szFile;
|
OpenFileName.lpstrFile = szFile;
|
||||||
OpenFileName.nMaxFile = ARRAYSIZE(szFile);
|
OpenFileName.nMaxFile = ARRAYSIZE(szFile);
|
||||||
OpenFileName.lpstrInitialDir = szCurrentDir;
|
|
||||||
OpenFileName.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_SHAREAWARE;
|
OpenFileName.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_SHAREAWARE;
|
||||||
OpenFileName.lpstrDefExt = _T("\0");
|
OpenFileName.lpstrDefExt = _T("\0");
|
||||||
OpenFileName.nFilterIndex = dwFilterIndex;
|
OpenFileName.nFilterIndex = dwFilterIndex;
|
||||||
|
|
Loading…
Reference in a new issue