mirror of
https://github.com/reactos/wine.git
synced 2025-02-23 14:24:13 +00:00
wordpad: Store file name globally.
This commit is contained in:
parent
e173504ccd
commit
d072e8b1a9
@ -114,6 +114,8 @@ static DWORD CALLBACK stream_in(DWORD_PTR cookie, LPBYTE buffer, LONG cb, LONG *
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WCHAR wszFileName[MAX_PATH];
|
||||||
|
|
||||||
static void set_caption(LPCWSTR wszNewFileName)
|
static void set_caption(LPCWSTR wszNewFileName)
|
||||||
{
|
{
|
||||||
static const WCHAR wszSeparator[] = {' ','-',' ','\0'};
|
static const WCHAR wszSeparator[] = {' ','-',' ','\0'};
|
||||||
@ -180,6 +182,8 @@ static void DoOpenFile(LPCWSTR szOpenFileName)
|
|||||||
SetFocus(hEditorWnd);
|
SetFocus(hEditorWnd);
|
||||||
|
|
||||||
set_caption(szOpenFileName);
|
set_caption(szOpenFileName);
|
||||||
|
|
||||||
|
lstrcpyW(wszFileName, szOpenFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DialogOpenFile(void)
|
static void DialogOpenFile(void)
|
||||||
@ -442,6 +446,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
case ID_FILE_NEW:
|
case ID_FILE_NEW:
|
||||||
SetWindowTextA(hwndEditor, "");
|
SetWindowTextA(hwndEditor, "");
|
||||||
set_caption(NULL);
|
set_caption(NULL);
|
||||||
|
wszFileName[0] = '\0';
|
||||||
/* FIXME: set default format too */
|
/* FIXME: set default format too */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user