Commit 219c4733 authored by Alexander Nicolaysen Sørnes's avatar Alexander Nicolaysen Sørnes Committed by Alexandre Julliard

wordpad: Don't show full path in caption.

parent 45c5b11f
......@@ -155,6 +155,7 @@ static DWORD CALLBACK stream_out(DWORD_PTR cookie, LPBYTE buffer, LONG cb, LONG
return 0;
}
static LPWSTR file_basename(LPWSTR path)
{
LPWSTR pos = path + lstrlenW(path);
......@@ -182,6 +183,8 @@ static void set_caption(LPCWSTR wszNewFileName)
if(!wszNewFileName)
wszNewFileName = wszDefaultFileName;
else
wszNewFileName = file_basename((LPWSTR)wszNewFileName);
wszCaption = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
lstrlenW(wszNewFileName)*sizeof(WCHAR)+sizeof(wszSeparator)+sizeof(wszAppTitle));
......
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