From 189800e04c43c623f8a9d4d1228e514b95b3efff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Wed, 28 Mar 2012 21:06:05 +0200 Subject: [PATCH] view: Also show the filename in the window title when loading it from command line. --- programs/view/view.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/programs/view/view.c b/programs/view/view.c index ebd48aae335..d32a10b8f12 100644 --- a/programs/view/view.c +++ b/programs/view/view.c @@ -386,7 +386,10 @@ static void HandleCommandLine(LPWSTR cmdline) cmdline++; cmdline[lstrlenW(cmdline) - 1] = 0; } + szFileTitle[0] = 0; + GetFileTitleW(cmdline, szFileTitle, sizeof(szFileTitle)); DoOpenFile(cmdline); + UpdateWindowCaption(); } }