[WELCOME]: UI improvements:
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 5 Jul 2017 02:02:43 +0000 (02:02 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 5 Jul 2017 02:02:43 +0000 (02:02 +0000)
- Allow only one running instance of the Welcome application at a time.
- Implement translating \xhhhh hexadecimal character specifications in topic text descriptions.
- Allow using the keyboard for navigating amongst the topics, and ENTER key presses to run the selected topic command.
  <rant> *OF COURSE*, because we are ReactOS *SO* we are *buggy* (well, user32/win32k), keyboard navigation via arrow keys *DOES NOT WORK*!! (only navigation via TAB key do work) 8^(((( </rant>
  This however works OK on Windows.
- Improve topic buttons activation when mouse hovers around above the window, as well as when window activation is lost or regained.
- Change the default text font to Tahoma.
- Don't hardcode white brush, but instead use stock object WHITE_BRUSH. Similarly, don't hardcode text black colour, but instead use the ambient text colour of the system.
- Add keyboard shortcuts to the default topic items.
- Shift the window ID of both the checkbox and the Exit buttons to be below a fixed topic-button base ID.
- In GetLocaleName(), use more explicit returned-variable names (cchRet, because it's a returned string length in character numbers).

svn path=/trunk/; revision=75282

30 files changed:
reactos/base/setup/welcome/lang/bg-BG.rc
reactos/base/setup/welcome/lang/cs-CZ.rc
reactos/base/setup/welcome/lang/da-DK.rc
reactos/base/setup/welcome/lang/de-DE.rc
reactos/base/setup/welcome/lang/el-GR.rc
reactos/base/setup/welcome/lang/en-US.rc
reactos/base/setup/welcome/lang/es-ES.rc
reactos/base/setup/welcome/lang/et-EE.rc
reactos/base/setup/welcome/lang/fr-FR.rc
reactos/base/setup/welcome/lang/hu-HU.rc
reactos/base/setup/welcome/lang/id-ID.rc
reactos/base/setup/welcome/lang/it-IT.rc
reactos/base/setup/welcome/lang/ja-JP.rc
reactos/base/setup/welcome/lang/lt-LT.rc
reactos/base/setup/welcome/lang/ms-MY.rc
reactos/base/setup/welcome/lang/nl-NL.rc
reactos/base/setup/welcome/lang/no-NO.rc
reactos/base/setup/welcome/lang/pl-PL.rc
reactos/base/setup/welcome/lang/pt-BR.rc
reactos/base/setup/welcome/lang/ro-RO.rc
reactos/base/setup/welcome/lang/ru-RU.rc
reactos/base/setup/welcome/lang/sk-SK.rc
reactos/base/setup/welcome/lang/sq-AL.rc
reactos/base/setup/welcome/lang/sv-SE.rc
reactos/base/setup/welcome/lang/tr-TR.rc
reactos/base/setup/welcome/lang/uk-UA.rc
reactos/base/setup/welcome/lang/zh-CN.rc
reactos/base/setup/welcome/lang/zh-TW.rc
reactos/base/setup/welcome/resource.h
reactos/base/setup/welcome/welcome.c

index 12ad596..a287bca 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Добре дошли в операционна система ReactOS.\n\nИзберете си от темите в ляво."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Добре дошли в операционна система ReactOS.\n\nИзберете си от темите в ляво."
 
-    IDS_CHECKTEXT "Показвай отново този прозорец"
-    IDS_CLOSETEXT "Изход"
+    IDS_CHECKTEXT "&Показвай отново този прозорец"
+    IDS_CLOSETEXT "&Изход"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Инсталиране на ReactOS"
-    IDS_TOPICBUTTON1 "Разгледай това CD"
-    IDS_TOPICBUTTON2 "Изход"
+    IDS_TOPICBUTTON0 "Инсталиране на &ReactOS"
+    IDS_TOPICBUTTON1 "&Разгледай това CD"
+    IDS_TOPICBUTTON2 "&Изход"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 906cdca..d0345bc 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Vítejte v operačním systému ReactOS.\n\nKlepněte na tlačítko v levém sloupci."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Vítejte v operačním systému ReactOS.\n\nKlepněte na tlačítko v levém sloupci."
 
-    IDS_CHECKTEXT "Zobrazit dialog znovu"
-    IDS_CLOSETEXT "Konec"
+    IDS_CHECKTEXT "&Zobrazit dialog znovu"
+    IDS_CLOSETEXT "&Konec"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Instalovat ReactOS"
-    IDS_TOPICBUTTON1 "Prohlížet toto CD"
-    IDS_TOPICBUTTON2 "Konec"
+    IDS_TOPICBUTTON0 "&Instalovat ReactOS"
+    IDS_TOPICBUTTON1 "&Prohlížet toto CD"
+    IDS_TOPICBUTTON2 "&Konec"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 19d9c00..a41597f 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Velkommen til ReactOS operativ System.\n\nKlik på et emne til venstre."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Velkommen til ReactOS operativ System.\n\nKlik på et emne til venstre."
 
-    IDS_CHECKTEXT "Vis denne dialog igen ved opstart"
-    IDS_CLOSETEXT "Afslut"
+    IDS_CHECKTEXT "&Vis denne dialog igen ved opstart"
+    IDS_CLOSETEXT "&Afslut"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Installer ReactOS"
-    IDS_TOPICBUTTON1 "Gennemse Cdrom"
-    IDS_TOPICBUTTON2 "Afslut"
+    IDS_TOPICBUTTON0 "&Installer ReactOS"
+    IDS_TOPICBUTTON1 "&Gennemse Cdrom"
+    IDS_TOPICBUTTON2 "&Afslut"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 18b8fc3..f64b869 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Willkommen in ReactOS.\n\nKlicken Sie auf ein Thema auf der linken Seite."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Willkommen in ReactOS.\n\nKlicken Sie auf ein Thema auf der linken Seite."
 
-    IDS_CHECKTEXT "Dialog beim nächsen Start wieder anzeigen"
-    IDS_CLOSETEXT "Beenden"
+    IDS_CHECKTEXT "&Dialog beim nächsen Start wieder anzeigen"
+    IDS_CLOSETEXT "&Beenden"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "ReactOS installieren"
-    IDS_TOPICBUTTON1 "CD durchsuchen"
-    IDS_TOPICBUTTON2 "Beenden"
+    IDS_TOPICBUTTON0 "&ReactOS installieren"
+    IDS_TOPICBUTTON1 "&CD durchsuchen"
+    IDS_TOPICBUTTON2 "&Beenden"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 0a63e8b..eb84a9b 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Καλώς ήλθατε στο ReactOS Λειτουργικό Σύστημα.\n\nΕπιλέξτε ένα θέμα από το μενού στα αριστερά."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Καλώς ήλθατε στο ReactOS Λειτουργικό Σύστημα.\n\nΕπιλέξτε ένα θέμα από το μενού στα αριστερά."
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "&Έξοδος"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Εγκατάσταση του ReactOS"
-    IDS_TOPICBUTTON1 "Εξερεύνηση αυτού του CD"
-    IDS_TOPICBUTTON2 "Έξοδος"
+    IDS_TOPICBUTTON0 "Εγκατάσταση του &ReactOS"
+    IDS_TOPICBUTTON1 "Εξερεύνηση αυτού του &CD"
+    IDS_TOPICBUTTON2 "&Έξοδος"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 860c8b8..0563bb1 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Welcome to ReactOS Operating System.\n\nClick a topic on the left."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Welcome to ReactOS Operating System.\n\nClick a topic on the left."
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "&Exit"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Install ReactOS"
-    IDS_TOPICBUTTON1 "Browse this CD"
-    IDS_TOPICBUTTON2 "Exit"
+    IDS_TOPICBUTTON0 "&Install ReactOS"
+    IDS_TOPICBUTTON1 "&Browse this CD"
+    IDS_TOPICBUTTON2 "&Exit"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index b524ffd..480bd52 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bienvenido al Sistema Operativo ReactOS.\n\nHaz Click en una opción a la izquierda."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bienvenido al Sistema Operativo ReactOS.\n\nHaz Click en una opción a la izquierda."
 
-    IDS_CHECKTEXT "Mostrar este dialogo otra vez"
-    IDS_CLOSETEXT "Salir"
+    IDS_CHECKTEXT "&Mostrar este dialogo otra vez"
+    IDS_CLOSETEXT "&Salir"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Instalar ReactOS"
-    IDS_TOPICBUTTON1 "Explorar este CD"
-    IDS_TOPICBUTTON2 "Salir"
+    IDS_TOPICBUTTON0 "&Instalar ReactOS"
+    IDS_TOPICBUTTON1 "&Explorar este CD"
+    IDS_TOPICBUTTON2 "&Salir"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 57f8cb9..493a4fc 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Tere tulemast operatsioonisüsteemi ReactOS.\n\nVali teema vasakult."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Tere tulemast operatsioonisüsteemi ReactOS.\n\nVali teema vasakult."
 
-    IDS_CHECKTEXT "Näita seda dialoogi veel"
-    IDS_CLOSETEXT "Välju"
+    IDS_CHECKTEXT "&Näita seda dialoogi veel"
+    IDS_CLOSETEXT "&Välju"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Paigalda ReactOS"
-    IDS_TOPICBUTTON1 "Sirvi CD sisu"
-    IDS_TOPICBUTTON2 "Välju"
+    IDS_TOPICBUTTON0 "&Paigalda ReactOS"
+    IDS_TOPICBUTTON1 "&Sirvi CD sisu"
+    IDS_TOPICBUTTON2 "&Välju"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 551f8be..c3ee69a 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bienvenue sur le système d'exploitation ReactOS.\n\nCliquez sur une section à gauche."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bienvenue sur le système d'exploitation ReactOS.\n\nCliquez sur une section à gauche."
 
-    IDS_CHECKTEXT "Afficher cette boîte de dialogue de nouveau."
-    IDS_CLOSETEXT "Quitter"
+    IDS_CHECKTEXT "&Afficher cette boîte de dialogue de nouveau."
+    IDS_CLOSETEXT "&Quitter"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Installer ReactOS"
-    IDS_TOPICBUTTON1 "Naviguer dans ce CD"
-    IDS_TOPICBUTTON2 "Quitter"
+    IDS_TOPICBUTTON0 "&Installer ReactOS"
+    IDS_TOPICBUTTON1 "&Naviguer dans ce CD"
+    IDS_TOPICBUTTON2 "&Quitter"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 7f39ebd..0b7c14a 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Üdvözlünk a ReactOS Operációs Rendszerben.\n\n"
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Üdvözlünk a ReactOS Operációs Rendszerben.\n\n"
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Kilépés"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "&Kilépés"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "ReactOS telepítése"
-    IDS_TOPICBUTTON1 "A CD böngészése"
-    IDS_TOPICBUTTON2 "Kilépés"
+    IDS_TOPICBUTTON0 "&ReactOS telepítése"
+    IDS_TOPICBUTTON1 "&A CD böngészése"
+    IDS_TOPICBUTTON2 "&Kilépés"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 393b11d..fea2427 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Selamat datang di ReactOS Operating System.\n\nKlik topik di sisi kiri."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Selamat datang di ReactOS Operating System.\n\nKlik topik di sisi kiri."
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "&Keluar"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Instalasi ReactOS"
-    IDS_TOPICBUTTON1 "Lihat CD ini"
-    IDS_TOPICBUTTON2 "Keluar"
+    IDS_TOPICBUTTON0 "&Instalasi ReactOS"
+    IDS_TOPICBUTTON1 "Lihat &CD ini"
+    IDS_TOPICBUTTON2 "&Keluar"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index ed30b4d..c1bfef2 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Benvenuto nel ReactOS Operating System.\n\nClicca su un argomento a sinistra."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Benvenuto nel ReactOS Operating System.\n\nClicca su un argomento a sinistra."
 
-    IDS_CHECKTEXT "Mostra ancora questa finestra"
-    IDS_CLOSETEXT "Esci"
+    IDS_CHECKTEXT "&Mostra ancora questa finestra"
+    IDS_CLOSETEXT "&Esci"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Installa ReactOS"
-    IDS_TOPICBUTTON1 "Esplora il CD"
-    IDS_TOPICBUTTON2 "Esci"
+    IDS_TOPICBUTTON0 "&Installa ReactOS"
+    IDS_TOPICBUTTON1 "Esplora il &CD"
+    IDS_TOPICBUTTON2 "&Esci"
 END
 
 /* Topic Titolos */
 END
 
 /* Topic Titolos */
index a1e8a1f..09143f8 100644 (file)
@@ -9,8 +9,8 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "ReactOS へようこそ。\n\n左側のトピックをクリックしてください。"
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "ReactOS へようこそ。\n\n左側のトピックをクリックしてください。"
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "終了(&Q)"
 END
 
 /* Topic buttons */
 END
 
 /* Topic buttons */
@@ -18,7 +18,7 @@ STRINGTABLE
 BEGIN
     IDS_TOPICBUTTON0 "ReactOS をインストールする"
     IDS_TOPICBUTTON1 "この CD を開く"
 BEGIN
     IDS_TOPICBUTTON0 "ReactOS をインストールする"
     IDS_TOPICBUTTON1 "この CD を開く"
-    IDS_TOPICBUTTON2 "終了"
+    IDS_TOPICBUTTON2 "終了(&Q)"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 78d94bb..74652ad 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Sveiki, čia ReactOS Operacinė Sistema.\n\nPasirinkite punktą kairėje."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Sveiki, čia ReactOS Operacinė Sistema.\n\nPasirinkite punktą kairėje."
 
-    IDS_CHECKTEXT "Rodyti šį langą vėl"
-    IDS_CLOSETEXT "Išeiti"
+    IDS_CHECKTEXT "&Rodyti šį langą vėl"
+    IDS_CLOSETEXT "&Išeiti"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Įdiegti ReactOS"
-    IDS_TOPICBUTTON1 "Peržiūrėti šį CD"
-    IDS_TOPICBUTTON2 "Išeiti"
+    IDS_TOPICBUTTON0 "Įdiegti &ReactOS"
+    IDS_TOPICBUTTON1 "&Peržiūrėti šį CD"
+    IDS_TOPICBUTTON2 "&Išeiti"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 7e3ec28..6770674 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Selamat datang ke ReactOS Operating System.\n\nKlik tajuk di sebelah kiri."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Selamat datang ke ReactOS Operating System.\n\nKlik tajuk di sebelah kiri."
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "&Keluar"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Pasang ReactOS"
-    IDS_TOPICBUTTON1 "Layari CD ini"
-    IDS_TOPICBUTTON2 "Keluar"
+    IDS_TOPICBUTTON0 "&Pasang ReactOS"
+    IDS_TOPICBUTTON1 "&Layari CD ini"
+    IDS_TOPICBUTTON2 "&Keluar"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index f6c049c..f00e19d 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Welkom bij het ReactOS Operation System.\n\nKlik links op een onderwerp."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Welkom bij het ReactOS Operation System.\n\nKlik links op een onderwerp."
 
-    IDS_CHECKTEXT "Ga terug naar dit scherm"
-    IDS_CLOSETEXT "Afsluiten"
+    IDS_CHECKTEXT "&Ga terug naar dit scherm"
+    IDS_CLOSETEXT "&Afsluiten"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Installeer ReactOS"
-    IDS_TOPICBUTTON1 "Deze CD Verkennen"
-    IDS_TOPICBUTTON2 "Afsluiten"
+    IDS_TOPICBUTTON0 "&Installeer ReactOS"
+    IDS_TOPICBUTTON1 "&Deze CD Verkennen"
+    IDS_TOPICBUTTON2 "&Afsluiten"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 861b086..5283219 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Velkommen til ReactOS Operativsystem.\n\nTrykk et emne til venstre."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Velkommen til ReactOS Operativsystem.\n\nTrykk et emne til venstre."
 
-    IDS_CHECKTEXT "Vis denne dialoget igjen"
-    IDS_CLOSETEXT "Avslutt"
+    IDS_CHECKTEXT "&Vis denne dialoget igjen"
+    IDS_CLOSETEXT "&Avslutt"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Innstaller ReactOS"
-    IDS_TOPICBUTTON1 "Utforsk denne CD"
-    IDS_TOPICBUTTON2 "Avslutt"
+    IDS_TOPICBUTTON0 "&Innstaller ReactOS"
+    IDS_TOPICBUTTON1 "&Utforsk denne CD"
+    IDS_TOPICBUTTON2 "&Avslutt"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 543b176..0a7aa5d 100644 (file)
@@ -15,16 +15,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Witaj w systemie operacyjnym ReactOS.\n\nWybierz temat po lewej."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Witaj w systemie operacyjnym ReactOS.\n\nWybierz temat po lewej."
 
-    IDS_CHECKTEXT "Pokaż ten dialog ponownie"
-    IDS_CLOSETEXT "Wyjście"
+    IDS_CHECKTEXT "&Pokaż ten dialog ponownie"
+    IDS_CLOSETEXT "&Wyjście"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Zainstaluj ReactOS"
-    IDS_TOPICBUTTON1 "Przeglądaj CD"
-    IDS_TOPICBUTTON2 "Wyjście"
+    IDS_TOPICBUTTON0 "&Zainstaluj ReactOS"
+    IDS_TOPICBUTTON1 "Przeglądaj &CD"
+    IDS_TOPICBUTTON2 "&Wyjście"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 4daccd7..acaf668 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bem vindo ao Sistema Operacional ReactOS.\n\nClique em um tópico à esquerda."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bem vindo ao Sistema Operacional ReactOS.\n\nClique em um tópico à esquerda."
 
-    IDS_CHECKTEXT "Exibir este diálogo novamente"
-    IDS_CLOSETEXT "Sair"
+    IDS_CHECKTEXT "&Exibir este diálogo novamente"
+    IDS_CLOSETEXT "&Sair"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Instalar ReactOS"
-    IDS_TOPICBUTTON1 "Examinar este CD"
-    IDS_TOPICBUTTON2 "Sair"
+    IDS_TOPICBUTTON0 "&Instalar ReactOS"
+    IDS_TOPICBUTTON1 "Examinar este &CD"
+    IDS_TOPICBUTTON2 "&Sair"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 0d66917..5b9d47d 100644 (file)
@@ -16,16 +16,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bun venit în Sistemul de Operare ReactOS.\n\nAlegeți o opțiune din stânga."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Bun venit în Sistemul de Operare ReactOS.\n\nAlegeți o opțiune din stânga."
 
-    IDS_CHECKTEXT "Afișează acest dialog și altă dată"
-    IDS_CLOSETEXT "Ieșire"
+    IDS_CHECKTEXT "&Afișează acest dialog și altă dată"
+    IDS_CLOSETEXT "&Ieșire"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Instalare ReactOS"
-    IDS_TOPICBUTTON1 "Explorare CD"
-    IDS_TOPICBUTTON2 "Ieșire"
+    IDS_TOPICBUTTON0 "Instalare &ReactOS"
+    IDS_TOPICBUTTON1 "&Explorare CD"
+    IDS_TOPICBUTTON2 "&Ieșire"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 510aa8e..dde99b5 100644 (file)
@@ -9,16 +9,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Добро пожаловать в ReactOS.\n\nВыберите пункт слева."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Добро пожаловать в ReactOS.\n\nВыберите пункт слева."
 
-    IDS_CHECKTEXT "Показывать это окно снова"
-    IDS_CLOSETEXT "Выход"
+    IDS_CHECKTEXT "&Показывать это окно снова"
+    IDS_CLOSETEXT "&Выход"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Установить ReactOS"
-    IDS_TOPICBUTTON1 "Обзор диска"
-    IDS_TOPICBUTTON2 "Выход"
+    IDS_TOPICBUTTON0 "&Установить ReactOS"
+    IDS_TOPICBUTTON1 "&Обзор диска"
+    IDS_TOPICBUTTON2 "&Выход"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 872bbad..10bd608 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Vitajte v operačnom systéme ReactOS.\n\nKliknite na tlačidlo v ľavom stĺpci."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Vitajte v operačnom systéme ReactOS.\n\nKliknite na tlačidlo v ľavom stĺpci."
 
-    IDS_CHECKTEXT "Zobraziť toto okno aj nabudúce"
-    IDS_CLOSETEXT "Koniec"
+    IDS_CHECKTEXT "&Zobraziť toto okno aj nabudúce"
+    IDS_CLOSETEXT "&Koniec"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Inštalovať ReactOS"
-    IDS_TOPICBUTTON1 "Prezerať toto CD"
-    IDS_TOPICBUTTON2 "Koniec"
+    IDS_TOPICBUTTON0 "&Inštalovať ReactOS"
+    IDS_TOPICBUTTON1 "&Prezerať toto CD"
+    IDS_TOPICBUTTON2 "&Koniec"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index d1a21f7..03ff461 100644 (file)
@@ -13,16 +13,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Mirë se vini në Sistemin Operative ReactOS.\n\nKliko në një topik në të majtë."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Mirë se vini në Sistemin Operative ReactOS.\n\nKliko në një topik në të majtë."
 
-    IDS_CHECKTEXT "Trego këtë dialog përsëri"
-    IDS_CLOSETEXT "Dil"
+    IDS_CHECKTEXT "&Trego këtë dialog përsëri"
+    IDS_CLOSETEXT "&Dil"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Instalo ReactOS"
-    IDS_TOPICBUTTON1 "Shfleto këtë CD"
-    IDS_TOPICBUTTON2 "Dil"
+    IDS_TOPICBUTTON0 "&Instalo ReactOS"
+    IDS_TOPICBUTTON1 "&Shfleto këtë CD"
+    IDS_TOPICBUTTON2 "&Dil"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 870e35e..8e1aa4a 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Välkommen till ReactOS Operating System.\n\nKlicka på ett avsnitt till vänster."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Välkommen till ReactOS Operating System.\n\nKlicka på ett avsnitt till vänster."
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "&Avsluta"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Installera ReactOS"
-    IDS_TOPICBUTTON1 "Utforska skivan"
-    IDS_TOPICBUTTON2 "Avsluta"
+    IDS_TOPICBUTTON0 "&Installera ReactOS"
+    IDS_TOPICBUTTON1 "&Utforska skivan"
+    IDS_TOPICBUTTON2 "&Avsluta"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index fe46fb3..42f3913 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "ReactOS İşletim Dizgesi'ne hoş geldiniz.\n\nSolda bir konuya tıklayınız."
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "ReactOS İşletim Dizgesi'ne hoş geldiniz.\n\nSolda bir konuya tıklayınız."
 
-    IDS_CHECKTEXT "Bu iletiyi yine göster."
-    IDS_CLOSETEXT "Çıkış"
+    IDS_CHECKTEXT "&Bu iletiyi yine göster."
+    IDS_CLOSETEXT "&Çıkış"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "ReactOS'u Kur"
-    IDS_TOPICBUTTON1 "Bu CD'yi Araştır"
-    IDS_TOPICBUTTON2 "Çıkış"
+    IDS_TOPICBUTTON0 "&ReactOS'u Kur"
+    IDS_TOPICBUTTON1 "Bu &CD'yi Araştır"
+    IDS_TOPICBUTTON2 "&Çıkış"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index bb36eef..38d8799 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Ласкаво просимо до операційної системи ReactOS.\n\nКлацніть по темі ліворуч"
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "Ласкаво просимо до операційної системи ReactOS.\n\nКлацніть по темі ліворуч"
 
-    IDS_CHECKTEXT "Показувати цей діалог знов"
-    IDS_CLOSETEXT "Вихід"
+    IDS_CHECKTEXT "&Показувати цей діалог знов"
+    IDS_CLOSETEXT "&Вихід"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "Встановлення ReactOS"
-    IDS_TOPICBUTTON1 "Огляд цього CD"
-    IDS_TOPICBUTTON2 "Вихід"
+    IDS_TOPICBUTTON0 "Встановлення &ReactOS"
+    IDS_TOPICBUTTON1 "&Огляд цього CD"
+    IDS_TOPICBUTTON2 "&Вихід"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 553231e..defeee1 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "欢迎使用 ReactOS 操作系统。\n\n 请点击左边的主题。"
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "欢迎使用 ReactOS 操作系统。\n\n 请点击左边的主题。"
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "退出(&Q)"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "安装 ReactOS"
-    IDS_TOPICBUTTON1 "浏览 CD"
-    IDS_TOPICBUTTON2 "退出 "
+    IDS_TOPICBUTTON0 "安装 &ReactOS"
+    IDS_TOPICBUTTON1 "浏览 &CD"
+    IDS_TOPICBUTTON2 "退出(&Q)"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 51a5ada..efc96b2 100644 (file)
@@ -11,16 +11,16 @@ BEGIN
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "歡迎使用 ReactOS 作業系統。\n\n 請點選左邊的主題。"
 
     IDS_DEFAULTTOPICTITLE "ReactOS"
     IDS_DEFAULTTOPICDESC "歡迎使用 ReactOS 作業系統。\n\n 請點選左邊的主題。"
 
-    IDS_CHECKTEXT "Show this dialog again"
-    IDS_CLOSETEXT "Exit"
+    IDS_CHECKTEXT "&Show this dialog again"
+    IDS_CLOSETEXT "退出(&Q)"
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
 END
 
 /* Topic buttons */
 STRINGTABLE
 BEGIN
-    IDS_TOPICBUTTON0 "安裝 ReactOS"
-    IDS_TOPICBUTTON1 "瀏覽 CD"
-    IDS_TOPICBUTTON2 "退出 "
+    IDS_TOPICBUTTON0 "安裝 &ReactOS"
+    IDS_TOPICBUTTON1 "瀏覽 &CD"
+    IDS_TOPICBUTTON2 "退出(&Q)"
 END
 
 /* Topic titles */
 END
 
 /* Topic titles */
index 788379a..b9ce54f 100644 (file)
@@ -1,41 +1,44 @@
 #pragma once
 
 #pragma once
 
-#define IDS_APPTITLE          1000
-#define IDS_DEFAULTTOPICTITLE 1001
-#define IDS_DEFAULTTOPICDESC  1002
-#define IDS_FONTNAME          1003
-#define IDS_CHECKTEXT         1004
-#define IDS_CLOSETEXT         1005
-
-#define IDS_TOPICBUTTON0 1010
-#define IDS_TOPICBUTTON1 1011
-#define IDS_TOPICBUTTON2 1012
-
-#define IDS_TOPICTITLE0 1020
-#define IDS_TOPICTITLE1 1021
-#define IDS_TOPICTITLE2 1022
-
-#define IDS_TOPICDESC0 1030
-#define IDS_TOPICDESC1 1031
-#define IDS_TOPICDESC2 1032
-
-#define IDS_TOPICACTION0 1040
-#define IDS_TOPICACTION1 1041
-#define IDS_TOPICACTION2 1042
-
-// #define IDS_TOPICOPTION0 1050
-// #define IDS_TOPICOPTION1 1051
-// #define IDS_TOPICOPTION2 1052
+/* Internal button window IDs, below TOPIC_BTN_ID_BASE == 100 */
+#define IDC_CHECKBUTTON 98
+#define IDC_CLOSEBUTTON 99
+
+/* Strings */
+#define IDS_APPTITLE            1000
+#define IDS_DEFAULTTOPICTITLE   1001
+#define IDS_DEFAULTTOPICDESC    1002
+#define IDS_FONTNAME            1003
+#define IDS_CHECKTEXT           1004
+#define IDS_CLOSETEXT           1005
+
+#define IDS_TOPICBUTTON0    1010
+#define IDS_TOPICBUTTON1    1011
+#define IDS_TOPICBUTTON2    1012
+
+#define IDS_TOPICTITLE0     1020
+#define IDS_TOPICTITLE1     1021
+#define IDS_TOPICTITLE2     1022
+
+#define IDS_TOPICDESC0      1030
+#define IDS_TOPICDESC1      1031
+#define IDS_TOPICDESC2      1032
+
+#define IDS_TOPICACTION0    1040
+#define IDS_TOPICACTION1    1041
+#define IDS_TOPICACTION2    1042
+
+// #define IDS_TOPICOPTION0    1050
+// #define IDS_TOPICOPTION1    1051
+// #define IDS_TOPICOPTION2    1052
 
 /* Bitmaps */
 
 /* Bitmaps */
-#define IDB_TITLEBITMAP        101
-#define IDB_DEFAULTTOPICBITMAP 102
-
-// #define IDB_TOPICBITMAP0 110
-// #define IDB_TOPICBITMAP1 111
-// #define IDB_TOPICBITMAP2 112
+#define IDB_TITLEBITMAP         101
+#define IDB_DEFAULTTOPICBITMAP  102
 
 
-#define IDC_CLOSEBUTTON 2000
-#define IDC_CHECKBUTTON 2001
+// #define IDB_TOPICBITMAP0    110
+// #define IDB_TOPICBITMAP1    111
+// #define IDB_TOPICBITMAP2    112
 
 
+/* Icons */
 #define IDI_MAIN 3000
 #define IDI_MAIN 3000
index 8391fed..75b218a 100644 (file)
 
 /* GLOBALS ******************************************************************/
 
 
 /* GLOBALS ******************************************************************/
 
-TCHAR szFrameClass[] = TEXT("WelcomeWindowClass");
+TCHAR szWindowClass[] = TEXT("WelcomeWindowClass");
 TCHAR szAppTitle[80];
 
 HINSTANCE hInstance;
 
 HWND hWndMain = NULL;
 TCHAR szAppTitle[80];
 
 HINSTANCE hInstance;
 
 HWND hWndMain = NULL;
-HWND hWndDefaultTopic = NULL;
 
 
-HDC hdcMem = NULL;
-
-ULONG ulInnerWidth = TITLE_WIDTH;
-ULONG ulInnerHeight = (TITLE_WIDTH * 3) / 4;
-ULONG ulTitleHeight = TITLE_HEIGHT + 3;
-
-HBITMAP hTitleBitmap = NULL;
-HBITMAP hDefaultTopicBitmap = NULL;
-HWND hWndCloseButton = NULL;
 HWND hWndCheckButton = NULL;
 HWND hWndCheckButton = NULL;
+HWND hWndCloseButton = NULL;
 
 BOOL bDisplayCheckBox = FALSE; // FIXME: We should also repaint the OS version correctly!
 BOOL bDisplayExitBtn  = TRUE;
 
 BOOL bDisplayCheckBox = FALSE; // FIXME: We should also repaint the OS version correctly!
 BOOL bDisplayExitBtn  = TRUE;
@@ -92,12 +83,20 @@ typedef struct _TOPIC
 DWORD dwNumberTopics = 0;
 PTOPIC* pTopics = NULL;
 
 DWORD dwNumberTopics = 0;
 PTOPIC* pTopics = NULL;
 
+WNDPROC fnOldBtn;
+
 TCHAR szDefaultTitle[TOPIC_TITLE_LENGTH];
 TCHAR szDefaultDesc[TOPIC_DESC_LENGTH];
 
 TCHAR szDefaultTitle[TOPIC_TITLE_LENGTH];
 TCHAR szDefaultDesc[TOPIC_DESC_LENGTH];
 
+#define TOPIC_BTN_ID_BASE   100
+
 INT nTopic = -1;        // Active (focused) topic
 INT nDefaultTopic = -1; // Default selected topic
 
 INT nTopic = -1;        // Active (focused) topic
 INT nDefaultTopic = -1; // Default selected topic
 
+HDC hdcMem = NULL;
+HBITMAP hTitleBitmap = NULL;
+HBITMAP hDefaultTopicBitmap = NULL;
+
 HFONT hFontTopicButton;
 HFONT hFontTopicTitle;
 HFONT hFontTopicDescription;
 HFONT hFontTopicButton;
 HFONT hFontTopicTitle;
 HFONT hFontTopicDescription;
@@ -105,14 +104,11 @@ HFONT hFontCheckButton;
 
 HBRUSH hbrLightBlue;
 HBRUSH hbrDarkBlue;
 
 HBRUSH hbrLightBlue;
 HBRUSH hbrDarkBlue;
-HBRUSH hbrRightPanel;
 
 RECT rcTitlePanel;
 RECT rcLeftPanel;
 RECT rcRightPanel;
 
 
 RECT rcTitlePanel;
 RECT rcLeftPanel;
 RECT rcRightPanel;
 
-WNDPROC fnOldBtn;
-
 
 INT_PTR CALLBACK
 MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
 INT_PTR CALLBACK
 MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
@@ -122,35 +118,35 @@ MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
 INT GetLocaleName(IN LCID Locale, OUT LPTSTR lpLCData, IN SIZE_T cchData)
 {
 
 INT GetLocaleName(IN LCID Locale, OUT LPTSTR lpLCData, IN SIZE_T cchData)
 {
-    INT ret, ret2;
+    INT cchRet, cchRet2;
 
     /* Try to retrieve the locale language name (LOCALE_SNAME is supported on Vista+) */
 
     /* Try to retrieve the locale language name (LOCALE_SNAME is supported on Vista+) */
-    ret = GetLocaleInfo(Locale, LOCALE_SNAME, lpLCData, cchData);
-    if (ret || (GetLastError() != ERROR_INVALID_FLAGS))
-        return ret;
+    cchRet = GetLocaleInfo(Locale, LOCALE_SNAME, lpLCData, cchData);
+    if (cchRet || (GetLastError() != ERROR_INVALID_FLAGS))
+        return cchRet;
 
     /*
      * We failed because LOCALE_SNAME was unrecognized, so try to manually build
      * a language name in the form xx-YY (WARNING: this method has its limitations).
      */
 
     /*
      * We failed because LOCALE_SNAME was unrecognized, so try to manually build
      * a language name in the form xx-YY (WARNING: this method has its limitations).
      */
-    ret = GetLocaleInfo(Locale, LOCALE_SISO639LANGNAME, lpLCData, cchData);
-    if (ret <= 1)
-        return ret;
+    cchRet = GetLocaleInfo(Locale, LOCALE_SISO639LANGNAME, lpLCData, cchData);
+    if (cchRet <= 1)
+        return cchRet;
 
 
-    lpLCData += (ret - 1);
-    cchData -= (ret - 1);
+    lpLCData += (cchRet - 1);
+    cchData -= (cchRet - 1);
     if (cchData <= 1)
     if (cchData <= 1)
-        return ret;
+        return cchRet;
 
     /* Try to get the second part; we add the '-' separator only if we succeed */
 
     /* Try to get the second part; we add the '-' separator only if we succeed */
-    ret2 = GetLocaleInfo(Locale, LOCALE_SISO3166CTRYNAME, lpLCData + 1, cchData - 1);
-    if (ret2 <= 1)
-        return ret;
-    ret += ret2; // 'ret' already counts '-'.
+    cchRet2 = GetLocaleInfo(Locale, LOCALE_SISO3166CTRYNAME, lpLCData + 1, cchData - 1);
+    if (cchRet2 <= 1)
+        return cchRet;
+    cchRet += cchRet2; // 'cchRet' already counts '-'.
 
     *lpLCData = _T('-');
 
 
     *lpLCData = _T('-');
 
-    return ret;
+    return cchRet;
 }
 
 VOID TranslateEscapes(IN OUT LPTSTR lpString)
 }
 
 VOID TranslateEscapes(IN OUT LPTSTR lpString)
@@ -175,6 +171,7 @@ VOID TranslateEscapes(IN OUT LPTSTR lpString)
                 // lpString = pEscape + 1; // Loop will stop at the next iteration.
                 break;
 
                 // lpString = pEscape + 1; // Loop will stop at the next iteration.
                 break;
 
+            /* New-line and carriage return */
             case _T('n'): case _T('r'):
             // case _T('\\'): // others?
             // So far we only need to deal with the newlines.
             case _T('n'): case _T('r'):
             // case _T('\\'): // others?
             // So far we only need to deal with the newlines.
@@ -188,6 +185,15 @@ VOID TranslateEscapes(IN OUT LPTSTR lpString)
                 break;
             }
 
                 break;
             }
 
+            /* \xhhhh hexadecimal character specification */
+            case _T('x'):
+            {
+                LPTSTR lpStringNew;
+                *pEscape = (WCHAR)_tcstoul(lpString + 1, &lpStringNew, 16);
+                memmove(lpString, lpStringNew, (_tcslen(lpStringNew) + 1) * sizeof(TCHAR));
+                break;
+            }
+
             /* Unknown escape sequence, ignore it */
             default:
                 lpString++;
             /* Unknown escape sequence, ignore it */
             default:
                 lpString++;
@@ -477,8 +483,10 @@ _tWinMain(HINSTANCE hInst,
           LPTSTR lpszCmdLine,
           int nCmdShow)
 {
           LPTSTR lpszCmdLine,
           int nCmdShow)
 {
+    HANDLE hMutex = NULL;
     WNDCLASSEX wndclass;
     MSG msg;
     WNDCLASSEX wndclass;
     MSG msg;
+    HWND hWndFocus;
     INT xPos, yPos;
     INT xWidth, yHeight;
     RECT rcWindow;
     INT xPos, yPos;
     INT xWidth, yHeight;
     RECT rcWindow;
@@ -486,7 +494,11 @@ _tWinMain(HINSTANCE hInst,
     HMENU hSystemMenu;
     DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
                     WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
     HMENU hSystemMenu;
     DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
                     WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
+
     BITMAP BitmapInfo;
     BITMAP BitmapInfo;
+    ULONG ulInnerWidth  = TITLE_WIDTH;
+    ULONG ulInnerHeight = (TITLE_WIDTH * 3) / 4;
+    ULONG ulTitleHeight = TITLE_HEIGHT + 3;
 
     UNREFERENCED_PARAMETER(hPrevInstance);
     UNREFERENCED_PARAMETER(lpszCmdLine);
 
     UNREFERENCED_PARAMETER(hPrevInstance);
     UNREFERENCED_PARAMETER(lpszCmdLine);
@@ -503,6 +515,22 @@ _tWinMain(HINSTANCE hInst,
 
     hInstance = hInst;
 
 
     hInstance = hInst;
 
+    /* Ensure only one instance is running */
+    hMutex = CreateMutexW(NULL, FALSE, szWindowClass);
+    if (hMutex && (GetLastError() == ERROR_ALREADY_EXISTS))
+    {
+        /* If already started, find its window */
+        hWndMain = FindWindowW(szWindowClass, NULL);
+
+        /* Activate window */
+        ShowWindow(hWndMain, SW_SHOWNORMAL);
+        SetForegroundWindow(hWndMain);
+
+        /* Close the mutex handle and quit */
+        CloseHandle(hMutex);
+        return 0;
+    }
+
     /* Load icons */
     hMainIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAIN));
 
     /* Load icons */
     hMainIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAIN));
 
@@ -518,12 +546,13 @@ _tWinMain(HINSTANCE hInst,
     wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
     wndclass.hbrBackground = NULL;
     wndclass.lpszMenuName = NULL;
     wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
     wndclass.hbrBackground = NULL;
     wndclass.lpszMenuName = NULL;
-    wndclass.lpszClassName = szFrameClass;
+    wndclass.lpszClassName = szWindowClass;
 
     RegisterClassEx(&wndclass);
 
 
     RegisterClassEx(&wndclass);
 
+    /* Load the banner bitmap, and compute the window dimensions */
     hTitleBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP));
     hTitleBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP));
-    if (hTitleBitmap != NULL)
+    if (hTitleBitmap)
     {
         GetObject(hTitleBitmap, sizeof(BITMAP), &BitmapInfo);
         ulInnerWidth = BitmapInfo.bmWidth;
     {
         GetObject(hTitleBitmap, sizeof(BITMAP), &BitmapInfo);
         ulInnerWidth = BitmapInfo.bmWidth;
@@ -539,9 +568,10 @@ _tWinMain(HINSTANCE hInst,
     rcWindow.right = ulInnerWidth - 1;
 
     AdjustWindowRect(&rcWindow, dwStyle, FALSE);
     rcWindow.right = ulInnerWidth - 1;
 
     AdjustWindowRect(&rcWindow, dwStyle, FALSE);
-    xWidth = rcWindow.right - rcWindow.left;
+    xWidth  = rcWindow.right - rcWindow.left;
     yHeight = rcWindow.bottom - rcWindow.top;
 
     yHeight = rcWindow.bottom - rcWindow.top;
 
+    /* Compute the window position */
     xPos = (GetSystemMetrics(SM_CXSCREEN) - xWidth) / 2;
     yPos = (GetSystemMetrics(SM_CYSCREEN) - yHeight) / 2;
 
     xPos = (GetSystemMetrics(SM_CXSCREEN) - xWidth) / 2;
     yPos = (GetSystemMetrics(SM_CYSCREEN) - yHeight) / 2;
 
@@ -564,7 +594,7 @@ _tWinMain(HINSTANCE hInst,
     LoadConfiguration();
 
     /* Create main window */
     LoadConfiguration();
 
     /* Create main window */
-    hWndMain = CreateWindow(szFrameClass,
+    hWndMain = CreateWindow(szWindowClass,
                             szAppTitle,
                             dwStyle,
                             xPos,
                             szAppTitle,
                             dwStyle,
                             xPos,
@@ -588,13 +618,34 @@ _tWinMain(HINSTANCE hInst,
 
     while (GetMessage(&msg, NULL, 0, 0) != FALSE)
     {
 
     while (GetMessage(&msg, NULL, 0, 0) != FALSE)
     {
-        TranslateMessage(&msg);
-        DispatchMessage(&msg);
+        /* Check for ENTER key presses */
+        if (msg.message == WM_KEYDOWN && msg.wParam == VK_RETURN)
+        {
+            /*
+             * The user pressed the ENTER key. Retrieve the handle to the
+             * child window that has the keyboard focus, and send it a
+             * WM_COMMAND message.
+             */
+            hWndFocus = GetFocus();
+            if (hWndFocus)
+            {
+                SendMessage(hWndMain, WM_COMMAND,
+                            (WPARAM)GetDlgCtrlID(hWndFocus), (LPARAM)hWndFocus);
+            }
+        }
+        /* Allow using keyboard navigation */
+        else if (!IsDialogMessage(hWndMain, &msg))
+        {
+            TranslateMessage(&msg);
+            DispatchMessage(&msg);
+        }
     }
 
     /* Cleanup */
     FreeResources();
 
     }
 
     /* Cleanup */
     FreeResources();
 
+    /* Close the mutex handle and quit */
+    CloseHandle(hMutex);
     return msg.wParam;
 }
 
     return msg.wParam;
 }
 
@@ -602,15 +653,53 @@ _tWinMain(HINSTANCE hInst,
 INT_PTR CALLBACK
 ButtonSubclassWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
 INT_PTR CALLBACK
 ButtonSubclassWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
+    static WPARAM wParamOld = 0;
+    static LPARAM lParamOld = 0;
+
     LONG i;
 
     if (uMsg == WM_MOUSEMOVE)
     {
     LONG i;
 
     if (uMsg == WM_MOUSEMOVE)
     {
-        i = GetWindowLongPtr(hWnd, GWL_ID);
+        /* Ignore mouse-move messages on the same point */
+        if ((wParam == wParamOld) && (lParam == lParamOld))
+            return 0;
+
+        /* Retrieve the topic index of this button */
+        i = GetWindowLongPtr(hWnd, GWLP_ID) - TOPIC_BTN_ID_BASE;
+
+        /*
+         * Change the focus to this button if the current topic index differs
+         * (we will receive WM_SETFOCUS afterwards).
+         */
+        if (nTopic != i)
+            SetFocus(hWnd);
+
+        wParamOld = wParam;
+        lParamOld = lParam;
+    }
+    else if (uMsg == WM_SETFOCUS)
+    {
+        /* Retrieve the topic index of this button */
+        i = GetWindowLongPtr(hWnd, GWLP_ID) - TOPIC_BTN_ID_BASE;
+
+        /* Change the current topic index and repaint the description panel */
         if (nTopic != i)
         {
             nTopic = i;
         if (nTopic != i)
         {
             nTopic = i;
-            SetFocus(hWnd);
+            InvalidateRect(hWndMain, &rcRightPanel, TRUE);
+        }
+    }
+    else if (uMsg == WM_KILLFOCUS)
+    {
+        /*
+         * We lost focus, either because the user changed button focus,
+         * or because the main window to which we belong went inactivated.
+         * If we are in the latter case, we ignore the focus change.
+         * If we are in the former case, we reset to the default topic.
+         */
+        if (GetParent(hWnd) == GetForegroundWindow())
+        {
+            nTopic = -1;
             InvalidateRect(hWndMain, &rcRightPanel, TRUE);
         }
     }
             InvalidateRect(hWndMain, &rcRightPanel, TRUE);
         }
     }
@@ -663,13 +752,6 @@ RunAction(INT nTopic)
 }
 
 
 }
 
 
-static VOID
-SubclassButton(HWND hWnd)
-{
-    fnOldBtn = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC, (DWORD_PTR)ButtonSubclassWndProc);
-}
-
-
 static DWORD
 GetButtonHeight(HDC hDC,
                 HFONT hFont,
 static DWORD
 GetButtonHeight(HDC hDC,
                 HFONT hFont,
@@ -706,8 +788,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
     UNREFERENCED_PARAMETER(lParam);
 
     hbrLightBlue = CreateSolidBrush(LIGHT_BLUE);
     UNREFERENCED_PARAMETER(lParam);
 
     hbrLightBlue = CreateSolidBrush(LIGHT_BLUE);
-    hbrDarkBlue = CreateSolidBrush(DARK_BLUE);
-    hbrRightPanel = CreateSolidBrush(RGB(255, 255, 255));
+    hbrDarkBlue  = CreateSolidBrush(DARK_BLUE);
 
     /* Topic title font */
     hFontTopicTitle = CreateFont(-18, 0, 0, 0, FW_NORMAL,
 
     /* Topic title font */
     hFontTopicTitle = CreateFont(-18, 0, 0, 0, FW_NORMAL,
@@ -717,7 +798,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
                                  CLIP_DEFAULT_PRECIS,
                                  DEFAULT_QUALITY,
                                  FF_DONTCARE,
                                  CLIP_DEFAULT_PRECIS,
                                  DEFAULT_QUALITY,
                                  FF_DONTCARE,
-                                 TEXT("Arial"));
+                                 TEXT("Tahoma"));
 
     /* Topic description font */
     hFontTopicDescription = CreateFont(-11, 0, 0, 0, FW_THIN,
 
     /* Topic description font */
     hFontTopicDescription = CreateFont(-11, 0, 0, 0, FW_THIN,
@@ -727,7 +808,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
                                        CLIP_DEFAULT_PRECIS,
                                        DEFAULT_QUALITY,
                                        FF_DONTCARE,
                                        CLIP_DEFAULT_PRECIS,
                                        DEFAULT_QUALITY,
                                        FF_DONTCARE,
-                                       TEXT("Arial"));
+                                       TEXT("Tahoma"));
 
     /* Topic button font */
     hFontTopicButton = CreateFont(-11, 0, 0, 0, FW_BOLD,
 
     /* Topic button font */
     hFontTopicButton = CreateFont(-11, 0, 0, 0, FW_BOLD,
@@ -737,10 +818,10 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
                                   CLIP_DEFAULT_PRECIS,
                                   DEFAULT_QUALITY,
                                   FF_DONTCARE,
                                   CLIP_DEFAULT_PRECIS,
                                   DEFAULT_QUALITY,
                                   FF_DONTCARE,
-                                  TEXT("Arial"));
+                                  TEXT("Tahoma"));
 
     /* Load title bitmap */
 
     /* Load title bitmap */
-    if (hTitleBitmap != NULL)
+    if (hTitleBitmap)
         hTitleBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP));
 
     /* Load topic bitmaps */
         hTitleBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP));
 
     /* Load topic bitmaps */
@@ -756,7 +837,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
     hdcMem = CreateCompatibleDC(ScreenDC);
     ReleaseDC(hWnd, ScreenDC);
 
     hdcMem = CreateCompatibleDC(ScreenDC);
     ReleaseDC(hWnd, ScreenDC);
 
-    /* Load and create buttons */
+    /* Load and create the menu buttons */
     dwTop = rcLeftPanel.top;
     for (i = 0; i < dwNumberTopics; i++)
     {
     dwTop = rcLeftPanel.top;
     for (i = 0; i < dwNumberTopics; i++)
     {
@@ -775,13 +856,12 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
                                                   rcLeftPanel.right - rcLeftPanel.left,
                                                   dwHeight,
                                                   hWnd,
                                                   rcLeftPanel.right - rcLeftPanel.left,
                                                   dwHeight,
                                                   hWnd,
-                                                  (HMENU)IntToPtr(i),
+                                                  (HMENU)IntToPtr(TOPIC_BTN_ID_BASE + i), // Similar to SetWindowLongPtr(GWLP_ID)
                                                   hInstance,
                                                   NULL);
                                                   hInstance,
                                                   NULL);
-            hWndDefaultTopic = pTopics[i]->hWndButton;
             nDefaultTopic = i;
             nDefaultTopic = i;
-            SubclassButton(pTopics[i]->hWndButton);
             SendMessage(pTopics[i]->hWndButton, WM_SETFONT, (WPARAM)hFontTopicButton, MAKELPARAM(TRUE, 0));
             SendMessage(pTopics[i]->hWndButton, WM_SETFONT, (WPARAM)hFontTopicButton, MAKELPARAM(TRUE, 0));
+            fnOldBtn = (WNDPROC)SetWindowLongPtr(pTopics[i]->hWndButton, GWLP_WNDPROC, (DWORD_PTR)ButtonSubclassWndProc);
         }
         else
         {
         }
         else
         {
@@ -791,34 +871,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
         dwTop += dwHeight;
     }
 
         dwTop += dwHeight;
     }
 
-    /* Create "Exit" button */
-    if (bDisplayExitBtn)
-    {
-        nLength = LoadString(hInstance, IDS_CLOSETEXT, szText, ARRAYSIZE(szText));
-        if (nLength > 0)
-        {
-            hWndCloseButton = CreateWindow(TEXT("BUTTON"),
-                                           szText,
-                                           WS_VISIBLE | WS_CHILD | BS_FLAT,
-                                           rcRightPanel.right - 10 - 57,
-                                           rcRightPanel.bottom - 10 - 21,
-                                           57,
-                                           21,
-                                           hWnd,
-                                           (HMENU)IDC_CLOSEBUTTON,
-                                           hInstance,
-                                           NULL);
-            hWndDefaultTopic = NULL;
-            nDefaultTopic = -1;
-            SendMessage(hWndCloseButton, WM_SETFONT, (WPARAM)hFontTopicButton, MAKELPARAM(TRUE, 0));
-        }
-        else
-        {
-            hWndCloseButton = NULL;
-        }
-    }
-
-    /* Create checkbox */
+    /* Create the checkbox */
     if (bDisplayCheckBox)
     {
         nLength = LoadString(hInstance, IDS_CHECKTEXT, szText, ARRAYSIZE(szText));
     if (bDisplayCheckBox)
     {
         nLength = LoadString(hInstance, IDS_CHECKTEXT, szText, ARRAYSIZE(szText));
@@ -835,7 +888,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
 
             hWndCheckButton = CreateWindow(TEXT("BUTTON"),
                                            szText,
 
             hWndCheckButton = CreateWindow(TEXT("BUTTON"),
                                            szText,
-                                           WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX /**/| BS_FLAT/**/,
+                                           WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX | BS_MULTILINE /**/| BS_FLAT/**/,
                                            rcLeftPanel.left + 8,
                                            rcLeftPanel.bottom - 8 - 13,
                                            rcLeftPanel.right - rcLeftPanel.left - 16,
                                            rcLeftPanel.left + 8,
                                            rcLeftPanel.bottom - 8 - 13,
                                            rcLeftPanel.right - rcLeftPanel.left - 16,
@@ -853,6 +906,32 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
         }
     }
 
         }
     }
 
+    /* Create the "Exit" button */
+    if (bDisplayExitBtn)
+    {
+        nLength = LoadString(hInstance, IDS_CLOSETEXT, szText, ARRAYSIZE(szText));
+        if (nLength > 0)
+        {
+            hWndCloseButton = CreateWindow(TEXT("BUTTON"),
+                                           szText,
+                                           WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | BS_FLAT,
+                                           rcRightPanel.right - 10 - 57,
+                                           rcRightPanel.bottom - 10 - 21,
+                                           57,
+                                           21,
+                                           hWnd,
+                                           (HMENU)IDC_CLOSEBUTTON,
+                                           hInstance,
+                                           NULL);
+            nDefaultTopic = -1;
+            SendMessage(hWndCloseButton, WM_SETFONT, (WPARAM)hFontTopicButton, MAKELPARAM(TRUE, 0));
+        }
+        else
+        {
+            hWndCloseButton = NULL;
+        }
+    }
+
     return 0;
 }
 
     return 0;
 }
 
@@ -866,9 +945,9 @@ OnCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
     {
         DestroyWindow(hWnd);
     }
     {
         DestroyWindow(hWnd);
     }
-    else if ((LOWORD(wParam) < dwNumberTopics))
+    else if ((LOWORD(wParam) - TOPIC_BTN_ID_BASE < dwNumberTopics))
     {
     {
-        if (RunAction(LOWORD(wParam)) == FALSE)
+        if (RunAction(LOWORD(wParam) - TOPIC_BTN_ID_BASE) == FALSE)
             DestroyWindow(hWnd); // Corresponds to a <exit> action.
     }
 
             DestroyWindow(hWnd); // Corresponds to a <exit> action.
     }
 
@@ -900,7 +979,6 @@ PaintBanner(HDC hdc, LPRECT rcPanel)
            rcPanel->right - rcPanel->left,
            3,
            PATCOPY);
            rcPanel->right - rcPanel->left,
            3,
            PATCOPY);
-
     SelectObject(hdc, hOldBrush);
 }
 
     SelectObject(hdc, hOldBrush);
 }
 
@@ -939,7 +1017,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
     SelectObject(hdc, hOldBrush);
 
     /* Right panel */
     SelectObject(hdc, hOldBrush);
 
     /* Right panel */
-    hOldBrush = (HBRUSH)SelectObject(hdc, WHITE_BRUSH);
+    hOldBrush = (HBRUSH)SelectObject(hdc, GetStockObject(WHITE_BRUSH));
     PatBlt(hdc,
            rcRightPanel.left,
            rcRightPanel.top,
     PatBlt(hdc,
            rcRightPanel.left,
            rcRightPanel.top,
@@ -957,7 +1035,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
     DeleteObject(hPen);
 
     /* Draw topic bitmap */
     DeleteObject(hPen);
 
     /* Draw topic bitmap */
-    if ((nTopic == -1) && (hDefaultTopicBitmap != NULL))
+    if ((nTopic == -1) && (hDefaultTopicBitmap))
     {
         GetObject(hDefaultTopicBitmap, sizeof(BITMAP), &bmpInfo);
         hOldBitmap = (HBITMAP)SelectObject(hdcMem, hDefaultTopicBitmap);
     {
         GetObject(hDefaultTopicBitmap, sizeof(BITMAP), &bmpInfo);
         hOldBitmap = (HBITMAP)SelectObject(hdcMem, hDefaultTopicBitmap);
@@ -971,7 +1049,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
                0,
                SRCCOPY);
     }
                0,
                SRCCOPY);
     }
-    else if ((nTopic != -1) && (pTopics[nTopic]->hBitmap != NULL))
+    else if ((nTopic != -1) && (pTopics[nTopic]->hBitmap))
     {
         GetObject(pTopics[nTopic]->hBitmap, sizeof(BITMAP), &bmpInfo);
         hOldBitmap = (HBITMAP)SelectObject(hdcMem, pTopics[nTopic]->hBitmap);
     {
         GetObject(pTopics[nTopic]->hBitmap, sizeof(BITMAP), &bmpInfo);
         hOldBitmap = (HBITMAP)SelectObject(hdcMem, pTopics[nTopic]->hBitmap);
@@ -1032,7 +1110,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
     rcDescription.bottom = rcRightPanel.bottom - 20;
 
     SelectObject(hdc, hFontTopicDescription);
     rcDescription.bottom = rcRightPanel.bottom - 20;
 
     SelectObject(hdc, hFontTopicDescription);
-    SetTextColor(hdc, RGB(0, 0, 0));
+    SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT));
     DrawText(hdc, lpDesc, -1, &rcDescription, DT_TOP | DT_WORDBREAK);
 
     SetBkMode(hdc, OPAQUE);
     DrawText(hdc, lpDesc, -1, &rcDescription, DT_TOP | DT_WORDBREAK);
 
     SetBkMode(hdc, OPAQUE);
@@ -1059,61 +1137,89 @@ OnDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
     UNREFERENCED_PARAMETER(hWnd);
     UNREFERENCED_PARAMETER(wParam);
 
     UNREFERENCED_PARAMETER(hWnd);
     UNREFERENCED_PARAMETER(wParam);
 
+#if 0
+    /* Neither the checkbox button nor the close button implement owner-drawing */
+    if (lpDis->hwndItem == hWndCheckButton)
+        return 0;
     if (lpDis->hwndItem == hWndCloseButton)
     {
         DrawFrameControl(lpDis->hDC,
                          &lpDis->rcItem,
                          DFC_BUTTON,
                          DFCS_BUTTONPUSH | DFCS_FLAT);
     if (lpDis->hwndItem == hWndCloseButton)
     {
         DrawFrameControl(lpDis->hDC,
                          &lpDis->rcItem,
                          DFC_BUTTON,
                          DFCS_BUTTONPUSH | DFCS_FLAT);
+        return TRUE;
     }
     }
+#endif
+
+    if (lpDis->CtlID == (ULONG)(TOPIC_BTN_ID_BASE + nTopic))
+        hOldBrush = (HBRUSH)SelectObject(lpDis->hDC, GetStockObject(WHITE_BRUSH));
     else
     else
-    {
-        if (lpDis->CtlID == (ULONG)nTopic)
-            hOldBrush = (HBRUSH)SelectObject(lpDis->hDC, hbrRightPanel);
-        else
-            hOldBrush = (HBRUSH)SelectObject(lpDis->hDC, hbrLightBlue);
-
-        PatBlt(lpDis->hDC,
-               lpDis->rcItem.left,
-               lpDis->rcItem.top,
-               lpDis->rcItem.right,
-               lpDis->rcItem.bottom,
-               PATCOPY);
-        SelectObject(lpDis->hDC, hOldBrush);
-
-        hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
-        hOldPen = (HPEN)SelectObject(lpDis->hDC, hPen);
-        MoveToEx(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.bottom - 1, NULL);
-        LineTo(lpDis->hDC, lpDis->rcItem.right, lpDis->rcItem.bottom - 1);
-        SelectObject(lpDis->hDC, hOldPen);
-        DeleteObject(hPen);
-
-        InflateRect(&lpDis->rcItem, -10, -4);
-        OffsetRect(&lpDis->rcItem, 0, 1);
-        GetWindowText(lpDis->hwndItem, szText, ARRAYSIZE(szText));
-        SetTextColor(lpDis->hDC, RGB(0, 0, 0));
-        iBkMode = SetBkMode(lpDis->hDC, TRANSPARENT);
-        DrawText(lpDis->hDC, szText, -1, &lpDis->rcItem, DT_TOP | DT_LEFT | DT_WORDBREAK);
-        SetBkMode(lpDis->hDC, iBkMode);
-    }
+        hOldBrush = (HBRUSH)SelectObject(lpDis->hDC, hbrLightBlue);
 
 
-    return 0;
+    PatBlt(lpDis->hDC,
+           lpDis->rcItem.left,
+           lpDis->rcItem.top,
+           lpDis->rcItem.right,
+           lpDis->rcItem.bottom,
+           PATCOPY);
+    SelectObject(lpDis->hDC, hOldBrush);
+
+    hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
+    hOldPen = (HPEN)SelectObject(lpDis->hDC, hPen);
+    MoveToEx(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.bottom - 1, NULL);
+    LineTo(lpDis->hDC, lpDis->rcItem.right, lpDis->rcItem.bottom - 1);
+    SelectObject(lpDis->hDC, hOldPen);
+    DeleteObject(hPen);
+
+    InflateRect(&lpDis->rcItem, -10, -4);
+    OffsetRect(&lpDis->rcItem, 0, 1);
+    GetWindowText(lpDis->hwndItem, szText, ARRAYSIZE(szText));
+    SetTextColor(lpDis->hDC, GetSysColor(COLOR_WINDOWTEXT));
+    iBkMode = SetBkMode(lpDis->hDC, TRANSPARENT);
+    DrawText(lpDis->hDC, szText, -1, &lpDis->rcItem, DT_TOP | DT_LEFT | DT_WORDBREAK);
+    SetBkMode(lpDis->hDC, iBkMode);
+
+    return TRUE;
 }
 
 
 static LRESULT
 OnMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam)
 {
 }
 
 
 static LRESULT
 OnMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam)
 {
-    UNREFERENCED_PARAMETER(wParam);
-    UNREFERENCED_PARAMETER(lParam);
+    static WPARAM wParamOld = 0;
+    static LPARAM lParamOld = 0;
 
 
+    /* Ignore mouse-move messages on the same point */
+    if ((wParam == wParamOld) && (lParam == lParamOld))
+        return 0;
+
+    /*
+     * If the user moves the mouse over the main window, outside of the
+     * topic buttons, reset the current topic to the default one and
+     * change the focus to some other default button (to keep keyboard
+     * navigation possible).
+     */
     if (nTopic != -1)
     {
     if (nTopic != -1)
     {
+        INT nOldTopic = nTopic;
         nTopic = -1;
         nTopic = -1;
-        SetFocus(hWnd);
+        /* Also repaint the buttons, otherwise nothing repaints... */
+        InvalidateRect(pTopics[nOldTopic]->hWndButton, NULL, TRUE);
+
+        /* Set the focus to some other default button */
+        if (hWndCheckButton)
+            SetFocus(hWndCheckButton);
+        else if (hWndCloseButton)
+            SetFocus(hWndCloseButton);
+        // SetFocus(hWnd);
+
+        /* Repaint the description panel */
         InvalidateRect(hWndMain, &rcRightPanel, TRUE);
     }
 
         InvalidateRect(hWndMain, &rcRightPanel, TRUE);
     }
 
+    wParamOld = wParam;
+    lParamOld = lParam;
+
     return 0;
 }
 
     return 0;
 }
 
@@ -1125,7 +1231,7 @@ OnCtlColorStatic(HWND hWnd, WPARAM wParam, LPARAM lParam)
 
     if ((HWND)lParam == hWndCheckButton)
     {
 
     if ((HWND)lParam == hWndCheckButton)
     {
-        SetBkColor((HDC)wParam, LIGHT_BLUE);
+        SetBkMode((HDC)wParam, TRANSPARENT);
         return (LRESULT)hbrLightBlue;
     }
 
         return (LRESULT)hbrLightBlue;
     }
 
@@ -1137,11 +1243,24 @@ static LRESULT
 OnActivate(HWND hWnd, WPARAM wParam, LPARAM lParam)
 {
     UNREFERENCED_PARAMETER(hWnd);
 OnActivate(HWND hWnd, WPARAM wParam, LPARAM lParam)
 {
     UNREFERENCED_PARAMETER(hWnd);
-    UNREFERENCED_PARAMETER(wParam);
     UNREFERENCED_PARAMETER(lParam);
 
     UNREFERENCED_PARAMETER(lParam);
 
-    nTopic = -1;
-    InvalidateRect(hWndMain, &rcRightPanel, TRUE);
+    if (wParam != WA_INACTIVE)
+    {
+        /*
+         * The main window is re-activated, set the focus back to
+         * either the current topic or a default button.
+         */
+        if (nTopic != -1)
+            SetFocus(pTopics[nTopic]->hWndButton);
+        else if (hWndCheckButton)
+            SetFocus(hWndCheckButton);
+        else if (hWndCloseButton)
+            SetFocus(hWndCloseButton);
+
+        // InvalidateRect(hWndMain, &rcRightPanel, TRUE);
+    }
+
     return 0;
 }
 
     return 0;
 }
 
@@ -1157,14 +1276,14 @@ OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
 
     for (i = 0; i < dwNumberTopics; i++)
     {
 
     for (i = 0; i < dwNumberTopics; i++)
     {
-        if (pTopics[i]->hWndButton != NULL)
+        if (pTopics[i]->hWndButton)
             DestroyWindow(pTopics[i]->hWndButton);
     }
 
             DestroyWindow(pTopics[i]->hWndButton);
     }
 
-    if (hWndCloseButton != NULL)
+    if (hWndCloseButton)
         DestroyWindow(hWndCloseButton);
 
         DestroyWindow(hWndCloseButton);
 
-    if (hWndCheckButton != NULL)
+    if (hWndCheckButton)
         DestroyWindow(hWndCheckButton);
 
     DeleteDC(hdcMem);
         DestroyWindow(hWndCheckButton);
 
     DeleteDC(hdcMem);
@@ -1174,7 +1293,7 @@ OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
     DeleteObject(hTitleBitmap);
     for (i = 0; i < dwNumberTopics; i++)
     {
     DeleteObject(hTitleBitmap);
     for (i = 0; i < dwNumberTopics; i++)
     {
-        if (pTopics[i]->hBitmap != NULL)
+        if (pTopics[i]->hBitmap)
             DeleteObject(pTopics[i]->hBitmap);
     }
 
             DeleteObject(pTopics[i]->hBitmap);
     }
 
@@ -1182,12 +1301,11 @@ OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
     DeleteObject(hFontTopicDescription);
     DeleteObject(hFontTopicButton);
 
     DeleteObject(hFontTopicDescription);
     DeleteObject(hFontTopicButton);
 
-    if (hFontCheckButton != NULL)
+    if (hFontCheckButton)
         DeleteObject(hFontCheckButton);
 
     DeleteObject(hbrLightBlue);
     DeleteObject(hbrDarkBlue);
         DeleteObject(hFontCheckButton);
 
     DeleteObject(hbrLightBlue);
     DeleteObject(hbrDarkBlue);
-    DeleteObject(hbrRightPanel);
 
     return 0;
 }
 
     return 0;
 }