Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4f2819f2
Commit
4f2819f2
authored
Nov 06, 2006
by
Kirill K. Smirnov
Committed by
Alexandre Julliard
Nov 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Rewrite LookupHelpFile function.
Add ability for user to find file himself if winhelp cannot find it. Update resources.
parent
7dd0eaa9
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
94 additions
and
61 deletions
+94
-61
Bg.rc
programs/winhelp/Bg.rc
+1
-0
Cs.rc
programs/winhelp/Cs.rc
+1
-0
Da.rc
programs/winhelp/Da.rc
+1
-0
De.rc
programs/winhelp/De.rc
+1
-0
En.rc
programs/winhelp/En.rc
+1
-0
Eo.rc
programs/winhelp/Eo.rc
+1
-0
Es.rc
programs/winhelp/Es.rc
+1
-0
Fi.rc
programs/winhelp/Fi.rc
+1
-0
Fr.rc
programs/winhelp/Fr.rc
+1
-0
Hu.rc
programs/winhelp/Hu.rc
+1
-0
It.rc
programs/winhelp/It.rc
+1
-0
Ko.rc
programs/winhelp/Ko.rc
+1
-0
Nl.rc
programs/winhelp/Nl.rc
+1
-0
No.rc
programs/winhelp/No.rc
+1
-0
Pl.rc
programs/winhelp/Pl.rc
+1
-0
Pt.rc
programs/winhelp/Pt.rc
+2
-0
Ru.rc
programs/winhelp/Ru.rc
+1
-0
Si.rc
programs/winhelp/Si.rc
+1
-0
Sk.rc
programs/winhelp/Sk.rc
+1
-0
Sw.rc
programs/winhelp/Sw.rc
+1
-0
Tr.rc
programs/winhelp/Tr.rc
+1
-0
Va.rc
programs/winhelp/Va.rc
+1
-0
Wa.rc
programs/winhelp/Wa.rc
+1
-0
Zh.rc
programs/winhelp/Zh.rc
+1
-0
macro.c
programs/winhelp/macro.c
+3
-44
winhelp.c
programs/winhelp/winhelp.c
+64
-16
winhelp.h
programs/winhelp/winhelp.h
+1
-1
winhelp_res.h
programs/winhelp/winhelp_res.h
+1
-0
No files found.
programs/winhelp/Bg.rc
View file @
4f2819f2
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&"
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&"
STID_TOPICS, "&"
STID_TOPICS, "&"
STID_ALL_FILES, " (*.*)"
STID_ALL_FILES, " (*.*)"
STID_HELP_FILES_HLP, " (*.hlp)"
STID_HELP_FILES_HLP, " (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Cs.rc
View file @
4f2819f2
...
@@ -70,4 +70,5 @@ STID_HISTORY, "&Historie"
...
@@ -70,4 +70,5 @@ STID_HISTORY, "&Historie"
STID_TOPICS, "&Tmata"
STID_TOPICS, "&Tmata"
STID_ALL_FILES, "Vechny soubory (*.*)"
STID_ALL_FILES, "Vechny soubory (*.*)"
STID_HELP_FILES_HLP, "Soubory npovdy (*.hlp)"
STID_HELP_FILES_HLP, "Soubory npovdy (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Da.rc
View file @
4f2819f2
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Oversigt"
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Oversigt"
STID_TOPICS, "To&pics"
STID_TOPICS, "To&pics"
STID_ALL_FILES, "Alle filer (*.*)"
STID_ALL_FILES, "Alle filer (*.*)"
STID_HELP_FILES_HLP, "Hjlpe filer (*.hlp)"
STID_HELP_FILES_HLP, "Hjlpe filer (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/De.rc
View file @
4f2819f2
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Bisher"
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Bisher"
STID_TOPICS, "&Topics"
STID_TOPICS, "&Topics"
STID_ALL_FILES, "Alle Dateien (*.*)"
STID_ALL_FILES, "Alle Dateien (*.*)"
STID_HELP_FILES_HLP, "Hilfe-Dateien (*.hlp)"
STID_HELP_FILES_HLP, "Hilfe-Dateien (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/En.rc
View file @
4f2819f2
...
@@ -66,4 +66,5 @@ STID_HISTORY, "&History"
...
@@ -66,4 +66,5 @@ STID_HISTORY, "&History"
STID_TOPICS, "&Topics"
STID_TOPICS, "&Topics"
STID_ALL_FILES, "All files (*.*)"
STID_ALL_FILES, "All files (*.*)"
STID_HELP_FILES_HLP, "Help files (*.hlp)"
STID_HELP_FILES_HLP, "Help files (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Eo.rc
View file @
4f2819f2
...
@@ -68,4 +68,5 @@ STID_HISTORY, "Krono&logio"
...
@@ -68,4 +68,5 @@ STID_HISTORY, "Krono&logio"
STID_TOPICS, "&Temoj"
STID_TOPICS, "&Temoj"
STID_ALL_FILES, "Tutaj dosieroj (*.*)"
STID_ALL_FILES, "Tutaj dosieroj (*.*)"
STID_HELP_FILES_HLP, "Helpaj dosieroj (*.hlp)"
STID_HELP_FILES_HLP, "Helpaj dosieroj (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Es.rc
View file @
4f2819f2
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Historial"
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Historial"
STID_TOPICS, "&Temas"
STID_TOPICS, "&Temas"
STID_ALL_FILES, "Todos los archivos (*.*)"
STID_ALL_FILES, "Todos los archivos (*.*)"
STID_HELP_FILES_HLP, "Archivos de ayuda (*.hlp)"
STID_HELP_FILES_HLP, "Archivos de ayuda (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Fi.rc
View file @
4f2819f2
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Luetut"
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Luetut"
STID_TOPICS, "T&opics"
STID_TOPICS, "T&opics"
STID_ALL_FILES, "Kaikki tiedostot (*.*)"
STID_ALL_FILES, "Kaikki tiedostot (*.*)"
STID_HELP_FILES_HLP, "Ohjetiedostot (*.hlp)"
STID_HELP_FILES_HLP, "Ohjetiedostot (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Fr.rc
View file @
4f2819f2
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Historique"
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Historique"
STID_TOPICS, "&Sujets"
STID_TOPICS, "&Sujets"
STID_ALL_FILES, "Tous fichiers (*.*)"
STID_ALL_FILES, "Tous fichiers (*.*)"
STID_HELP_FILES_HLP, "Fichiers d'aide (*.hlp)"
STID_HELP_FILES_HLP, "Fichiers d'aide (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Hu.rc
View file @
4f2819f2
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Elzmny"
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&Elzmny"
STID_TOPICS, "&Tmakrk"
STID_TOPICS, "&Tmakrk"
STID_ALL_FILES, "Minden fjl (*.*)"
STID_ALL_FILES, "Minden fjl (*.*)"
STID_HELP_FILES_HLP, "Sg fjlok (*.hlp)"
STID_HELP_FILES_HLP, "Sg fjlok (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/It.rc
View file @
4f2819f2
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Cronologia"
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Cronologia"
STID_TOPICS, "&Argomenti"
STID_TOPICS, "&Argomenti"
STID_ALL_FILES, "Tutti i file (*.*)"
STID_ALL_FILES, "Tutti i file (*.*)"
STID_HELP_FILES_HLP, "File della Guida (*.hlp)"
STID_HELP_FILES_HLP, "File della Guida (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Ko.rc
View file @
4f2819f2
...
@@ -67,4 +67,5 @@ STID_HISTORY, "히스토리(&H)"
...
@@ -67,4 +67,5 @@ STID_HISTORY, "히스토리(&H)"
STID_TOPICS, "&Topics"
STID_TOPICS, "&Topics"
STID_ALL_FILES, "모든 파일 (*.*)"
STID_ALL_FILES, "모든 파일 (*.*)"
STID_HELP_FILES_HLP, "도움말 파일 (*.hlp)"
STID_HELP_FILES_HLP, "도움말 파일 (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Nl.rc
View file @
4f2819f2
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&Geschiedenis"
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&Geschiedenis"
STID_TOPICS, "&Onderwerpen"
STID_TOPICS, "&Onderwerpen"
STID_ALL_FILES, "Alle bestanden (*.*)"
STID_ALL_FILES, "Alle bestanden (*.*)"
STID_HELP_FILES_HLP, "Helpbestanden (*.hlp)"
STID_HELP_FILES_HLP, "Helpbestanden (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/No.rc
View file @
4f2819f2
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&Historikk"
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&Historikk"
STID_TOPICS, "&Emner"
STID_TOPICS, "&Emner"
STID_ALL_FILES, "Alle filer (*.*)"
STID_ALL_FILES, "Alle filer (*.*)"
STID_HELP_FILES_HLP, "Hjelp-filer (*.hlp)"
STID_HELP_FILES_HLP, "Hjelp-filer (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Pl.rc
View file @
4f2819f2
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Historia"
...
@@ -67,4 +67,5 @@ STID_HISTORY, "&Historia"
STID_TOPICS, "&Tematy"
STID_TOPICS, "&Tematy"
STID_ALL_FILES, "Wszystkie pliki (*.*)"
STID_ALL_FILES, "Wszystkie pliki (*.*)"
STID_HELP_FILES_HLP, "Pliki pomocy (*.hlp)"
STID_HELP_FILES_HLP, "Pliki pomocy (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Pt.rc
View file @
4f2819f2
...
@@ -106,6 +106,7 @@ STID_HISTORY, "&Histrico"
...
@@ -106,6 +106,7 @@ STID_HISTORY, "&Histrico"
STID_TOPICS, "&Tpicos"
STID_TOPICS, "&Tpicos"
STID_ALL_FILES, "Todos os arquivos (*.*)"
STID_ALL_FILES, "Todos os arquivos (*.*)"
STID_HELP_FILES_HLP, "Arquivos de ajuda (*.hlp)"
STID_HELP_FILES_HLP, "Arquivos de ajuda (*.hlp)"
STID_FILE_NOT_FOUND_s"Cannot find '%s'. Do you want to find this file yourself?"
}
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
...
@@ -125,4 +126,5 @@ STID_HISTORY, "&Histrico"
...
@@ -125,4 +126,5 @@ STID_HISTORY, "&Histrico"
STID_TOPICS, "&Tpicos"
STID_TOPICS, "&Tpicos"
STID_ALL_FILES, "Todos os ficheiros (*.*)"
STID_ALL_FILES, "Todos os ficheiros (*.*)"
STID_HELP_FILES_HLP, "Ficheiros de ajuda (*.hlp)"
STID_HELP_FILES_HLP, "Ficheiros de ajuda (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Ru.rc
View file @
4f2819f2
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&"
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&"
STID_TOPICS, "&"
STID_TOPICS, "&"
STID_ALL_FILES, " (*.*)"
STID_ALL_FILES, " (*.*)"
STID_HELP_FILES_HLP, " (*.hlp)"
STID_HELP_FILES_HLP, " (*.hlp)"
STID_FILE_NOT_FOUND_s " '%s'. ?"
}
}
programs/winhelp/Si.rc
View file @
4f2819f2
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&Zgodovina"
...
@@ -65,4 +65,5 @@ STID_HISTORY, "&Zgodovina"
STID_TOPICS, "&Vsebina"
STID_TOPICS, "&Vsebina"
STID_ALL_FILES, "Vse datiteke (*.*)"
STID_ALL_FILES, "Vse datiteke (*.*)"
STID_HELP_FILES_HLP, "Datoteke s pomojo (*.hlp)"
STID_HELP_FILES_HLP, "Datoteke s pomojo (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Sk.rc
View file @
4f2819f2
...
@@ -62,4 +62,5 @@ STID_HISTORY, "&Histria"
...
@@ -62,4 +62,5 @@ STID_HISTORY, "&Histria"
STID_TOPICS, "&Topics"
STID_TOPICS, "&Topics"
STID_ALL_FILES, "Vetky sbory (*.*)"
STID_ALL_FILES, "Vetky sbory (*.*)"
STID_HELP_FILES_HLP, "Sbory pomoci (*.hlp)"
STID_HELP_FILES_HLP, "Sbory pomoci (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Sw.rc
View file @
4f2819f2
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&versikt"
...
@@ -68,4 +68,5 @@ STID_HISTORY, "&versikt"
STID_TOPICS, "T&opics"
STID_TOPICS, "T&opics"
STID_ALL_FILES, "Alla filer (*.*))"
STID_ALL_FILES, "Alla filer (*.*))"
STID_HELP_FILES_HLP, "Hjlp filer (*.hlp)"
STID_HELP_FILES_HLP, "Hjlp filer (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Tr.rc
View file @
4f2819f2
...
@@ -65,4 +65,5 @@ STID_HISTORY, "Ge&mi"
...
@@ -65,4 +65,5 @@ STID_HISTORY, "Ge&mi"
STID_TOPICS, "&Konular"
STID_TOPICS, "&Konular"
STID_ALL_FILES, "Tm dosyalar (*.*)"
STID_ALL_FILES, "Tm dosyalar (*.*)"
STID_HELP_FILES_HLP, "Yardm dosyalar (*.hlp)"
STID_HELP_FILES_HLP, "Yardm dosyalar (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Va.rc
View file @
4f2819f2
...
@@ -72,4 +72,5 @@ HISTORY, "&Fin qua"
...
@@ -72,4 +72,5 @@ HISTORY, "&Fin qua"
TOPICS, "T&opics"
TOPICS, "T&opics"
ALL_FILES, "Tuot las datotecas (*.*)"
ALL_FILES, "Tuot las datotecas (*.*)"
HELP_FILES_HLP, "Datotecas d'agd (*.hlp)"
HELP_FILES_HLP, "Datotecas d'agd (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/Wa.rc
View file @
4f2819f2
...
@@ -70,6 +70,7 @@ STID_HISTORY, "&Istwere"
...
@@ -70,6 +70,7 @@ STID_HISTORY, "&Istwere"
STID_TOPICS, "&Topics"
STID_TOPICS, "&Topics"
STID_ALL_FILES, "Tos les fitchs (*.*)"
STID_ALL_FILES, "Tos les fitchs (*.*)"
STID_HELP_FILES_HLP, "Fitchs d' aide (*.hlp)"
STID_HELP_FILES_HLP, "Fitchs d' aide (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
#endif /* LANG_WALON */
#endif /* LANG_WALON */
programs/winhelp/Zh.rc
View file @
4f2819f2
...
@@ -66,4 +66,5 @@ STID_HISTORY, "历史(&H)"
...
@@ -66,4 +66,5 @@ STID_HISTORY, "历史(&H)"
STID_TOPICS, "主题(&T)"
STID_TOPICS, "主题(&T)"
STID_ALL_FILES, "所有文件 (*.*)"
STID_ALL_FILES, "所有文件 (*.*)"
STID_HELP_FILES_HLP, "帮助文件 (*.hlp)"
STID_HELP_FILES_HLP, "帮助文件 (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
}
}
programs/winhelp/macro.c
View file @
4f2819f2
...
@@ -505,52 +505,11 @@ BOOL CALLBACK MACRO_FileExist(LPCSTR str)
...
@@ -505,52 +505,11 @@ BOOL CALLBACK MACRO_FileExist(LPCSTR str)
void
CALLBACK
MACRO_FileOpen
(
void
)
void
CALLBACK
MACRO_FileOpen
(
void
)
{
{
OPENFILENAME
openfilename
;
char
szFile
[
MAX_PATH
];
CHAR
szPath
[
MAX_PATHNAME_LEN
];
CHAR
szDir
[
MAX_PATHNAME_LEN
];
CHAR
szzFilter
[
2
*
MAX_STRING_LEN
+
100
];
LPSTR
p
=
szzFilter
;
WINE_TRACE
(
"()
\n
"
);
if
(
WINHELP_GetOpenFileName
(
szFile
,
MAX_PATH
))
LoadString
(
Globals
.
hInstance
,
STID_HELP_FILES_HLP
,
p
,
MAX_STRING_LEN
);
p
+=
strlen
(
p
)
+
1
;
lstrcpy
(
p
,
"*.hlp"
);
p
+=
strlen
(
p
)
+
1
;
LoadString
(
Globals
.
hInstance
,
STID_ALL_FILES
,
p
,
MAX_STRING_LEN
);
p
+=
strlen
(
p
)
+
1
;
lstrcpy
(
p
,
"*.*"
);
p
+=
strlen
(
p
)
+
1
;
*
p
=
'\0'
;
GetCurrentDirectory
(
sizeof
(
szDir
),
szDir
);
szPath
[
0
]
=
'\0'
;
openfilename
.
lStructSize
=
sizeof
(
OPENFILENAME
);
openfilename
.
hwndOwner
=
Globals
.
active_win
->
hMainWnd
;
openfilename
.
hInstance
=
Globals
.
hInstance
;
openfilename
.
lpstrFilter
=
szzFilter
;
openfilename
.
lpstrCustomFilter
=
0
;
openfilename
.
nMaxCustFilter
=
0
;
openfilename
.
nFilterIndex
=
1
;
openfilename
.
lpstrFile
=
szPath
;
openfilename
.
nMaxFile
=
sizeof
(
szPath
);
openfilename
.
lpstrFileTitle
=
0
;
openfilename
.
nMaxFileTitle
=
0
;
openfilename
.
lpstrInitialDir
=
szDir
;
openfilename
.
lpstrTitle
=
0
;
openfilename
.
Flags
=
0
;
openfilename
.
nFileOffset
=
0
;
openfilename
.
nFileExtension
=
0
;
openfilename
.
lpstrDefExt
=
0
;
openfilename
.
lCustData
=
0
;
openfilename
.
lpfnHook
=
0
;
openfilename
.
lpTemplateName
=
0
;
if
(
GetOpenFileName
(
&
openfilename
))
{
{
HLPFILE
*
hlpfile
=
WINHELP_LookupHelpFile
(
sz
Path
);
HLPFILE
*
hlpfile
=
WINHELP_LookupHelpFile
(
sz
File
);
WINHELP_CreateHelpWindowByHash
(
hlpfile
,
0
,
WINHELP_CreateHelpWindowByHash
(
hlpfile
,
0
,
WINHELP_GetWindowInfo
(
hlpfile
,
"main"
),
SW_SHOWNORMAL
);
WINHELP_GetWindowInfo
(
hlpfile
,
"main"
),
SW_SHOWNORMAL
);
...
...
programs/winhelp/winhelp.c
View file @
4f2819f2
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "winbase.h"
#include "winbase.h"
#include "wingdi.h"
#include "wingdi.h"
#include "winuser.h"
#include "winuser.h"
#include "commdlg.h"
#include "winhelp.h"
#include "winhelp.h"
#include "winhelp_res.h"
#include "winhelp_res.h"
#include "shellapi.h"
#include "shellapi.h"
...
@@ -56,6 +57,58 @@ static WINHELP_LINE_PART* WINHELP_IsOverLink(WINHELP_WINDOW*, WPARAM, LPARAM);
...
@@ -56,6 +57,58 @@ static WINHELP_LINE_PART* WINHELP_IsOverLink(WINHELP_WINDOW*, WPARAM, LPARAM);
WINHELP_GLOBALS
Globals
=
{
3
,
NULL
,
NULL
,
0
,
TRUE
,
NULL
,
NULL
,
NULL
,
NULL
};
WINHELP_GLOBALS
Globals
=
{
3
,
NULL
,
NULL
,
0
,
TRUE
,
NULL
,
NULL
,
NULL
,
NULL
};
/***********************************************************************
*
* WINHELP_GetOpenFileName
*/
BOOL
WINHELP_GetOpenFileName
(
LPSTR
lpszFile
,
int
len
)
{
OPENFILENAME
openfilename
;
CHAR
szDir
[
MAX_PATH
];
CHAR
szzFilter
[
2
*
MAX_STRING_LEN
+
100
];
LPSTR
p
=
szzFilter
;
WINE_TRACE
(
"()
\n
"
);
LoadString
(
Globals
.
hInstance
,
STID_HELP_FILES_HLP
,
p
,
MAX_STRING_LEN
);
p
+=
strlen
(
p
)
+
1
;
lstrcpy
(
p
,
"*.hlp"
);
p
+=
strlen
(
p
)
+
1
;
LoadString
(
Globals
.
hInstance
,
STID_ALL_FILES
,
p
,
MAX_STRING_LEN
);
p
+=
strlen
(
p
)
+
1
;
lstrcpy
(
p
,
"*.*"
);
p
+=
strlen
(
p
)
+
1
;
*
p
=
'\0'
;
GetCurrentDirectory
(
sizeof
(
szDir
),
szDir
);
lpszFile
[
0
]
=
'\0'
;
openfilename
.
lStructSize
=
sizeof
(
OPENFILENAME
);
openfilename
.
hwndOwner
=
NULL
;
openfilename
.
hInstance
=
Globals
.
hInstance
;
openfilename
.
lpstrFilter
=
szzFilter
;
openfilename
.
lpstrCustomFilter
=
0
;
openfilename
.
nMaxCustFilter
=
0
;
openfilename
.
nFilterIndex
=
1
;
openfilename
.
lpstrFile
=
lpszFile
;
openfilename
.
nMaxFile
=
len
;
openfilename
.
lpstrFileTitle
=
0
;
openfilename
.
nMaxFileTitle
=
0
;
openfilename
.
lpstrInitialDir
=
szDir
;
openfilename
.
lpstrTitle
=
0
;
openfilename
.
Flags
=
0
;
openfilename
.
nFileOffset
=
0
;
openfilename
.
nFileExtension
=
0
;
openfilename
.
lpstrDefExt
=
0
;
openfilename
.
lCustData
=
0
;
openfilename
.
lpfnHook
=
0
;
openfilename
.
lpTemplateName
=
0
;
return
GetOpenFileName
(
&
openfilename
);
}
/***********************************************************************
/***********************************************************************
*
*
* WINHELP_LookupHelpFile
* WINHELP_LookupHelpFile
...
@@ -63,25 +116,20 @@ WINHELP_GLOBALS Globals = {3, NULL, NULL, 0, TRUE, NULL, NULL, NULL, NULL};
...
@@ -63,25 +116,20 @@ WINHELP_GLOBALS Globals = {3, NULL, NULL, 0, TRUE, NULL, NULL, NULL, NULL};
HLPFILE
*
WINHELP_LookupHelpFile
(
LPCSTR
lpszFile
)
HLPFILE
*
WINHELP_LookupHelpFile
(
LPCSTR
lpszFile
)
{
{
HLPFILE
*
hlpfile
;
HLPFILE
*
hlpfile
;
char
szFullName
[
MAX_PATH
];
hlpfile
=
HLPFILE_ReadHlpFile
(
lpszFile
);
if
(
!
SearchPath
(
NULL
,
lpszFile
,
".hlp"
,
MAX_PATH
,
szFullName
,
NULL
))
/* Add Suffix `.hlp' */
if
(
!
hlpfile
&&
lstrcmpi
(
lpszFile
+
strlen
(
lpszFile
)
-
4
,
".hlp"
)
!=
0
)
{
{
char
szFile_hlp
[
MAX_PATHNAME_LEN
];
if
(
WINHELP_MessageBoxIDS_s
(
STID_FILE_NOT_FOUND_s
,
lpszFile
,
STID_WHERROR
,
MB_YESNO
|
MB_ICONQUESTION
)
!=
IDYES
)
lstrcpyn
(
szFile_hlp
,
lpszFile
,
sizeof
(
szFile_hlp
)
-
4
);
return
NULL
;
szFile_hlp
[
sizeof
(
szFile_hlp
)
-
5
]
=
'\0'
;
if
(
!
WINHELP_GetOpenFileName
(
szFullName
,
MAX_PATH
))
lstrcat
(
szFile_hlp
,
".hlp"
);
return
NULL
;
hlpfile
=
HLPFILE_ReadHlpFile
(
szFile_hlp
);
}
}
hlpfile
=
HLPFILE_ReadHlpFile
(
szFullName
);
if
(
!
hlpfile
)
if
(
!
hlpfile
)
{
WINHELP_MessageBoxIDS_s
(
STID_HLPFILE_ERROR_s
,
lpszFile
,
WINHELP_MessageBoxIDS_s
(
STID_HLPFILE_ERROR_s
,
lpszFile
,
STID_WHERROR
,
MB_OK
);
STID_WHERROR
,
MB_OK
|
MB_ICONSTOP
);
if
(
Globals
.
win_list
)
return
NULL
;
}
return
hlpfile
;
return
hlpfile
;
}
}
...
@@ -1815,7 +1863,7 @@ INT WINHELP_MessageBoxIDS_s(UINT ids_text, LPCSTR str, UINT ids_title, WORD type
...
@@ -1815,7 +1863,7 @@ INT WINHELP_MessageBoxIDS_s(UINT ids_text, LPCSTR str, UINT ids_title, WORD type
{
{
CHAR
text
[
MAX_STRING_LEN
];
CHAR
text
[
MAX_STRING_LEN
];
CHAR
title
[
MAX_STRING_LEN
];
CHAR
title
[
MAX_STRING_LEN
];
CHAR
newtext
[
MAX_STRING_LEN
+
MAX_PATH
NAME_LEN
];
CHAR
newtext
[
MAX_STRING_LEN
+
MAX_PATH
];
LoadString
(
Globals
.
hInstance
,
ids_text
,
text
,
sizeof
(
text
));
LoadString
(
Globals
.
hInstance
,
ids_text
,
text
,
sizeof
(
text
));
LoadString
(
Globals
.
hInstance
,
ids_title
,
title
,
sizeof
(
title
));
LoadString
(
Globals
.
hInstance
,
ids_title
,
title
,
sizeof
(
title
));
...
...
programs/winhelp/winhelp.h
View file @
4f2819f2
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
*/
*/
#define MAX_LANGUAGE_NUMBER 255
#define MAX_LANGUAGE_NUMBER 255
#define MAX_PATHNAME_LEN 1024
#define MAX_STRING_LEN 255
#define MAX_STRING_LEN 255
#define INTERNAL_BORDER_WIDTH 5
#define INTERNAL_BORDER_WIDTH 5
...
@@ -174,6 +173,7 @@ extern FARPROC Callbacks[];
...
@@ -174,6 +173,7 @@ extern FARPROC Callbacks[];
BOOL
WINHELP_CreateHelpWindowByHash
(
HLPFILE
*
,
LONG
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindowByHash
(
HLPFILE
*
,
LONG
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindowByMap
(
HLPFILE
*
,
LONG
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindowByMap
(
HLPFILE
*
,
LONG
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindow
(
HLPFILE_PAGE
*
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindow
(
HLPFILE_PAGE
*
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_GetOpenFileName
(
LPSTR
,
int
);
INT
WINHELP_MessageBoxIDS
(
UINT
,
UINT
,
WORD
);
INT
WINHELP_MessageBoxIDS
(
UINT
,
UINT
,
WORD
);
INT
WINHELP_MessageBoxIDS_s
(
UINT
,
LPCSTR
,
UINT
,
WORD
);
INT
WINHELP_MessageBoxIDS_s
(
UINT
,
LPCSTR
,
UINT
,
WORD
);
HLPFILE
*
WINHELP_LookupHelpFile
(
LPCSTR
lpszFile
);
HLPFILE
*
WINHELP_LookupHelpFile
(
LPCSTR
lpszFile
);
...
...
programs/winhelp/winhelp_res.h
View file @
4f2819f2
...
@@ -29,3 +29,4 @@
...
@@ -29,3 +29,4 @@
#define STID_ALL_FILES 0x12B
#define STID_ALL_FILES 0x12B
#define STID_HELP_FILES_HLP 0x12C
#define STID_HELP_FILES_HLP 0x12C
#define STID_DIALOG_TEST 0x12D
#define STID_DIALOG_TEST 0x12D
#define STID_FILE_NOT_FOUND_s 0x12E
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment