mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +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;
|
||||
TCHAR szFile[MAX_PATH + 1] = _T("");
|
||||
TCHAR szCurrentDir[MAX_PATH];
|
||||
|
||||
ZeroMemory(&OpenFileName, sizeof(OpenFileName));
|
||||
|
||||
if (!GetCurrentDirectory(ARRAYSIZE(szCurrentDir), szCurrentDir))
|
||||
{
|
||||
StringCbCopy(szCurrentDir, sizeof(szCurrentDir), _T("c:\\"));
|
||||
}
|
||||
|
||||
OpenFileName.lStructSize = sizeof(OpenFileName);
|
||||
OpenFileName.hwndOwner = hwnd;
|
||||
OpenFileName.hInstance = hInstance;
|
||||
OpenFileName.lpstrFilter = szFilter;
|
||||
OpenFileName.lpstrFile = szFile;
|
||||
OpenFileName.nMaxFile = ARRAYSIZE(szFile);
|
||||
OpenFileName.lpstrInitialDir = szCurrentDir;
|
||||
OpenFileName.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_SHAREAWARE;
|
||||
OpenFileName.lpstrDefExt = _T("\0");
|
||||
OpenFileName.nFilterIndex = dwFilterIndex;
|
||||
|
|
Loading…
Reference in a new issue