Eric Pouech : winhlp32: Correctly set the window' s title when no window information is present.

Alexandre Julliard julliard at winehq.org
Mon Jun 1 10:01:03 CDT 2009


Module: wine
Branch: master
Commit: d67df82636ac5897ba908193b76e6a0f33c9b716
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d67df82636ac5897ba908193b76e6a0f33c9b716

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Sun May 31 21:13:59 2009 +0200

winhlp32: Correctly set the window's title when no window information is present.

---

 programs/winhlp32/winhelp.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c
index 027bf65..a0177ee 100644
--- a/programs/winhlp32/winhelp.c
+++ b/programs/winhlp32/winhelp.c
@@ -274,7 +274,15 @@ HLPFILE_WINDOWINFO*     WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name)
     {
         strcpy(mwi.type, "primary");
         strcpy(mwi.name, "main");
-        LoadString(Globals.hInstance, STID_WINE_HELP, mwi.caption, sizeof(mwi.caption));
+        if (hlpfile->lpszTitle[0])
+        {
+            char        tmp[128];
+            LoadString(Globals.hInstance, STID_WINE_HELP, tmp, sizeof(tmp));
+            snprintf(mwi.caption, sizeof(mwi.caption), "%s %s - %s",
+                     hlpfile->lpszTitle, tmp, hlpfile->lpszPath);
+        }
+        else
+            LoadString(Globals.hInstance, STID_WINE_HELP, mwi.caption, sizeof(mwi.caption));
         mwi.origin.x = mwi.origin.y = mwi.size.cx = mwi.size.cy = CW_USEDEFAULT;
         mwi.style = SW_SHOW;
         mwi.win_style = WS_OVERLAPPEDWINDOW;




More information about the wine-cvs mailing list