diff --git a/programs/winhelp/Bg.rc b/programs/winhelp/Bg.rc index d04a9d077da..c2d47e1c7c3 100644 --- a/programs/winhelp/Bg.rc +++ b/programs/winhelp/Bg.rc @@ -66,4 +66,5 @@ STID_TOPICS, "& STID_ALL_FILES, " (*.*)" STID_HELP_FILES_HLP, " (*.hlp)" 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" } diff --git a/programs/winhelp/Cs.rc b/programs/winhelp/Cs.rc index 06c2e17517c..a3ca70815ff 100644 --- a/programs/winhelp/Cs.rc +++ b/programs/winhelp/Cs.rc @@ -71,4 +71,5 @@ STID_TOPICS, "&T STID_ALL_FILES, "Vechny soubory (*.*)" STID_HELP_FILES_HLP, "Soubory npovdy (*.hlp)" 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" } diff --git a/programs/winhelp/Da.rc b/programs/winhelp/Da.rc index 522cdae99a3..7f713a65bad 100644 --- a/programs/winhelp/Da.rc +++ b/programs/winhelp/Da.rc @@ -69,4 +69,5 @@ STID_TOPICS, "To&pics" STID_ALL_FILES, "Alle filer (*.*)" STID_HELP_FILES_HLP, "Hjlpe filer (*.hlp)" 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" } diff --git a/programs/winhelp/De.rc b/programs/winhelp/De.rc index 783226db0b3..b9cdece9cba 100644 --- a/programs/winhelp/De.rc +++ b/programs/winhelp/De.rc @@ -78,4 +78,5 @@ STID_TOPICS, "&Themen" STID_ALL_FILES, "Alle Dateien (*.*)" 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_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/En.rc b/programs/winhelp/En.rc index 464b1859aaa..6dd62136660 100644 --- a/programs/winhelp/En.rc +++ b/programs/winhelp/En.rc @@ -77,4 +77,5 @@ STID_TOPICS, "&Topics" STID_ALL_FILES, "All files (*.*)" STID_HELP_FILES_HLP, "Help files (*.hlp)" 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" } diff --git a/programs/winhelp/Eo.rc b/programs/winhelp/Eo.rc index cc8ef666e46..7fd946cce33 100644 --- a/programs/winhelp/Eo.rc +++ b/programs/winhelp/Eo.rc @@ -69,4 +69,5 @@ STID_TOPICS, "&Temoj" STID_ALL_FILES, "Tutaj dosieroj (*.*)" STID_HELP_FILES_HLP, "Helpaj dosieroj (*.hlp)" 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" } diff --git a/programs/winhelp/Es.rc b/programs/winhelp/Es.rc index 93d9223bd39..7825c248c2c 100644 --- a/programs/winhelp/Es.rc +++ b/programs/winhelp/Es.rc @@ -68,4 +68,5 @@ STID_TOPICS, "&Temas" STID_ALL_FILES, "Todos los archivos (*.*)" 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_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/Fi.rc b/programs/winhelp/Fi.rc index 90de636d2be..cd5164c910c 100644 --- a/programs/winhelp/Fi.rc +++ b/programs/winhelp/Fi.rc @@ -69,4 +69,5 @@ STID_TOPICS, "T&opics" STID_ALL_FILES, "Kaikki tiedostot (*.*)" STID_HELP_FILES_HLP, "Ohjetiedostot (*.hlp)" 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" } diff --git a/programs/winhelp/Fr.rc b/programs/winhelp/Fr.rc index 200b1de8a8e..6696dcb86d1 100644 --- a/programs/winhelp/Fr.rc +++ b/programs/winhelp/Fr.rc @@ -80,4 +80,5 @@ STID_TOPICS, "&Sujets" STID_ALL_FILES, "Tous fichiers (*.*)" 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_NO_RICHEDIT "La bibliothque RichEdit n'a pu tre localise... Abandon" } diff --git a/programs/winhelp/Hu.rc b/programs/winhelp/Hu.rc index 8f4ef53b073..e502e6e16b3 100644 --- a/programs/winhelp/Hu.rc +++ b/programs/winhelp/Hu.rc @@ -69,4 +69,5 @@ STID_TOPICS, "&T STID_ALL_FILES, "Minden fjl (*.*)" STID_HELP_FILES_HLP, "Sg fjlok (*.hlp)" 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" } diff --git a/programs/winhelp/It.rc b/programs/winhelp/It.rc index bce3f14ab60..6d814e845c6 100644 --- a/programs/winhelp/It.rc +++ b/programs/winhelp/It.rc @@ -68,4 +68,5 @@ STID_TOPICS, "&Argomenti" STID_ALL_FILES, "Tutti i file (*.*)" 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_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/Ko.rc b/programs/winhelp/Ko.rc index 491d3ed2bd6..a2cbfdf5c9a 100644 --- a/programs/winhelp/Ko.rc +++ b/programs/winhelp/Ko.rc @@ -80,4 +80,5 @@ STID_TOPICS, " STID_ALL_FILES, " (*.*)" STID_HELP_FILES_HLP, " (*.hlp)" STID_FILE_NOT_FOUND_s "%s ã ϴ'. ãڽϱ?" +STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/Nl.rc b/programs/winhelp/Nl.rc index b17e067ec2d..8890a8e246b 100644 --- a/programs/winhelp/Nl.rc +++ b/programs/winhelp/Nl.rc @@ -77,4 +77,5 @@ STID_TOPICS, "&Onderwerpen" STID_ALL_FILES, "Alle bestanden (*.*)" STID_HELP_FILES_HLP, "Helpbestanden (*.hlp)" STID_FILE_NOT_FOUND_s "Kan '%s' niet openen. Wilt u zelf dit bestand zoeken?" +STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/No.rc b/programs/winhelp/No.rc index 9f607250030..57cea9c2a90 100644 --- a/programs/winhelp/No.rc +++ b/programs/winhelp/No.rc @@ -76,4 +76,5 @@ STID_TOPICS, "&Emner" STID_ALL_FILES, "Alle filer (*.*)" STID_HELP_FILES_HLP, "Hjelp-filer (*.hlp)" 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" } diff --git a/programs/winhelp/Pl.rc b/programs/winhelp/Pl.rc index bc74dc2a970..f1004a535ac 100644 --- a/programs/winhelp/Pl.rc +++ b/programs/winhelp/Pl.rc @@ -78,4 +78,5 @@ STID_TOPICS, "&Tematy" STID_ALL_FILES, "Wszystkie pliki (*.*)" STID_HELP_FILES_HLP, "Pliki pomocy (*.hlp)" 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" } diff --git a/programs/winhelp/Pt.rc b/programs/winhelp/Pt.rc index 52c8a01f06b..114d5020967 100644 --- a/programs/winhelp/Pt.rc +++ b/programs/winhelp/Pt.rc @@ -107,6 +107,7 @@ STID_TOPICS, "&T STID_ALL_FILES, "Todos os arquivos (*.*)" 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_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE @@ -127,4 +128,5 @@ STID_TOPICS, "&T STID_ALL_FILES, "Todos os ficheiros (*.*)" STID_HELP_FILES_HLP, "Ficheiros de ajuda (*.hlp)" STID_FILE_NOT_FOUND_s "No possvel encontrar '%s'. Deseja procurar este ficheiro voc mesmo?" +STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/Rm.rc b/programs/winhelp/Rm.rc index ebbb154a7aa..16940942969 100644 --- a/programs/winhelp/Rm.rc +++ b/programs/winhelp/Rm.rc @@ -71,4 +71,5 @@ STID_TOPICS, "T&opics" STID_ALL_FILES, "Tuot las datotecas (*.*)" 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_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/Ru.rc b/programs/winhelp/Ru.rc index 4767d067fc0..8f885c78990 100644 --- a/programs/winhelp/Ru.rc +++ b/programs/winhelp/Ru.rc @@ -76,4 +76,5 @@ STID_TOPICS, "& STID_ALL_FILES, " (*.*)" STID_HELP_FILES_HLP, " (*.hlp)" STID_FILE_NOT_FOUND_s " '%s'. ?" +STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } diff --git a/programs/winhelp/Si.rc b/programs/winhelp/Si.rc index 245979e08ae..1975d97c07e 100644 --- a/programs/winhelp/Si.rc +++ b/programs/winhelp/Si.rc @@ -78,6 +78,7 @@ STID_TOPICS, "&Vsebina" STID_ALL_FILES, "Vse datoteke (*.*)" STID_HELP_FILES_HLP, "Datoteke s pomočjo (*.hlp)" 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) diff --git a/programs/winhelp/Sk.rc b/programs/winhelp/Sk.rc index c8e713f9b38..e8da9d0fc70 100644 --- a/programs/winhelp/Sk.rc +++ b/programs/winhelp/Sk.rc @@ -63,4 +63,5 @@ STID_TOPICS, "&Topics" STID_ALL_FILES, "Vetky sbory (*.*)" STID_HELP_FILES_HLP, "Sbory pomoci (*.hlp)" 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" } diff --git a/programs/winhelp/Sv.rc b/programs/winhelp/Sv.rc index 37d5a326b64..a3f17e9c635 100644 --- a/programs/winhelp/Sv.rc +++ b/programs/winhelp/Sv.rc @@ -69,4 +69,5 @@ STID_TOPICS, "&Ämnen" STID_ALL_FILES, "Alla filer (*.*)" STID_HELP_FILES_HLP, "Hjälpfiler (*.hlp)" 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" } diff --git a/programs/winhelp/Tr.rc b/programs/winhelp/Tr.rc index 9578e8b7e1e..9aa45f8c72b 100644 --- a/programs/winhelp/Tr.rc +++ b/programs/winhelp/Tr.rc @@ -66,4 +66,5 @@ STID_TOPICS, "&Konular" STID_ALL_FILES, "Tm dosyalar (*.*)" STID_HELP_FILES_HLP, "Yardm dosyalar (*.hlp)" 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" } diff --git a/programs/winhelp/Wa.rc b/programs/winhelp/Wa.rc index c536d2a3f38..23e47cc9932 100644 --- a/programs/winhelp/Wa.rc +++ b/programs/winhelp/Wa.rc @@ -71,6 +71,7 @@ STID_TOPICS, "&Topics" STID_ALL_FILES, "Tos les fitchs (*.*)" 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_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" } #endif /* LANG_WALON */ diff --git a/programs/winhelp/Zh.rc b/programs/winhelp/Zh.rc index 8c0689b5142..dad37df8931 100644 --- a/programs/winhelp/Zh.rc +++ b/programs/winhelp/Zh.rc @@ -67,4 +67,5 @@ STID_TOPICS, " STID_ALL_FILES, "ļ (*.*)" STID_HELP_FILES_HLP, "ļ (*.hlp)" 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" } diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c index 4a50c3222a4..12ab5160d5a 100644 --- a/programs/winhelp/winhelp.c +++ b/programs/winhelp/winhelp.c @@ -35,6 +35,7 @@ #include "winhelp.h" #include "winhelp_res.h" #include "shellapi.h" +#include "richedit.h" #include "wine/debug.h" @@ -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}}; +static BOOL use_richedit; + #define CTL_ID_BUTTON 0x700 #define CTL_ID_TEXT 0x701 @@ -246,6 +249,11 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) 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 */ while (*cmdline && (*cmdline == ' ' || *cmdline == '-')) { @@ -643,8 +651,13 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe CreateWindow(BUTTON_BOX_WIN_CLASS_NAME, "", WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_BUTTON, Globals.hInstance, NULL); - CreateWindow(TEXT_WIN_CLASS_NAME, "", WS_CHILD | WS_VISIBLE, - 0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_TEXT, Globals.hInstance, win); + if (!use_richedit) + 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; diff --git a/programs/winhelp/winhelp_res.h b/programs/winhelp/winhelp_res.h index d58de612f6a..89c3c4c4ddf 100644 --- a/programs/winhelp/winhelp_res.h +++ b/programs/winhelp/winhelp_res.h @@ -30,6 +30,7 @@ #define STID_HELP_FILES_HLP 0x12C #define STID_DIALOG_TEST 0x12D #define STID_FILE_NOT_FOUND_s 0x12E +#define STID_NO_RICHEDIT 0x12F #define IDD_INDEX 0x150 #define IDC_INDEXLIST 0x151