Commit cf2de8c0 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winhelp: Added as an option, to use richedit to render the text window.

parent d3051cba
...@@ -66,4 +66,5 @@ STID_TOPICS, "&" ...@@ -66,4 +66,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -71,4 +71,5 @@ STID_TOPICS, "&Tmata" ...@@ -71,4 +71,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -69,4 +69,5 @@ STID_TOPICS, "To&pics" ...@@ -69,4 +69,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -78,4 +78,5 @@ STID_TOPICS, "&Themen" ...@@ -78,4 +78,5 @@ STID_TOPICS, "&Themen"
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 "'%s' konnte nicht gefunden werden. Wollen Sie selber nach dieser Datei suchen?" STID_FILE_NOT_FOUND_s "'%s' konnte nicht gefunden werden. Wollen Sie selber nach dieser Datei suchen?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -77,4 +77,5 @@ STID_TOPICS, "&Topics" ...@@ -77,4 +77,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -69,4 +69,5 @@ STID_TOPICS, "&Temoj" ...@@ -69,4 +69,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -68,4 +68,5 @@ STID_TOPICS, "&Temas" ...@@ -68,4 +68,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -69,4 +69,5 @@ STID_TOPICS, "T&opics" ...@@ -69,4 +69,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -80,4 +80,5 @@ STID_TOPICS, "&Sujets" ...@@ -80,4 +80,5 @@ 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 "Impossible de trouver %s. Souhaitez-vous rechercher ce fichier vous-mme?" STID_FILE_NOT_FOUND_s "Impossible de trouver %s. Souhaitez-vous rechercher ce fichier vous-mme?"
STID_NO_RICHEDIT "La bibliothque RichEdit n'a pu tre localise... Abandon"
} }
...@@ -69,4 +69,5 @@ STID_TOPICS, "&Tmakrk" ...@@ -69,4 +69,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -68,4 +68,5 @@ STID_TOPICS, "&Argomenti" ...@@ -68,4 +68,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -80,4 +80,5 @@ STID_TOPICS, "목차(&T)" ...@@ -80,4 +80,5 @@ STID_TOPICS, "목차(&T)"
STID_ALL_FILES, "모든 파일 (*.*)" STID_ALL_FILES, "모든 파일 (*.*)"
STID_HELP_FILES_HLP, "도움말 파일 (*.hlp)" STID_HELP_FILES_HLP, "도움말 파일 (*.hlp)"
STID_FILE_NOT_FOUND_s "%s을 찾을 수 없습니다'. 이 파일을 직접 찾겠습니까?" STID_FILE_NOT_FOUND_s "%s을 찾을 수 없습니다'. 이 파일을 직접 찾겠습니까?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -77,4 +77,5 @@ STID_TOPICS, "&Onderwerpen" ...@@ -77,4 +77,5 @@ 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 "Kan '%s' niet openen. Wilt u zelf dit bestand zoeken?" STID_FILE_NOT_FOUND_s "Kan '%s' niet openen. Wilt u zelf dit bestand zoeken?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -76,4 +76,5 @@ STID_TOPICS, "&Emner" ...@@ -76,4 +76,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -78,4 +78,5 @@ STID_TOPICS, "&Tematy" ...@@ -78,4 +78,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -107,6 +107,7 @@ STID_TOPICS, "&Tpicos" ...@@ -107,6 +107,7 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
...@@ -127,4 +128,5 @@ STID_TOPICS, "&Tpicos" ...@@ -127,4 +128,5 @@ 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 "No possvel encontrar '%s'. Deseja procurar este ficheiro voc mesmo?" STID_FILE_NOT_FOUND_s "No possvel encontrar '%s'. Deseja procurar este ficheiro voc mesmo?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -71,4 +71,5 @@ STID_TOPICS, "T&opics" ...@@ -71,4 +71,5 @@ STID_TOPICS, "T&opics"
STID_ALL_FILES, "Tuot las datotecas (*.*)" STID_ALL_FILES, "Tuot las datotecas (*.*)"
STID_HELP_FILES_HLP, "Datotecas d'ag�d (*.hlp)" STID_HELP_FILES_HLP, "Datotecas d'ag�d (*.hlp)"
STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -76,4 +76,5 @@ STID_TOPICS, "&" ...@@ -76,4 +76,5 @@ STID_TOPICS, "&"
STID_ALL_FILES, " (*.*)" STID_ALL_FILES, " (*.*)"
STID_HELP_FILES_HLP, " (*.hlp)" STID_HELP_FILES_HLP, " (*.hlp)"
STID_FILE_NOT_FOUND_s " '%s'. ?" STID_FILE_NOT_FOUND_s " '%s'. ?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -78,6 +78,7 @@ STID_TOPICS, "&Vsebina" ...@@ -78,6 +78,7 @@ STID_TOPICS, "&Vsebina"
STID_ALL_FILES, "Vse datoteke (*.*)" STID_ALL_FILES, "Vse datoteke (*.*)"
STID_HELP_FILES_HLP, "Datoteke s pomočjo (*.hlp)" STID_HELP_FILES_HLP, "Datoteke s pomočjo (*.hlp)"
STID_FILE_NOT_FOUND_s "Ne najdem datoteke '%s'. Ali jo želite poiskati sami?" STID_FILE_NOT_FOUND_s "Ne najdem datoteke '%s'. Ali jo želite poiskati sami?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
#pragma code_page(default) #pragma code_page(default)
...@@ -63,4 +63,5 @@ STID_TOPICS, "&Topics" ...@@ -63,4 +63,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -69,4 +69,5 @@ STID_TOPICS, "&Ämnen" ...@@ -69,4 +69,5 @@ STID_TOPICS, "&Ämnen"
STID_ALL_FILES, "Alla filer (*.*)" STID_ALL_FILES, "Alla filer (*.*)"
STID_HELP_FILES_HLP, "Hjälpfiler (*.hlp)" STID_HELP_FILES_HLP, "Hjälpfiler (*.hlp)"
STID_FILE_NOT_FOUND_s "Kan inte hitta '%s'. Vill du söka efter denna fil?" STID_FILE_NOT_FOUND_s "Kan inte hitta '%s'. Vill du söka efter denna fil?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -66,4 +66,5 @@ STID_TOPICS, "&Konular" ...@@ -66,4 +66,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -71,6 +71,7 @@ STID_TOPICS, "&Topics" ...@@ -71,6 +71,7 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
#endif /* LANG_WALON */ #endif /* LANG_WALON */
...@@ -67,4 +67,5 @@ STID_TOPICS, "主题(&T)" ...@@ -67,4 +67,5 @@ 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?" STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?"
STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting"
} }
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "winhelp.h" #include "winhelp.h"
#include "winhelp_res.h" #include "winhelp_res.h"
#include "shellapi.h" #include "shellapi.h"
#include "richedit.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -58,6 +59,8 @@ static WINHELP_LINE_PART* WINHELP_IsOverLink(WINHELP_WINDOW*, WPARAM, LPARAM); ...@@ -58,6 +59,8 @@ static WINHELP_LINE_PART* WINHELP_IsOverLink(WINHELP_WINDOW*, WPARAM, LPARAM);
WINHELP_GLOBALS Globals = {3, NULL, TRUE, NULL, NULL, NULL, NULL, NULL, {{{NULL,NULL}},0}}; WINHELP_GLOBALS Globals = {3, NULL, TRUE, NULL, NULL, NULL, NULL, NULL, {{{NULL,NULL}},0}};
static BOOL use_richedit;
#define CTL_ID_BUTTON 0x700 #define CTL_ID_BUTTON 0x700
#define CTL_ID_TEXT 0x701 #define CTL_ID_TEXT 0x701
...@@ -246,6 +249,11 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) ...@@ -246,6 +249,11 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
Globals.hInstance = hInstance; Globals.hInstance = hInstance;
use_richedit = getenv("WINHELP_RICHEDIT") != NULL;
if (use_richedit && LoadLibrary("riched20.dll") == NULL)
return MessageBox(0, MAKEINTRESOURCE(STID_NO_RICHEDIT),
MAKEINTRESOURCE(STID_WHERROR), MB_OK);
/* Get options */ /* Get options */
while (*cmdline && (*cmdline == ' ' || *cmdline == '-')) while (*cmdline && (*cmdline == ' ' || *cmdline == '-'))
{ {
...@@ -643,8 +651,13 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe ...@@ -643,8 +651,13 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
CreateWindow(BUTTON_BOX_WIN_CLASS_NAME, "", WS_CHILD | WS_VISIBLE, CreateWindow(BUTTON_BOX_WIN_CLASS_NAME, "", WS_CHILD | WS_VISIBLE,
0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_BUTTON, Globals.hInstance, NULL); 0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_BUTTON, Globals.hInstance, NULL);
CreateWindow(TEXT_WIN_CLASS_NAME, "", WS_CHILD | WS_VISIBLE, if (!use_richedit)
0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_TEXT, Globals.hInstance, win); CreateWindow(TEXT_WIN_CLASS_NAME, "", WS_CHILD | WS_VISIBLE,
0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_TEXT, Globals.hInstance, win);
else
CreateWindow(RICHEDIT_CLASS, NULL,
ES_MULTILINE | ES_READONLY | WS_CHILD | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE,
0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_TEXT, Globals.hInstance, NULL);
} }
hIcon = (wpage->page) ? wpage->page->file->hIcon : NULL; hIcon = (wpage->page) ? wpage->page->file->hIcon : NULL;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#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 #define STID_FILE_NOT_FOUND_s 0x12E
#define STID_NO_RICHEDIT 0x12F
#define IDD_INDEX 0x150 #define IDD_INDEX 0x150
#define IDC_INDEXLIST 0x151 #define IDC_INDEXLIST 0x151
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment