[WINHLP32] Don't show file path in title (#6250)

Based on KRosUser's winhlp.patch. This PR will supersede #5401.
JIRA issue: CORE-18679
Just copy help file title.
This commit is contained in:
Katayama Hirofumi MZ 2023-12-29 21:16:20 +09:00 committed by GitHub
parent 9cfd8dd918
commit 40131fd1ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -274,12 +274,16 @@ HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name)
strcpy(mwi.type, "primary");
strcpy(mwi.name, "main");
if (hlpfile && hlpfile->lpszTitle[0])
#ifdef __REACTOS__
snprintf(mwi.caption, sizeof(mwi.caption), "%s", hlpfile->lpszTitle);
#else
{
char tmp[128];
LoadStringA(Globals.hInstance, STID_WINE_HELP, tmp, sizeof(tmp));
snprintf(mwi.caption, sizeof(mwi.caption), "%s %s - %s",
hlpfile->lpszTitle, tmp, hlpfile->lpszPath);
}
#endif
else
LoadStringA(Globals.hInstance, STID_WINE_HELP, mwi.caption, sizeof(mwi.caption));
mwi.origin.x = mwi.origin.y = mwi.size.cx = mwi.size.cy = CW_USEDEFAULT;