Author: hbelusca
Date: Wed Jul 5 02:02:43 2017
New Revision: 75282
URL:
http://svn.reactos.org/svn/reactos?rev=75282&view=rev
Log:
[WELCOME]: UI improvements:
- 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).
Modified:
trunk/reactos/base/setup/welcome/lang/bg-BG.rc
trunk/reactos/base/setup/welcome/lang/cs-CZ.rc
trunk/reactos/base/setup/welcome/lang/da-DK.rc
trunk/reactos/base/setup/welcome/lang/de-DE.rc
trunk/reactos/base/setup/welcome/lang/el-GR.rc
trunk/reactos/base/setup/welcome/lang/en-US.rc
trunk/reactos/base/setup/welcome/lang/es-ES.rc
trunk/reactos/base/setup/welcome/lang/et-EE.rc
trunk/reactos/base/setup/welcome/lang/fr-FR.rc
trunk/reactos/base/setup/welcome/lang/hu-HU.rc
trunk/reactos/base/setup/welcome/lang/id-ID.rc
trunk/reactos/base/setup/welcome/lang/it-IT.rc
trunk/reactos/base/setup/welcome/lang/ja-JP.rc
trunk/reactos/base/setup/welcome/lang/lt-LT.rc
trunk/reactos/base/setup/welcome/lang/ms-MY.rc
trunk/reactos/base/setup/welcome/lang/nl-NL.rc
trunk/reactos/base/setup/welcome/lang/no-NO.rc
trunk/reactos/base/setup/welcome/lang/pl-PL.rc
trunk/reactos/base/setup/welcome/lang/pt-BR.rc
trunk/reactos/base/setup/welcome/lang/ro-RO.rc
trunk/reactos/base/setup/welcome/lang/ru-RU.rc
trunk/reactos/base/setup/welcome/lang/sk-SK.rc
trunk/reactos/base/setup/welcome/lang/sq-AL.rc
trunk/reactos/base/setup/welcome/lang/sv-SE.rc
trunk/reactos/base/setup/welcome/lang/tr-TR.rc
trunk/reactos/base/setup/welcome/lang/uk-UA.rc
trunk/reactos/base/setup/welcome/lang/zh-CN.rc
trunk/reactos/base/setup/welcome/lang/zh-TW.rc
trunk/reactos/base/setup/welcome/resource.h
trunk/reactos/base/setup/welcome/welcome.c
Modified: trunk/reactos/base/setup/welcome/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/bg…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/bg-BG.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
IDS_DEFAULTTOPICTITLE "ReactOS"
IDS_DEFAULTTOPICDESC "ÐобÑе доÑли в опеÑаÑионна
ÑиÑÑема ReactOS.\n\nÐзбеÑеÑе Ñи Ð¾Ñ ÑемиÑе в лÑво."
- IDS_CHECKTEXT "Ðоказвай оÑново Ñози пÑозоÑеÑ"
- IDS_CLOSETEXT "ÐзÑ
од"
+ IDS_CHECKTEXT "&Ðоказвай оÑново Ñози
пÑозоÑеÑ"
+ IDS_CLOSETEXT "&ÐзÑ
од"
END
/* Topic buttons */
STRINGTABLE
BEGIN
- IDS_TOPICBUTTON0 "ÐнÑÑалиÑане на ReactOS"
- IDS_TOPICBUTTON1 "Разгледай Ñова CD"
- IDS_TOPICBUTTON2 "ÐзÑ
од"
+ IDS_TOPICBUTTON0 "ÐнÑÑалиÑане на &ReactOS"
+ IDS_TOPICBUTTON1 "&Разгледай Ñова CD"
+ IDS_TOPICBUTTON2 "&ÐзÑ
од"
END
/* Topic titles */
Modified: trunk/reactos/base/setup/welcome/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/cs…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/cs-CZ.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/da…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/da-DK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/da-DK.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/de…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/de-DE.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/el…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/el-GR.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- IDS_TOPICBUTTON0 "ÎγκαÏάÏÏαÏη ÏοÏ
ReactOS"
- IDS_TOPICBUTTON1 "ÎξεÏεÏνηÏη αÏ
ÏÎ¿Ï ÏοÏ
CD"
- IDS_TOPICBUTTON2 "ÎξοδοÏ"
+ IDS_TOPICBUTTON0 "ÎγκαÏάÏÏαÏη ÏοÏ
&ReactOS"
+ IDS_TOPICBUTTON1 "ÎξεÏεÏνηÏη αÏ
ÏÎ¿Ï ÏοÏ
&CD"
+ IDS_TOPICBUTTON2 "&ÎξοδοÏ"
END
/* Topic titles */
Modified: trunk/reactos/base/setup/welcome/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/en…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/en-US.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/es…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/es-ES.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/et-EE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/et…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/et-EE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/et-EE.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/fr…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/fr-FR.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/hu…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/hu-HU.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/id…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/id-ID.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/it…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/it-IT.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ja…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/ja-JP.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,8 +9,8 @@
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 */
@@ -18,7 +18,7 @@
BEGIN
IDS_TOPICBUTTON0 "ReactOS ãã¤ã³ã¹ãã¼ã«ãã"
IDS_TOPICBUTTON1 "ãã® CD ãéã"
- IDS_TOPICBUTTON2 "çµäº"
+ IDS_TOPICBUTTON2 "çµäº(&Q)"
END
/* Topic titles */
Modified: trunk/reactos/base/setup/welcome/lang/lt-LT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/lt…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/lt-LT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/lt-LT.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/ms-MY.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ms…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/ms-MY.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/ms-MY.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/nl…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/nl-NL.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/no…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/no-NO.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/pl…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/pl-PL.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -15,16 +15,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/pt…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/pt-BR.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ro…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/ro-RO.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -16,16 +16,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ru…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/ru-RU.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -9,16 +9,16 @@
IDS_DEFAULTTOPICTITLE "ReactOS"
IDS_DEFAULTTOPICDESC "ÐобÑо пожаловаÑÑ Ð²
ReactOS.\n\nÐÑбеÑиÑе пÑÐ½ÐºÑ Ñлева."
- IDS_CHECKTEXT "ÐоказÑваÑÑ ÑÑо окно Ñнова"
- IDS_CLOSETEXT "ÐÑÑ
од"
+ IDS_CHECKTEXT "&ÐоказÑваÑÑ ÑÑо окно Ñнова"
+ IDS_CLOSETEXT "&ÐÑÑ
од"
END
/* Topic buttons */
STRINGTABLE
BEGIN
- IDS_TOPICBUTTON0 "УÑÑановиÑÑ ReactOS"
- IDS_TOPICBUTTON1 "ÐÐ±Ð·Ð¾Ñ Ð´Ð¸Ñка"
- IDS_TOPICBUTTON2 "ÐÑÑ
од"
+ IDS_TOPICBUTTON0 "&УÑÑановиÑÑ ReactOS"
+ IDS_TOPICBUTTON1 "&ÐÐ±Ð·Ð¾Ñ Ð´Ð¸Ñка"
+ IDS_TOPICBUTTON2 "&ÐÑÑ
од"
END
/* Topic titles */
Modified: trunk/reactos/base/setup/welcome/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/sk…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/sk-SK.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/sq…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/sq-AL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/sq-AL.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -13,16 +13,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/sv…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/sv-SE.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/tr…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/tr-TR.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- 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 */
Modified: trunk/reactos/base/setup/welcome/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/uk…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/uk-UA.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
IDS_DEFAULTTOPICTITLE "ReactOS"
IDS_DEFAULTTOPICDESC "ÐаÑкаво пÑоÑимо до опеÑаÑÑйноÑ
ÑиÑÑеми ReactOS.\n\nÐлаÑнÑÑÑ Ð¿Ð¾ ÑÐµÐ¼Ñ Ð»ÑвоÑÑÑ"
- IDS_CHECKTEXT "ÐоказÑваÑи Ñей дÑалог знов"
- IDS_CLOSETEXT "ÐиÑ
Ñд"
+ IDS_CHECKTEXT "&ÐоказÑваÑи Ñей дÑалог знов"
+ IDS_CLOSETEXT "&ÐиÑ
Ñд"
END
/* Topic buttons */
STRINGTABLE
BEGIN
- IDS_TOPICBUTTON0 "ÐÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ ReactOS"
- IDS_TOPICBUTTON1 "ÐглÑд ÑÑого CD"
- IDS_TOPICBUTTON2 "ÐиÑ
Ñд"
+ IDS_TOPICBUTTON0 "ÐÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ &ReactOS"
+ IDS_TOPICBUTTON1 "&ÐглÑд ÑÑого CD"
+ IDS_TOPICBUTTON2 "&ÐиÑ
Ñд"
END
/* Topic titles */
Modified: trunk/reactos/base/setup/welcome/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/zh…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/zh-CN.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- IDS_TOPICBUTTON0 "å®è£
ReactOS"
- IDS_TOPICBUTTON1 "æµè§ CD"
- IDS_TOPICBUTTON2 "éåº "
+ IDS_TOPICBUTTON0 "å®è£
&ReactOS"
+ IDS_TOPICBUTTON1 "æµè§ &CD"
+ IDS_TOPICBUTTON2 "éåº(&Q)"
END
/* Topic titles */
Modified: trunk/reactos/base/setup/welcome/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/zh…
==============================================================================
--- trunk/reactos/base/setup/welcome/lang/zh-TW.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/lang/zh-TW.rc [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -11,16 +11,16 @@
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
- IDS_TOPICBUTTON0 "å®è£ ReactOS"
- IDS_TOPICBUTTON1 "ç覽 CD"
- IDS_TOPICBUTTON2 "éåº "
+ IDS_TOPICBUTTON0 "å®è£ &ReactOS"
+ IDS_TOPICBUTTON1 "ç覽 &CD"
+ IDS_TOPICBUTTON2 "éåº(&Q)"
END
/* Topic titles */
Modified: trunk/reactos/base/setup/welcome/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/resourc…
==============================================================================
--- trunk/reactos/base/setup/welcome/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/resource.h [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -1,41 +1,44 @@
#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
+/* Internal button window IDs, below TOPIC_BTN_ID_BASE == 100 */
+#define IDC_CHECKBUTTON 98
+#define IDC_CLOSEBUTTON 99
-#define IDS_TOPICBUTTON0 1010
-#define IDS_TOPICBUTTON1 1011
-#define IDS_TOPICBUTTON2 1012
+/* 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_TOPICTITLE0 1020
-#define IDS_TOPICTITLE1 1021
-#define IDS_TOPICTITLE2 1022
+#define IDS_TOPICBUTTON0 1010
+#define IDS_TOPICBUTTON1 1011
+#define IDS_TOPICBUTTON2 1012
-#define IDS_TOPICDESC0 1030
-#define IDS_TOPICDESC1 1031
-#define IDS_TOPICDESC2 1032
+#define IDS_TOPICTITLE0 1020
+#define IDS_TOPICTITLE1 1021
+#define IDS_TOPICTITLE2 1022
-#define IDS_TOPICACTION0 1040
-#define IDS_TOPICACTION1 1041
-#define IDS_TOPICACTION2 1042
+#define IDS_TOPICDESC0 1030
+#define IDS_TOPICDESC1 1031
+#define IDS_TOPICDESC2 1032
-// #define IDS_TOPICOPTION0 1050
-// #define IDS_TOPICOPTION1 1051
-// #define IDS_TOPICOPTION2 1052
+#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 */
-#define IDB_TITLEBITMAP 101
-#define IDB_DEFAULTTOPICBITMAP 102
+#define IDB_TITLEBITMAP 101
+#define IDB_DEFAULTTOPICBITMAP 102
-// #define IDB_TOPICBITMAP0 110
-// #define IDB_TOPICBITMAP1 111
-// #define IDB_TOPICBITMAP2 112
+// #define IDB_TOPICBITMAP0 110
+// #define IDB_TOPICBITMAP1 111
+// #define IDB_TOPICBITMAP2 112
-#define IDC_CLOSEBUTTON 2000
-#define IDC_CHECKBUTTON 2001
-
+/* Icons */
#define IDI_MAIN 3000
Modified: trunk/reactos/base/setup/welcome/welcome.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/welcome…
==============================================================================
--- trunk/reactos/base/setup/welcome/welcome.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/welcome.c [iso-8859-1] Wed Jul 5 02:02:43 2017
@@ -52,24 +52,15 @@
/* GLOBALS ******************************************************************/
-TCHAR szFrameClass[] = TEXT("WelcomeWindowClass");
+TCHAR szWindowClass[] = TEXT("WelcomeWindowClass");
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 hWndCheckButton = NULL;
HWND hWndCloseButton = NULL;
-HWND hWndCheckButton = NULL;
BOOL bDisplayCheckBox = FALSE; // FIXME: We should also repaint the OS version
correctly!
BOOL bDisplayExitBtn = TRUE;
@@ -92,11 +83,19 @@
DWORD dwNumberTopics = 0;
PTOPIC* pTopics = NULL;
+WNDPROC fnOldBtn;
+
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
+
+HDC hdcMem = NULL;
+HBITMAP hTitleBitmap = NULL;
+HBITMAP hDefaultTopicBitmap = NULL;
HFONT hFontTopicButton;
HFONT hFontTopicTitle;
@@ -105,14 +104,11 @@
HBRUSH hbrLightBlue;
HBRUSH hbrDarkBlue;
-HBRUSH hbrRightPanel;
RECT rcTitlePanel;
RECT rcLeftPanel;
RECT rcRightPanel;
-WNDPROC fnOldBtn;
-
INT_PTR CALLBACK
MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
@@ -122,35 +118,35 @@
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+) */
- 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).
*/
- ret = GetLocaleInfo(Locale, LOCALE_SISO639LANGNAME, lpLCData, cchData);
- if (ret <= 1)
- return ret;
-
- lpLCData += (ret - 1);
- cchData -= (ret - 1);
+ cchRet = GetLocaleInfo(Locale, LOCALE_SISO639LANGNAME, lpLCData, cchData);
+ if (cchRet <= 1)
+ return cchRet;
+
+ lpLCData += (cchRet - 1);
+ cchData -= (cchRet - 1);
if (cchData <= 1)
- return ret;
+ return cchRet;
/* 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('-');
- return ret;
+ return cchRet;
}
VOID TranslateEscapes(IN OUT LPTSTR lpString)
@@ -175,6 +171,7 @@
// 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.
@@ -185,6 +182,15 @@
*pEscape = _T('\r');
memmove(lpString, lpString + 1, (_tcslen(lpString + 1) + 1) *
sizeof(TCHAR));
+ 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;
}
@@ -477,8 +483,10 @@
LPTSTR lpszCmdLine,
int nCmdShow)
{
+ HANDLE hMutex = NULL;
WNDCLASSEX wndclass;
MSG msg;
+ HWND hWndFocus;
INT xPos, yPos;
INT xWidth, yHeight;
RECT rcWindow;
@@ -486,7 +494,11 @@
HMENU hSystemMenu;
DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
+
BITMAP BitmapInfo;
+ ULONG ulInnerWidth = TITLE_WIDTH;
+ ULONG ulInnerHeight = (TITLE_WIDTH * 3) / 4;
+ ULONG ulTitleHeight = TITLE_HEIGHT + 3;
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpszCmdLine);
@@ -502,6 +514,22 @@
}
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));
@@ -518,12 +546,13 @@
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = NULL;
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = szFrameClass;
+ wndclass.lpszClassName = szWindowClass;
RegisterClassEx(&wndclass);
+ /* Load the banner bitmap, and compute the window dimensions */
hTitleBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP));
- if (hTitleBitmap != NULL)
+ if (hTitleBitmap)
{
GetObject(hTitleBitmap, sizeof(BITMAP), &BitmapInfo);
ulInnerWidth = BitmapInfo.bmWidth;
@@ -539,9 +568,10 @@
rcWindow.right = ulInnerWidth - 1;
AdjustWindowRect(&rcWindow, dwStyle, FALSE);
- xWidth = rcWindow.right - rcWindow.left;
+ xWidth = rcWindow.right - rcWindow.left;
yHeight = rcWindow.bottom - rcWindow.top;
+ /* Compute the window position */
xPos = (GetSystemMetrics(SM_CXSCREEN) - xWidth) / 2;
yPos = (GetSystemMetrics(SM_CYSCREEN) - yHeight) / 2;
@@ -564,7 +594,7 @@
LoadConfiguration();
/* Create main window */
- hWndMain = CreateWindow(szFrameClass,
+ hWndMain = CreateWindow(szWindowClass,
szAppTitle,
dwStyle,
xPos,
@@ -588,13 +618,34 @@
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();
+ /* Close the mutex handle and quit */
+ CloseHandle(hMutex);
return msg.wParam;
}
@@ -602,15 +653,53 @@
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)
{
- 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;
- 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);
}
}
@@ -660,13 +749,6 @@
ShellExecute(NULL, NULL, AppName, Parameters, NULL, SW_SHOWDEFAULT);
return TRUE;
-}
-
-
-static VOID
-SubclassButton(HWND hWnd)
-{
- fnOldBtn = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC,
(DWORD_PTR)ButtonSubclassWndProc);
}
@@ -706,8 +788,7 @@
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,
@@ -717,7 +798,7 @@
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
FF_DONTCARE,
- TEXT("Arial"));
+ TEXT("Tahoma"));
/* Topic description font */
hFontTopicDescription = CreateFont(-11, 0, 0, 0, FW_THIN,
@@ -727,7 +808,7 @@
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
FF_DONTCARE,
- TEXT("Arial"));
+ TEXT("Tahoma"));
/* Topic button font */
hFontTopicButton = CreateFont(-11, 0, 0, 0, FW_BOLD,
@@ -737,10 +818,10 @@
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
FF_DONTCARE,
- TEXT("Arial"));
+ TEXT("Tahoma"));
/* Load title bitmap */
- if (hTitleBitmap != NULL)
+ if (hTitleBitmap)
hTitleBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP));
/* Load topic bitmaps */
@@ -756,7 +837,7 @@
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++)
{
@@ -775,13 +856,12 @@
rcLeftPanel.right - rcLeftPanel.left,
dwHeight,
hWnd,
- (HMENU)IntToPtr(i),
+ (HMENU)IntToPtr(TOPIC_BTN_ID_BASE + i),
// Similar to SetWindowLongPtr(GWLP_ID)
hInstance,
NULL);
- hWndDefaultTopic = pTopics[i]->hWndButton;
nDefaultTopic = i;
- SubclassButton(pTopics[i]->hWndButton);
SendMessage(pTopics[i]->hWndButton, WM_SETFONT, (WPARAM)hFontTopicButton,
MAKELPARAM(TRUE, 0));
+ fnOldBtn = (WNDPROC)SetWindowLongPtr(pTopics[i]->hWndButton, GWLP_WNDPROC,
(DWORD_PTR)ButtonSubclassWndProc);
}
else
{
@@ -791,34 +871,7 @@
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));
@@ -835,7 +888,7 @@
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,
@@ -853,6 +906,32 @@
}
}
+ /* 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;
}
@@ -866,9 +945,9 @@
{
DestroyWindow(hWnd);
}
- else if ((LOWORD(wParam) < dwNumberTopics))
- {
- if (RunAction(LOWORD(wParam)) == FALSE)
+ else if ((LOWORD(wParam) - TOPIC_BTN_ID_BASE < dwNumberTopics))
+ {
+ if (RunAction(LOWORD(wParam) - TOPIC_BTN_ID_BASE) == FALSE)
DestroyWindow(hWnd); // Corresponds to a <exit> action.
}
@@ -900,7 +979,6 @@
rcPanel->right - rcPanel->left,
3,
PATCOPY);
-
SelectObject(hdc, hOldBrush);
}
@@ -939,7 +1017,7 @@
SelectObject(hdc, hOldBrush);
/* Right panel */
- hOldBrush = (HBRUSH)SelectObject(hdc, WHITE_BRUSH);
+ hOldBrush = (HBRUSH)SelectObject(hdc, GetStockObject(WHITE_BRUSH));
PatBlt(hdc,
rcRightPanel.left,
rcRightPanel.top,
@@ -957,7 +1035,7 @@
DeleteObject(hPen);
/* Draw topic bitmap */
- if ((nTopic == -1) && (hDefaultTopicBitmap != NULL))
+ if ((nTopic == -1) && (hDefaultTopicBitmap))
{
GetObject(hDefaultTopicBitmap, sizeof(BITMAP), &bmpInfo);
hOldBitmap = (HBITMAP)SelectObject(hdcMem, hDefaultTopicBitmap);
@@ -971,7 +1049,7 @@
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);
@@ -1032,7 +1110,7 @@
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);
@@ -1059,60 +1137,88 @@
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);
- }
+ return TRUE;
+ }
+#endif
+
+ if (lpDis->CtlID == (ULONG)(TOPIC_BTN_ID_BASE + nTopic))
+ hOldBrush = (HBRUSH)SelectObject(lpDis->hDC, GetStockObject(WHITE_BRUSH));
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);
- }
-
- return 0;
+ 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, 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)
{
- 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)
{
+ INT nOldTopic = nTopic;
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);
}
+
+ wParamOld = wParam;
+ lParamOld = lParam;
return 0;
}
@@ -1125,7 +1231,7 @@
if ((HWND)lParam == hWndCheckButton)
{
- SetBkColor((HDC)wParam, LIGHT_BLUE);
+ SetBkMode((HDC)wParam, TRANSPARENT);
return (LRESULT)hbrLightBlue;
}
@@ -1136,35 +1242,48 @@
static LRESULT
OnActivate(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
+ UNREFERENCED_PARAMETER(hWnd);
+ UNREFERENCED_PARAMETER(lParam);
+
+ 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;
+}
+
+
+static LRESULT
+OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
+{
+ UINT i;
+
UNREFERENCED_PARAMETER(hWnd);
UNREFERENCED_PARAMETER(wParam);
UNREFERENCED_PARAMETER(lParam);
- nTopic = -1;
- InvalidateRect(hWndMain, &rcRightPanel, TRUE);
- return 0;
-}
-
-
-static LRESULT
-OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
-{
- UINT i;
-
- UNREFERENCED_PARAMETER(hWnd);
- UNREFERENCED_PARAMETER(wParam);
- UNREFERENCED_PARAMETER(lParam);
-
for (i = 0; i < dwNumberTopics; i++)
{
- if (pTopics[i]->hWndButton != NULL)
+ if (pTopics[i]->hWndButton)
DestroyWindow(pTopics[i]->hWndButton);
}
- if (hWndCloseButton != NULL)
+ if (hWndCloseButton)
DestroyWindow(hWndCloseButton);
- if (hWndCheckButton != NULL)
+ if (hWndCheckButton)
DestroyWindow(hWndCheckButton);
DeleteDC(hdcMem);
@@ -1174,7 +1293,7 @@
DeleteObject(hTitleBitmap);
for (i = 0; i < dwNumberTopics; i++)
{
- if (pTopics[i]->hBitmap != NULL)
+ if (pTopics[i]->hBitmap)
DeleteObject(pTopics[i]->hBitmap);
}
@@ -1182,12 +1301,11 @@
DeleteObject(hFontTopicDescription);
DeleteObject(hFontTopicButton);
- if (hFontCheckButton != NULL)
+ if (hFontCheckButton)
DeleteObject(hFontCheckButton);
DeleteObject(hbrLightBlue);
DeleteObject(hbrDarkBlue);
- DeleteObject(hbrRightPanel);
return 0;
}