wordpad: Don't show full path in caption.

This commit is contained in:
Alexander Nicolaysen Sørnes 2007-08-22 22:44:21 +02:00 committed by Alexandre Julliard
parent 45c5b11fd6
commit 219c47338a
1 changed files with 3 additions and 0 deletions

View File

@ -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));