Commit 52bd50fb authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

For unicode: give the selected filename back.

parent b822b841
...@@ -329,6 +329,7 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) ...@@ -329,6 +329,7 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType)
HINSTANCE hInstance; HINSTANCE hInstance;
LPCSTR lpstrFilter = NULL; LPCSTR lpstrFilter = NULL;
LPSTR lpstrCustomFilter = NULL; LPSTR lpstrCustomFilter = NULL;
LPWSTR lpstrFile = NULL;
DWORD dwFlags; DWORD dwFlags;
/* Initialise FileOpenDlgInfos structure*/ /* Initialise FileOpenDlgInfos structure*/
...@@ -399,6 +400,10 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) ...@@ -399,6 +400,10 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType)
/* Initialise the dialog property */ /* Initialise the dialog property */
fodInfos->DlgInfos.dwDlgProp = 0; fodInfos->DlgInfos.dwDlgProp = 0;
/* allocate ansi filename buffer */
lpstrFile = ofn->lpstrFile;
ofn->lpstrFile = MemAlloc(ofn->nMaxFile);
switch(iDlgType) switch(iDlgType)
{ {
case OPEN_DIALOG : case OPEN_DIALOG :
...@@ -431,6 +436,12 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) ...@@ -431,6 +436,12 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType)
/* Restore hInstance */ /* Restore hInstance */
fodInfos->ofnInfos->hInstance = hInstance; fodInfos->ofnInfos->hInstance = hInstance;
MemFree((LPVOID)(fodInfos)); MemFree((LPVOID)(fodInfos));
/* filename */
lstrcpynAtoW(lpstrFile, (LPCSTR)ofn->lpstrFile, ofn->nMaxFile);
MemFree(ofn->lpstrFile);
ofn->lpstrFile = lpstrFile;
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment