Author: ekohl
Date: Sat Apr 14 18:26:46 2007
New Revision: 26338
URL:
http://svn.reactos.org/svn/reactos?rev=26338&view=rev
Log:
- Swap mouse buttons on-the-fly.
- Add mouse button preview icons.
- Change double click speed on-the-fly.
- Add double click test icons.
- Fix double click speed calculation.
- Get rid of rsrc.rc.
Removed:
trunk/reactos/dll/cpl/main/rsrc.rc
Modified:
trunk/reactos/dll/cpl/main/lang/cs-CZ.rc
trunk/reactos/dll/cpl/main/lang/de-DE.rc
trunk/reactos/dll/cpl/main/lang/en-US.rc
trunk/reactos/dll/cpl/main/lang/es-ES.rc
trunk/reactos/dll/cpl/main/lang/fr-FR.rc
trunk/reactos/dll/cpl/main/lang/hu-HU.rc
trunk/reactos/dll/cpl/main/lang/id-ID.rc
trunk/reactos/dll/cpl/main/lang/it-IT.rc
trunk/reactos/dll/cpl/main/lang/ja-JP.rc
trunk/reactos/dll/cpl/main/lang/nl-NL.rc
trunk/reactos/dll/cpl/main/lang/ru-RU.rc
trunk/reactos/dll/cpl/main/lang/uk-UA.rc
trunk/reactos/dll/cpl/main/main.rc
trunk/reactos/dll/cpl/main/mouse.c
trunk/reactos/dll/cpl/main/resource.h
Modified: trunk/reactos/dll/cpl/main/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/cs-CZ.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/cs-CZ.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/cs-CZ.rc Sat Apr 14 18:26:46 2007
@@ -53,14 +53,14 @@
BEGIN
GROUPBOX "Nastavení tlaèítek", -1, 5, 5, 230, 70
CHECKBOX "Z&amìnit levé a pravé tlaèítko", IDC_SWAP_MOUSE_BUTTONS, 10,
15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Zakrtnutím toto políèka nastavíte pravé tlaèítko jako primární pro funkce
jako výbìr nebo pøetaení.", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Zakrtnutím toto políèka nastavíte pravé tlaèítko jako primární pro funkce
jako výbìr nebo pøetaení.", -1, 10, 30, 150, 30
GROUPBOX "Rychlost poklepání", -1, 5, 75, 230, 70
- LTEXT "Poklepejte na sloku pro otestování nastavení. Pokud se sloka neotevøe,
zkuste nií rychlost.", -1, 10, 85, 160, 30
+ LTEXT "Poklepejte na sloku pro otestování nastavení. Pokud se sloka neotevøe,
zkuste nií rychlost.", -1, 10, 85, 150, 30
LTEXT "&Rychlost: Malá", -1, 10, 120, 90, 8
LTEXT "Velká", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "Funkce ClickLock", -1, 5, 150, 230, 70
CHECKBOX "&Zapnout funkci ClickLock", IDC_CHECK_CLICK_LOCK, 10, 160, 100,
20
PUSHBUTTON "&Nastavení...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/de-DE.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/de-DE.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/de-DE.rc Sat Apr 14 18:26:46 2007
@@ -55,17 +55,17 @@
BEGIN
GROUPBOX "Tastenkonfiguration", -1, 5, 5, 230, 70
CHECKBOX "&Primäre und sekundäre Taste umschalten",
IDC_SWAP_MOUSE_BUTTONS, 10, 15, 145, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Aktivieren Sie dieses Kontrollkästchen, um die rechte Maustaste für primäre
Funktionen, wie Auswählen und Ziehen zu verwenden.", -1, 10, 30, 140, 31
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Aktivieren Sie dieses Kontrollkästchen, um die rechte Maustaste für primäre
Funktionen, wie Auswählen und Ziehen zu verwenden.", -1, 10, 30, 150, 31
GROUPBOX "Doppelklickgeschwindigkeit", -1, 5, 75, 230, 70
- LTEXT "Doppelklicken Sie auf den Ordner, um die Einstellung zu testen. Verwenden
Sie eine langsamere Einstellung, wenn der Ordner sich nicht öffnen oder schließen
lässt.", -1, 10, 85, 160, 32
+ LTEXT "Doppelklicken Sie auf den Ordner, um die Einstellung zu testen. Verwenden
Sie eine langsamere Einstellung, wenn der Ordner sich nicht öffnen oder schließen
lässt.", -1, 10, 85, 150, 32
LTEXT "Langsam", -1, 10, 120, 90, 8
LTEXT "Schnell", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "KlickEinrasten", -1, 5, 150, 230, 70
CHECKBOX "&KlickEinrasten aktivieren", IDC_CHECK_CLICK_LOCK, 10, 160, 91,
20
- PUSHBUTTON "&Einstellungen...", IDC_BUTTON_CLICK_LOCK, 167, 160, 53, 10
+ PUSHBUTTON "&Einstellungen...", IDC_BUTTON_CLICK_LOCK, 167, 160, 60, 14
LTEXT "Ermöglicht das Markieren oder Ziehen, ohne die Maustaste ständig gedrückt
zu halten. Drücken Sie die Maustaste kurzzeitig, um die Funktion zu verwenden. Klicken Sie
die Maustaste erneut, um die Tastenfeststellung zu beenden.", -1, 10, 180, 190, 33
END
Modified: trunk/reactos/dll/cpl/main/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/en-US.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/en-US.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/en-US.rc Sat Apr 14 18:26:46 2007
@@ -53,17 +53,17 @@
BEGIN
GROUPBOX "Button configuration", -1, 5, 5, 230, 70
CHECKBOX "&Switch primary and secondary buttons", IDC_SWAP_MOUSE_BUTTONS,
10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 150, 30
GROUPBOX "Double-click speed", -1, 5, 75, 230, 70
- LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 160, 30
+ LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 150, 30
LTEXT "Spee&d: Slow", -1, 10, 120, 90, 8
LTEXT "Fast", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "ClickLock", -1, 5, 150, 230, 70
CHECKBOX "&Turn on ClickLock", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
- PUSHBUTTON "&Settings...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
+ PUSHBUTTON "&Settings...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
LTEXT "Enables you to highlight or drag without holding down the mouse button. To
set, briefly press the mouse button. To release, click the mouse button again", -1,
10, 180, 190, 30
END
Modified: trunk/reactos/dll/cpl/main/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/es-ES.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/es-ES.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/es-ES.rc Sat Apr 14 18:26:46 2007
@@ -53,14 +53,14 @@
BEGIN
GROUPBOX "Button configuration", -1, 5, 5, 230, 70
CHECKBOX "&Switch primary and secondary buttons", IDC_SWAP_MOUSE_BUTTONS,
10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 150, 30
GROUPBOX "Double-click speed", -1, 5, 75, 230, 70
- LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 160, 30
+ LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 150, 30
LTEXT "Spee&d: Slow", -1, 10, 120, 90, 8
LTEXT "Fast", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "ClickLock", -1, 5, 150, 230, 70
CHECKBOX "&Turn on ClickLock", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Settings...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/fr-FR.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/fr-FR.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/fr-FR.rc Sat Apr 14 18:26:46 2007
@@ -53,14 +53,14 @@
BEGIN
GROUPBOX "Configuration des boutons", -1, 5, 5, 230, 70
CHECKBOX "&Inverser les boutons gauche et droite",
IDC_SWAP_MOUSE_BUTTONS, 10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Cochez cette case pour faire du bouton droit le bouton principal pour les
fonctions telles que la sélection et le déplacement.", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Cochez cette case pour faire du bouton droit le bouton principal pour les
fonctions telles que la sélection et le déplacement.", -1, 10, 30, 150, 30
GROUPBOX "Vitesse du double-click ", -1, 5, 75, 230, 70
- LTEXT "Double-cliquer le dossier pour tester le paramètre. Si le dossier ne
s'ouvre pas ou se ferme, essayez un réglage plus lent.", -1, 10, 85, 135, 30
+ LTEXT "Double-cliquer le dossier pour tester le paramètre. Si le dossier ne
s'ouvre pas ou se ferme, essayez un réglage plus lent.", -1, 10, 85, 150, 30
LTEXT "Vite&sse: Lente", -1, 10, 120, 90, 8
LTEXT "Rapide", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "Verrouillage clic", -1, 5, 150, 230, 70
CHECKBOX "&Activer le Verrouillage clic", IDC_CHECK_CLICK_LOCK, 10, 160,
95, 20
PUSHBUTTON "&Paramètres...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 15
Modified: trunk/reactos/dll/cpl/main/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/hu-HU.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/hu-HU.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/hu-HU.rc Sat Apr 14 18:26:46 2007
@@ -53,14 +53,14 @@
BEGIN
GROUPBOX "Button configuration", -1, 5, 5, 230, 70
CHECKBOX "&Switch primary and secondary buttons", IDC_SWAP_MOUSE_BUTTONS,
10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 150, 30
GROUPBOX "Double-click speed", -1, 5, 75, 230, 70
- LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 160, 30
+ LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 150, 30
LTEXT "Spee&d: Slow", -1, 10, 120, 90, 8
LTEXT "Fast", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "ClickLock", -1, 5, 150, 230, 70
CHECKBOX "&Turn on ClickLock", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Settings...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/id-ID.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/id-ID.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/id-ID.rc Sat Apr 14 18:26:46 2007
@@ -53,14 +53,14 @@
BEGIN
GROUPBOX "Konfigurasi tombol", -1, 5, 5, 230, 70
CHECKBOX "&Saklar primer dan tombol sekunder", IDC_SWAP_MOUSE_BUTTONS,
10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Pilih kotak centang ini untuk membuat tombol yang benar yang biasa anda
pakai fungsi primer seperi memilih dan menggeser", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Pilih kotak centang ini untuk membuat tombol yang benar yang biasa anda
pakai fungsi primer seperi memilih dan menggeser", -1, 10, 30, 150, 30
GROUPBOX "Kecepatan klik-dobel", -1, 5, 75, 230, 70
- LTEXT "Klik-dobel folder untuk menguji setelan anda. Jika folder tidak membuka
atau menutup, coba menggunakan setelan lebih lambat.", -1, 10, 85, 160, 30
+ LTEXT "Klik-dobel folder untuk menguji setelan anda. Jika folder tidak membuka
atau menutup, coba menggunakan setelan lebih lambat.", -1, 10, 85, 150, 30
LTEXT "Ke&cepatan: Lambat", -1, 10, 120, 90, 8
LTEXT "Cepat", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "Kunci Klik", -1, 5, 150, 230, 70
CHECKBOX "&Hidupkan KunciKlik", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Setelan...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/it-IT.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/it-IT.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/it-IT.rc Sat Apr 14 18:26:46 2007
@@ -55,14 +55,14 @@
BEGIN
GROUPBOX "Configurazione dei bottoni", -1, 5, 5, 230, 70
CHECKBOX "&Scambia il bottone secondario e primario",
IDC_SWAP_MOUSE_BUTTONS, 10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Assegna al tasto destro del mouse le funzioni principali come ad esempio la
selezione e il trascinamento", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Assegna al tasto destro del mouse le funzioni principali come ad esempio la
selezione e il trascinamento", -1, 10, 30, 150, 30
GROUPBOX "Velocità del doppio clic", -1, 5, 75, 230, 70
- LTEXT "Fai doppio clic sulla cartella per verificare le impostazioni. Se la
cartella non si apre o chiude, prova a usare una velocità minore.", -1, 10, 85, 160,
30
+ LTEXT "Fai doppio clic sulla cartella per verificare le impostazioni. Se la
cartella non si apre o chiude, prova a usare una velocità minore.", -1, 10, 85, 150,
30
LTEXT "Velocità: Lenta", -1, 10, 120, 90, 8
LTEXT "Veloce", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "Blocca clic", -1, 5, 150, 230, 70
CHECKBOX "&Abilita Blocca Clic", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Impostazioni...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/ja-JP.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/ja-JP.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/ja-JP.rc Sat Apr 14 18:26:46 2007
@@ -53,14 +53,14 @@
BEGIN
GROUPBOX "Button configuration", -1, 5, 5, 230, 70
CHECKBOX "&Switch primary and secondary buttons", IDC_SWAP_MOUSE_BUTTONS,
10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 150, 30
GROUPBOX "Double-click speed", -1, 5, 75, 230, 70
- LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 160, 30
+ LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 150, 30
LTEXT "Spee&d: Slow", -1, 10, 120, 90, 8
LTEXT "Fast", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "ClickLock", -1, 5, 150, 230, 70
CHECKBOX "&Turn on ClickLock", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Settings...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/nl-NL.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/nl-NL.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/nl-NL.rc Sat Apr 14 18:26:46 2007
@@ -52,14 +52,14 @@
BEGIN
GROUPBOX "Button configuration", -1, 5, 5, 230, 70
CHECKBOX "&Switch primary and secondary buttons", IDC_SWAP_MOUSE_BUTTONS,
10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 150, 30
GROUPBOX "Double-click speed", -1, 5, 75, 230, 70
- LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 160, 30
+ LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 150, 30
LTEXT "Spee&d: Slow", -1, 10, 120, 90, 8
LTEXT "Fast", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "ClickLock", -1, 5, 150, 230, 70
CHECKBOX "&Turn on ClickLock", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Settings...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/ru-RU.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/ru-RU.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/ru-RU.rc Sat Apr 14 18:26:46 2007
@@ -53,14 +53,14 @@
BEGIN
GROUPBOX "Button configuration", -1, 5, 5, 230, 70
CHECKBOX "&Switch primary and secondary buttons", IDC_SWAP_MOUSE_BUTTONS,
10, 15, 140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Select this checkbox to make the button the right one the one you use for
primary functions such as selecting and dragging", -1, 10, 30, 150, 30
GROUPBOX "Double-click speed", -1, 5, 75, 230, 70
- LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 160, 30
+ LTEXT "Double-click the folder to test your settings. If the folder does not open
or close, try using a slower setting.", -1, 10, 85, 150, 30
LTEXT "Spee&d: Slow", -1, 10, 120, 90, 8
LTEXT "Fast", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "ClickLock", -1, 5, 150, 230, 70
CHECKBOX "&Turn on ClickLock", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Settings...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/uk-UA.rc…
==============================================================================
--- trunk/reactos/dll/cpl/main/lang/uk-UA.rc (original)
+++ trunk/reactos/dll/cpl/main/lang/uk-UA.rc Sat Apr 14 18:26:46 2007
@@ -61,14 +61,14 @@
BEGIN
GROUPBOX "Êîíô³ãóðàö³ÿ êíîïîê", -1, 5, 5, 230, 70
CHECKBOX "&Ïîì³íÿòè ïðèçíà÷åííÿ êíîïîê", IDC_SWAP_MOUSE_BUTTONS, 10, 15,
140, 10
- CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_OWNERDRAW, 155, 15,
75, 57, WS_EX_STATICEDGE
- LTEXT "Âñòàíîâ³òü öåé ïðàïîðåöü, ùîá ïðèçíà÷èòè ïðàâó êíîïêó äëÿ âèêîíàííÿ òàêèõ
îñíîâíèõ ôóíêö³é, ÿê âèá³ð ³ ïåðåòÿãóâàííÿ", -1, 10, 30, 140, 30
+ CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON |
SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE
+ LTEXT "Âñòàíîâ³òü öåé ïðàïîðåöü, ùîá ïðèçíà÷èòè ïðàâó êíîïêó äëÿ âèêîíàííÿ òàêèõ
îñíîâíèõ ôóíêö³é, ÿê âèá³ð ³ ïåðåòÿãóâàííÿ", -1, 10, 30, 150, 30
GROUPBOX "Øâèäê³ñòü ïîäâ³éíîãî êëàöàííÿ", -1, 5, 75, 230, 70
- LTEXT "Çðîá³òü ïîäâ³éíå êëàöàííÿ ïî ïàïö³. ßêùî ïàïêà íå â³äêðèâàºòüñÿ àáî íå
çàêðèâàºòüñÿ, âèáåð³òü íèæ÷ó øâèäê³ñòü.", -1, 10, 85, 160, 30
+ LTEXT "Çðîá³òü ïîäâ³éíå êëàöàííÿ ïî ïàïö³. ßêùî ïàïêà íå â³äêðèâàºòüñÿ àáî íå
çàêðèâàºòüñÿ, âèáåð³òü íèæ÷ó øâèäê³ñòü.", -1, 10, 85, 150, 30
LTEXT "&Øâèäê³ñòü: Íèæ÷å", -1, 10, 120, 90, 8
LTEXT "Âèùå", -1, 140, 120, 30, 8
CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED,
"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17
- CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_OWNERDRAW,
165, 85, 65, 57, WS_EX_STATICEDGE
+ CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON |
SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE
GROUPBOX "Çàë³ïàí³ÿ", -1, 5, 150, 230, 70
CHECKBOX "&³âìêíóòè Çàë³ïàí³ÿ", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20
PUSHBUTTON "&Ïàðàìåòðè...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10
Modified: trunk/reactos/dll/cpl/main/main.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/main.rc?rev=2…
==============================================================================
--- trunk/reactos/dll/cpl/main/main.rc (original)
+++ trunk/reactos/dll/cpl/main/main.rc Sat Apr 14 18:26:46 2007
@@ -2,6 +2,11 @@
#include <windows.h>
#include "resource.h"
+
+
+/* define language neutral resources */
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Sample Control Panel\0"
@@ -9,8 +14,25 @@
#define REACTOS_STR_ORIGINAL_FILENAME "main.cpl\0"
#include <reactos/version.rc>
-
IDC_CPLICON_1 ICON "resources/mouse.ico"
IDC_CPLICON_2 ICON "resources/keyboard.ico"
+IDI_FOLDER_OPEN ICON "resources/folder_open.ico"
+IDI_FOLDER_CLOSED ICON "resources/folder_closed.ico"
+IDI_MOUSE_LEFT ICON "resources/mouse_left.ico"
+IDI_MOUSE_RIGHT ICON "resources/mouse_right.ico"
-#include "rsrc.rc"
+
+/* include localised resources */
+
+#include "lang/cs-CZ.rc"
+#include "lang/de-DE.rc"
+#include "lang/en-US.rc"
+#include "lang/es-ES.rc"
+#include "lang/fr-FR.rc"
+#include "lang/hu-HU.rc"
+#include "lang/id-ID.rc"
+#include "lang/it-IT.rc"
+#include "lang/ja-JP.rc"
+#include "lang/nl-NL.rc"
+#include "lang/ru-RU.rc"
+#include "lang/uk-UA.rc"
Modified: trunk/reactos/dll/cpl/main/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=2…
==============================================================================
--- trunk/reactos/dll/cpl/main/mouse.c (original)
+++ trunk/reactos/dll/cpl/main/mouse.c Sat Apr 14 18:26:46 2007
@@ -1,6 +1,6 @@
/*
* ReactOS
- * Copyright (C) 2004 ReactOS Team
+ * Copyright (C) 2004, 2007 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,7 +27,6 @@
//TODO:
//detect slider changes - for apply stuff
-//implement Double-Click Speed measuring
// cursor icon shows - may need overriden items
// implement Pointer-APPLY
// implement Pointer-Browser
@@ -57,15 +56,30 @@
#define MAX_DOUBLE_CLICK_SPEED 900
#define DEFAULT_WHEEL_SCROLL_LINES 3
+
+typedef struct _BUTTON_DATA
+{
+ ULONG g_SwapMouseButtons;
+ ULONG g_OrigSwapMouseButtons;
+ ULONG g_DoubleClickSpeed; // = DEFAULT_DOUBLE_CLICK_SPEED;
+ ULONG g_OrigDoubleClickSpeed;
+ BOOL g_ClickLockEnabled; // = 0;
+ DWORD g_ClickLockTime; // = DEFAULT_CLICK_LOCK_TIME;
+
+ HICON hButtonLeft;
+ HICON hButtonRight;
+
+ HICON hIcon1;
+ HICON hIcon2;
+ BOOL bClicked;
+} BUTTON_DATA, *PBUTTON_DATA;
+
+
ULONG g_Initialized = 0;
UINT g_WheelScrollLines = 5;
-ULONG g_SwapMouseButtons = 0;
-ULONG g_DoubleClickSpeed = DEFAULT_DOUBLE_CLICK_SPEED;
-BOOL g_ClickLockEnabled = 0;
BOOL g_DropShadow = 0;
-DWORD g_ClickLockTime = DEFAULT_CLICK_LOCK_TIME;
ULONG g_MouseSensitivity = DEFAULT_MOUSE_SENSITIVITY;
ULONG g_MouseSpeed = 1;
ULONG g_MouseThreshold1 = DEFAULT_MOUSE_THRESHOLD1;
@@ -96,12 +110,13 @@
TCHAR g_szNewScheme[MAX_PATH];
+
/* Property page dialog callback */
static INT_PTR CALLBACK
MouseHardwareProc(IN HWND hwndDlg,
- IN UINT uMsg,
- IN WPARAM wParam,
- IN LPARAM lParam)
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
{
GUID Guids[1];
Guids[0] = GUID_DEVCLASS_MOUSE;
@@ -112,21 +127,20 @@
switch(uMsg)
{
case WM_INITDIALOG:
- {
/* create the hardware page */
DeviceCreateHardwarePageEx(hwndDlg,
Guids,
sizeof(Guids) / sizeof(Guids[0]),
HWPD_STANDARDLIST);
break;
- }
}
return FALSE;
}
-BOOL InitializeMouse()
+static BOOL
+InitializeMouse(VOID)
{
/* mouse trails */
SystemParametersInfo(SPI_GETMOUSETRAILS, 0, &g_MouseTrails, 0);
@@ -147,12 +161,6 @@
/* hide pointer while typing */
SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &g_HidePointer, 0);
- /* click lock time */
- SystemParametersInfo(SPI_GETMOUSECLICKLOCK, 0, &g_ClickLockEnabled, 0);
- SystemParametersInfo(SPI_GETMOUSECLICKLOCKTIME, 0, &g_ClickLockTime, 0);
-
- g_DoubleClickSpeed = GetDoubleClickTime();
- g_SwapMouseButtons = GetSystemMetrics(SM_SWAPBUTTON);
/* show pointer with Ctrl-Key */
@@ -163,184 +171,235 @@
static INT_PTR CALLBACK
ClickLockProc(IN HWND hwndDlg,
- IN UINT uMsg,
- IN WPARAM wParam,
- IN LPARAM lParam)
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
{
HWND hDlgCtrl;
int pos;
- UNREFERENCED_PARAMETER(lParam);
+
+ PBUTTON_DATA pButtonData;
+
+ pButtonData = (PBUTTON_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch(uMsg)
{
case WM_INITDIALOG:
- {
+ pButtonData = (PBUTTON_DATA)lParam;
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pButtonData);
+
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_CLICK_LOCK);
SendMessage(hDlgCtrl, TBM_SETRANGE, (WPARAM)TRUE, (LPARAM)MAKELONG(0, 10));
- pos = (g_ClickLockTime-200) / 200;
+ pos = (pButtonData->g_ClickLockTime - 200) / 200;
SendMessage(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)pos);
return TRUE;
- }
+
case WM_COMMAND:
- {
if (LOWORD(wParam) == IDOK)
{
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_CLICK_LOCK);
- g_ClickLockTime = (DWORD) (SendMessage(hDlgCtrl, TBM_GETPOS, 0, 0) * 200)
+ 200;
+ pButtonData->g_ClickLockTime = (DWORD) (SendMessage(hDlgCtrl,
TBM_GETPOS, 0, 0) * 200) + 200;
EndDialog(hwndDlg, TRUE);
}
else if (LOWORD(wParam) == IDCANCEL)
{
EndDialog(hwndDlg, FALSE);
}
- }
+ break;
}
return FALSE;
}
+
static INT_PTR CALLBACK
ButtonProc(IN HWND hwndDlg,
- IN UINT uMsg,
- IN WPARAM wParam,
- IN LPARAM lParam)
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
{
HWND hDlgCtrl;
LRESULT lResult;
- float pos;
LPPSHNOTIFY lppsn;
- switch(uMsg)
+ PBUTTON_DATA pButtonData;
+
+ pButtonData = (PBUTTON_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
+
+ switch (uMsg)
{
case WM_INITDIALOG:
- {
- if (InitializeMouse())
- {
- if (g_SwapMouseButtons)
- {
- hDlgCtrl = GetDlgItem(hwndDlg, IDC_SWAP_MOUSE_BUTTONS);
- SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
- }
- if (g_ClickLockEnabled)
- {
- hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_CLICK_LOCK);
- SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
- }
- else
- {
- hDlgCtrl = GetDlgItem(hwndDlg, IDC_BUTTON_CLICK_LOCK);
- EnableWindow(hDlgCtrl, FALSE);
- }
- hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_DOUBLE_CLICK_SPEED);
- SendMessage(hDlgCtrl, TBM_SETRANGE, (WPARAM)TRUE, (LPARAM)MAKELONG(0,
14));
- pos = ((float)g_DoubleClickSpeed / MAX_DOUBLE_CLICK_SPEED);
- pos /= (1.0f/11.0f);
- SendMessage(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)(INT)ceil(pos));
-
-
- }
+ pButtonData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(BUTTON_DATA));
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pButtonData);
+
+ pButtonData->g_SwapMouseButtons = GetSystemMetrics(SM_SWAPBUTTON);
+ pButtonData->g_OrigSwapMouseButtons = pButtonData->g_SwapMouseButtons;
+ pButtonData->g_DoubleClickSpeed = GetDoubleClickTime();
+ pButtonData->g_OrigDoubleClickSpeed = pButtonData->g_DoubleClickSpeed;
+
+ /* Click lock time */
+ SystemParametersInfo(SPI_GETMOUSECLICKLOCK, 0,
&pButtonData->g_ClickLockEnabled, 0);
+ SystemParametersInfo(SPI_GETMOUSECLICKLOCKTIME, 0,
&pButtonData->g_ClickLockTime, 0);
+
+ /* Load mouse button icons */
+ pButtonData->hButtonLeft = LoadImage(hApplet,
MAKEINTRESOURCE(IDI_MOUSE_LEFT), IMAGE_ICON, 48, 48, LR_DEFAULTCOLOR);
+ pButtonData->hButtonRight = LoadImage(hApplet,
MAKEINTRESOURCE(IDI_MOUSE_RIGHT), IMAGE_ICON, 48, 48, LR_DEFAULTCOLOR);
+
+ /* Load folder icons */
+ pButtonData->hIcon1 = LoadImage(hApplet,
MAKEINTRESOURCE(IDI_FOLDER_CLOSED), IMAGE_ICON, 48, 48, LR_DEFAULTCOLOR);
+ pButtonData->hIcon2 = LoadImage(hApplet, MAKEINTRESOURCE(IDI_FOLDER_OPEN),
IMAGE_ICON, 48, 48, LR_DEFAULTCOLOR);
+
+ if (pButtonData->g_SwapMouseButtons)
+ {
+ SendDlgItemMessage(hwndDlg, IDC_SWAP_MOUSE_BUTTONS, BM_SETCHECK,
(WPARAM)BST_CHECKED, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_IMAGE_SWAP_MOUSE, STM_SETIMAGE,
IMAGE_ICON, (LPARAM)pButtonData->hButtonRight);
+ }
+ else
+ {
+ SendDlgItemMessage(hwndDlg, IDC_IMAGE_SWAP_MOUSE, STM_SETIMAGE,
IMAGE_ICON, (LPARAM)pButtonData->hButtonLeft);
+ }
+
+ if (pButtonData->g_ClickLockEnabled)
+ {
+ hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_CLICK_LOCK);
+ SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
+ }
+ else
+ {
+ hDlgCtrl = GetDlgItem(hwndDlg, IDC_BUTTON_CLICK_LOCK);
+ EnableWindow(hDlgCtrl, FALSE);
+ }
+
+ hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_DOUBLE_CLICK_SPEED);
+ SendMessage(hDlgCtrl, TBM_SETRANGE, (WPARAM)TRUE, (LPARAM)MAKELONG(0, 14));
+ SendMessage(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, 14 -
((pButtonData->g_DoubleClickSpeed - 200) / 50));
+
+
+ SendDlgItemMessage(hwndDlg, IDC_IMAGE_DOUBLE_CLICK_SPEED, STM_SETIMAGE,
IMAGE_ICON, (LPARAM)pButtonData->hIcon1);
+ pButtonData->bClicked = TRUE;
return TRUE;
- }
+
+ case WM_DESTROY:
+ DestroyIcon(pButtonData->hButtonLeft);
+ DestroyIcon(pButtonData->hButtonRight);
+ DestroyIcon(pButtonData->hIcon1);
+ DestroyIcon(pButtonData->hIcon2);
+ HeapFree(GetProcessHeap(), 0, pButtonData);
+ break;
+
case WM_COMMAND:
- {
switch(LOWORD(wParam))
{
case IDC_SWAP_MOUSE_BUTTONS:
- {
lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0,
(LPARAM)0);
if (lResult == BST_CHECKED)
{
- g_SwapMouseButtons = FALSE;
+ pButtonData->g_SwapMouseButtons = FALSE;
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED,
(LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_IMAGE_SWAP_MOUSE, STM_SETIMAGE,
IMAGE_ICON, (LPARAM)pButtonData->hButtonLeft);
}
else if (lResult == BST_UNCHECKED)
{
- g_SwapMouseButtons = TRUE;
+ pButtonData->g_SwapMouseButtons = TRUE;
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
- }
- break;
- }
+ SendDlgItemMessage(hwndDlg, IDC_IMAGE_SWAP_MOUSE, STM_SETIMAGE,
IMAGE_ICON, (LPARAM)pButtonData->hButtonRight);
+ }
+ SystemParametersInfo(SPI_SETMOUSEBUTTONSWAP,
pButtonData->g_SwapMouseButtons, NULL, SPIF_SENDCHANGE);
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ break;
+
case IDC_CHECK_CLICK_LOCK:
- {
lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0,
(LPARAM)0);
hDlgCtrl = GetDlgItem(hwndDlg, IDC_BUTTON_CLICK_LOCK);
if (lResult == BST_CHECKED)
{
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED,
(LPARAM)0);
- g_ClickLockEnabled = FALSE;
+ pButtonData->g_ClickLockEnabled = FALSE;
EnableWindow(hDlgCtrl, FALSE);
}
else if (lResult == BST_UNCHECKED)
{
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
EnableWindow(hDlgCtrl, TRUE);
- g_ClickLockEnabled = TRUE;
- }
- break;
+ pButtonData->g_ClickLockEnabled = TRUE;
+ }
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ break;
+
+ case IDC_BUTTON_CLICK_LOCK:
+ DialogBoxParam(hApplet, MAKEINTRESOURCE(IDD_CLICK_LOCK), hwndDlg,
ClickLockProc, (LPARAM)pButtonData);
+ break;
+
+ case IDC_IMAGE_DOUBLE_CLICK_SPEED:
+ if (HIWORD(wParam) == STN_DBLCLK)
+ {
+ pButtonData->bClicked = !pButtonData->bClicked;
+ SendDlgItemMessage(hwndDlg, IDC_IMAGE_DOUBLE_CLICK_SPEED,
STM_SETIMAGE, IMAGE_ICON,
+ (LPARAM)(pButtonData->bClicked ?
pButtonData->hIcon1 : pButtonData->hIcon2));
+ }
+ break;
+ }
+ break;
+
+ case WM_NOTIFY:
+ lppsn = (LPPSHNOTIFY) lParam;
+ if (lppsn->hdr.code == PSN_APPLY)
+ {
+#if (WINVER >= 0x0500)
+ SystemParametersInfo(SPI_SETMOUSECLICKLOCK,
pButtonData->g_ClickLockEnabled, NULL, SPIF_SENDCHANGE);
+ if (pButtonData->g_ClickLockEnabled)
+ SystemParametersInfo(SPI_SETMOUSECLICKLOCKTIME,
pButtonData->g_ClickLockTime, NULL, SPIF_SENDCHANGE);
+#endif
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
+ }
+ else if (lppsn->hdr.code == PSN_RESET)
+ {
+ /* Reset swap mouse button setting */
+ SystemParametersInfo(SPI_SETMOUSEBUTTONSWAP,
pButtonData->g_OrigSwapMouseButtons, NULL, SPIF_SENDCHANGE);
+
+ /* Reset double click speed setting */
+// SystemParametersInfo(SPI_SETDOUBLECLICKTIME,
pButtonData->g_OrigDoubleClickSpeed, NULL, SPIF_SENDCHANGE);
+ SetDoubleClickTime(pButtonData->g_OrigDoubleClickSpeed);
+ }
+ return TRUE;
+
+ case WM_HSCROLL:
+ if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_SLIDER_DOUBLE_CLICK_SPEED))
+ {
+ switch (LOWORD(wParam))
+ {
+ case TB_LINEUP:
+ case TB_LINEDOWN:
+ case TB_PAGEUP:
+ case TB_PAGEDOWN:
+ case TB_TOP:
+ case TB_BOTTOM:
+ case TB_ENDTRACK:
+ lResult = SendDlgItemMessage(hwndDlg,
IDC_SLIDER_DOUBLE_CLICK_SPEED, TBM_GETPOS, 0, 0);
+ pButtonData->g_DoubleClickSpeed = (14 - (INT)lResult) * 50 +
200;
+// SystemParametersInfo(SPI_SETDOUBLECLICKTIME,
pButtonData->g_DoubleClickSpeed, NULL, SPIF_SENDCHANGE);
+ SetDoubleClickTime(pButtonData->g_DoubleClickSpeed);
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ break;
+
+ case TB_THUMBTRACK:
+ pButtonData->g_DoubleClickSpeed = (14 - (INT)HIWORD(wParam)) *
50 + 200;
+// SystemParametersInfo(SPI_SETDOUBLECLICKTIME,
pButtonData->g_DoubleClickSpeed, NULL, SPIF_SENDCHANGE);
+ SetDoubleClickTime(pButtonData->g_DoubleClickSpeed);
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ break;
}
- case IDC_BUTTON_CLICK_LOCK:
- {
- lResult = DialogBox(hApplet, MAKEINTRESOURCE(IDD_CLICK_LOCK),
hwndDlg, ClickLockProc);
- if ((INT)lResult == FALSE)
- return FALSE; // no need to enable apply button
- break;
- }
- }
- PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
- break;
- }
- case WM_NOTIFY:
- {
- lppsn = (LPPSHNOTIFY) lParam;
- if (lppsn->hdr.code == PSN_APPLY)
- {
- /* apply swap mouse button */
- SystemParametersInfo(SPI_SETMOUSEBUTTONSWAP, g_SwapMouseButtons, NULL,
SPIF_SENDCHANGE);
-
- /* apply double click speed */
- hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_DOUBLE_CLICK_SPEED);
- lResult = SendMessage(hDlgCtrl, TBM_GETPOS, 0, 0);
- g_DoubleClickSpeed = (INT)lResult * 50 + 200;
- SystemParametersInfo(SPI_SETDOUBLECLICKTIME, g_DoubleClickSpeed, NULL,
SPIF_SENDCHANGE);
-
-#if (WINVER >= 0x0500)
- SystemParametersInfo(SPI_SETMOUSECLICKLOCK, g_ClickLockEnabled, NULL,
SPIF_SENDCHANGE);
- if (g_ClickLockEnabled)
- SystemParametersInfo(SPI_SETMOUSECLICKLOCKTIME, g_ClickLockTime, NULL,
SPIF_SENDCHANGE);
-#endif
- SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
- return TRUE;
- }
-
- }
- case WM_DRAWITEM:
- {
- LPDRAWITEMSTRUCT drawItem;
- drawItem = (LPDRAWITEMSTRUCT)lParam;
- if(drawItem->CtlID == IDC_IMAGE_SWAP_MOUSE)
- {
- //FIXME
- //show mouse with left/right button highlighted
- // depending on val g_SwapMouseButtons
- return TRUE;
- }
- else if (drawItem->CtlID == IDC_IMAGE_DOUBLE_CLICK_SPEED)
- {
- //FIXME
- //measure click speed && draw item
- }
- break;
- }
- case WM_HSCROLL:
- {
- PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
- break;
- }
- }
+ }
+ break;
+ }
+
return FALSE;
}
-BOOL ReadActiveCursorScheme()
+
+#if 0
+static BOOL
+ReadActiveCursorScheme(VOID)
{
HKEY hCuKey;
HKEY hCuCursorKey;
@@ -359,7 +418,7 @@
RegCloseKey(hCuKey);
return FALSE;
}
-
+
memset(g_szArrow, 0x0, sizeof(g_szArrow));
memset(g_szHelp, 0x0, sizeof(g_szHelp));
memset(g_szAppStarting, 0x0, sizeof(g_szAppStarting));
@@ -377,12 +436,11 @@
memset(g_szHand, 0x0, sizeof(g_szHand));
dwIndex = 0;
- do
+ for (;;)
{
dwValueName = sizeof(szValueName) / sizeof(TCHAR);
dwValueData = sizeof(szValueData) / sizeof(TCHAR);
dwResult = RegEnumValue(hCuCursorKey, dwIndex, szValueName, &dwValueName,
NULL, NULL, (LPBYTE)szValueData, &dwValueData);
-
if (dwResult == ERROR_NO_MORE_ITEMS)
break;
@@ -418,15 +476,18 @@
_tcsncpy(g_szHand, szValueData, MAX_PATH);
dwIndex++;
- }while(1);
+ }
RegCloseKey(hCuCursorKey);
RegCloseKey(hCuKey);
-
+
return TRUE;
}
-
-BOOL EnumerateCursorSchemes(HWND hwndDlg)
+#endif
+
+
+static BOOL
+EnumerateCursorSchemes(HWND hwndDlg)
{
HKEY hCuKey;
HKEY hCuCursorKey;
@@ -442,9 +503,8 @@
BOOL ProcessedHKLM = FALSE;
if (RegOpenCurrentUser(KEY_READ, &hCuKey) != ERROR_SUCCESS)
- {
return FALSE;
- }
+
if (RegOpenKeyEx(hCuKey, _T("Control Panel\\Cursors\\Schemes"), 0,
KEY_READ, &hCuCursorKey) != ERROR_SUCCESS)
{
RegCloseKey(hCuKey);
@@ -455,12 +515,12 @@
SendMessage(hDlgCtrl, CB_RESETCONTENT, 0, 0);
dwIndex = 0;
- do
+ for (;;)
{
dwValueName = sizeof(szValueName) / sizeof(TCHAR);
dwValueData = sizeof(szValueData) / sizeof(TCHAR);
dwResult = RegEnumValue(hCuCursorKey, dwIndex, szValueName, &dwValueName,
NULL, NULL, (LPBYTE)szValueData, &dwValueData);
-
+
if (dwResult == ERROR_NO_MORE_ITEMS)
{
if(!ProcessedHKLM)
@@ -479,30 +539,36 @@
}
break;
}
+
if(_tcslen(szValueData) > 0)
{
TCHAR * copy = _tcsdup(szValueData);
if (ProcessedHKLM)
+ {
+ _tcscat(szValueName, TEXT(" "));
_tcscat(szValueName, szSystemScheme);
- lResult = SendMessage(hDlgCtrl, CB_ADDSTRING, (WPARAM)0,
(LPARAM)szValueName);
- SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)copy);
+ }
+ lResult = SendMessage(hDlgCtrl, CB_ADDSTRING, (WPARAM)0,
(LPARAM)szValueName);
+ SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)copy);
}
dwIndex++;
- }while(1);
+ }
RegCloseKey(hCuCursorKey);
RegCloseKey(hCuKey);
LoadString(hApplet, IDS_NONE, szSystemScheme, MAX_PATH);
- SendMessage(hDlgCtrl, CB_ADDSTRING, (WPARAM)0, (LPARAM)szSystemScheme);
+ lResult = SendMessage(hDlgCtrl, CB_ADDSTRING, (WPARAM)0, (LPARAM)szSystemScheme);
+ SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)NULL);
SendMessage(hDlgCtrl, CB_SETCURSEL, (WPARAM)0, (LPARAM)0);
return TRUE;
}
-void RefreshCursorList(HWND hwndDlg)
+static VOID
+RefreshCursorList(HWND hwndDlg)
{
TCHAR szCursorName[MAX_PATH];
HWND hDlgCtrl;
@@ -517,12 +583,11 @@
column.mask = LVCF_SUBITEM | LVCF_WIDTH;
column.iSubItem = 0;
column.cx = 200;
-
+
(void)ListView_InsertColumn(hDlgCtrl, 0, &column);
-
LoadString(hApplet, IDS_ARROW, szCursorName, MAX_PATH);
-
+
ZeroMemory(&listItem, sizeof(LV_ITEM));
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
listItem.pszText = szCursorName;
@@ -534,7 +599,7 @@
(void)ListView_InsertItem(hDlgCtrl, &listItem);
LoadString(hApplet, IDS_HELP, szCursorName, MAX_PATH);
- listItem.iItem = index++;
+ listItem.iItem = index++;
(void)ListView_InsertItem(hDlgCtrl, &listItem);
LoadString(hApplet, IDS_APPSTARTING, szCursorName, MAX_PATH);
@@ -587,32 +652,37 @@
(void)ListView_InsertItem(hDlgCtrl, &listItem);
}
-BOOL DeleteUserCursorScheme(TCHAR * szScheme)
+
+static BOOL
+DeleteUserCursorScheme(TCHAR * szScheme)
{
HKEY hCuKey;
HKEY hCuCursorKey;
LONG Result;
+
if (RegOpenCurrentUser(KEY_READ | KEY_SET_VALUE, &hCuKey) != ERROR_SUCCESS)
- {
return FALSE;
- }
+
if (RegOpenKeyEx(hCuKey, _T("Control Panel\\Cursors\\Schemes"), 0, KEY_READ
| KEY_SET_VALUE, &hCuCursorKey) != ERROR_SUCCESS)
{
RegCloseKey(hCuKey);
return FALSE;
}
+
Result = RegDeleteValue(hCuCursorKey, szScheme);
RegCloseKey(hCuCursorKey);
RegCloseKey(hCuKey);
+
return (Result == ERROR_SUCCESS);
}
+
static INT_PTR CALLBACK
SaveSchemeProc(IN HWND hwndDlg,
- IN UINT uMsg,
- IN WPARAM wParam,
- IN LPARAM lParam)
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
{
HWND hDlgCtrl;
UNREFERENCED_PARAMETER(lParam);
@@ -620,7 +690,6 @@
switch(uMsg)
{
case WM_COMMAND:
- {
if (LOWORD(wParam) == IDOK)
{
hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_SCHEME_NAME);
@@ -631,13 +700,15 @@
{
EndDialog(hwndDlg, FALSE);
}
- }
+ break;
}
return FALSE;
}
-BOOL BrowseCursor(TCHAR * szFileName, HWND hwndDlg)
+
+static BOOL
+BrowseCursor(TCHAR * szFileName, HWND hwndDlg)
{
//FIXME load text resources from string
OPENFILENAME ofn;
@@ -662,11 +733,100 @@
}
+static VOID
+LoadCurrentCursorScheme(LPTSTR lpName, BOOL bSystem)
+{
+ HKEY hCursorKey;
+ TCHAR szValue[2048];
+ TCHAR szRaw[256];
+ DWORD dwValueLen;
+ LONG lError;
+ LPTSTR ptrStart, ptrEnd;
+ INT_PTR len;
+ int i;
+
+ if (lpName == NULL)
+ {
+ memset(g_szArrow, 0x0, sizeof(g_szArrow));
+ memset(g_szHelp, 0x0, sizeof(g_szHelp));
+ memset(g_szAppStarting, 0x0, sizeof(g_szAppStarting));
+ memset(g_szWait, 0x0, sizeof(g_szWait));
+ memset(g_szCrosshair, 0x0, sizeof(g_szCrosshair));
+ memset(g_szIBeam, 0x0, sizeof(g_szIBeam));
+ memset(g_szNWPen, 0x0, sizeof(g_szNWPen));
+ memset(g_szNo, 0x0, sizeof(g_szNo));
+ memset(g_szSizeNS, 0x0, sizeof(g_szSizeNS));
+ memset(g_szSizeWE, 0x0, sizeof(g_szSizeWE));
+ memset(g_szSizeNWSE, 0x0, sizeof(g_szSizeNWSE));
+ memset(g_szSizeNESW, 0x0, sizeof(g_szSizeNESW));
+ memset(g_szSizeAll, 0x0, sizeof(g_szSizeAll));
+ memset(g_szUpArrow, 0x0, sizeof(g_szUpArrow));
+ memset(g_szHand, 0x0, sizeof(g_szHand));
+ }
+ else
+ {
+ if (bSystem)
+ {
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control
Panel\\Cursors\\Schemes"),
+ 0, KEY_READ, &hCursorKey))
+ return;
+ }
+ else
+ {
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,
+ _T("Control Panel\\Cursors\\Schemes"),
+ 0, KEY_READ, &hCursorKey) != ERROR_SUCCESS)
+ return;
+ }
+
+ dwValueLen = 2048 * sizeof(TCHAR);
+ lError = RegQueryValueEx(hCursorKey, lpName, NULL, NULL, (LPBYTE)szValue,
&dwValueLen);
+
+ RegCloseKey(hCursorKey);
+
+ if (lError == ERROR_SUCCESS)
+ {
+ ptrStart = szValue;
+ for (i = 0; ; i++)
+ {
+ ptrEnd = _tcschr(ptrStart, TEXT(','));
+ if (ptrEnd != NULL)
+ {
+ len = (ptrEnd - ptrStart) / sizeof(TCHAR);
+ _tcsncpy(szRaw, ptrStart, len);
+ szRaw[len] = 0;
+ }
+ else
+ {
+ _tcscpy(szRaw, ptrStart);
+ }
+
+ switch (i)
+ {
+ case 0:
+ ExpandEnvironmentStrings(szRaw, g_szArrow, MAX_PATH);
+ break;
+
+ }
+
+
+
+ if (ptrEnd == NULL)
+ break;
+
+ ptrStart = ptrEnd + 1;
+ }
+ }
+ }
+}
+
+
static INT_PTR CALLBACK
PointerProc(IN HWND hwndDlg,
- IN UINT uMsg,
- IN WPARAM wParam,
- IN LPARAM lParam)
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
{
LPPSHNOTIFY lppsn;
TCHAR buffer[MAX_PATH];
@@ -679,7 +839,6 @@
switch(uMsg)
{
case WM_INITDIALOG:
- {
EnumerateCursorSchemes(hwndDlg);
RefreshCursorList(hwndDlg);
/* drop shadow */
@@ -693,9 +852,8 @@
return TRUE;
else
return FALSE;
- }
+
case WM_NOTIFY:
- {
lppsn = (LPPSHNOTIFY) lParam;
if (lppsn->hdr.code == PSN_APPLY)
{
@@ -706,46 +864,46 @@
return TRUE;
}
break;
- }
+
case WM_COMMAND:
- {
switch(HIWORD(wParam))
{
case CBN_SELENDOK:
{
BOOL bEnable;
+ LPTSTR lpName;
+
wParam = SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0);
if(wParam == CB_ERR)
break;
SendMessage((HWND)lParam, CB_GETLBTEXT, wParam, (LPARAM)buffer);
LoadString(hApplet, IDS_SYSTEM_SCHEME, szSystemScheme, MAX_PATH);
if(_tcsstr(buffer, szSystemScheme) || wParam == 0) //avoid the
default scheme can be deleted
- bEnable = 0;
+ bEnable = FALSE;
else
- bEnable = 1;
-
+ bEnable = TRUE;
+
/* delete button */
hDlgCtrl = GetDlgItem(hwndDlg, IDC_BUTTON_DELETE_SCHEME);
EnableWindow(hDlgCtrl, bEnable);
-
+
+ lpName = (LPTSTR)SendMessage((HWND)lParam, CB_GETITEMDATA, wParam,
0);
+ LoadCurrentCursorScheme(lpName, !bEnable);
break;
}
}
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_BUTTON_SAVEAS_SCHEME:
- {
- if(DialogBox(hApplet, MAKEINTRESOURCE(IDD_CURSOR_SCHEME_SAVEAS),
hwndDlg, SaveSchemeProc))
+ if (DialogBox(hApplet, MAKEINTRESOURCE(IDD_CURSOR_SCHEME_SAVEAS),
hwndDlg, SaveSchemeProc))
{
//FIXME
- //save cursor scheme
-
- }
- break;
- }
+ //save cursor scheme
+ }
+ break;
+
case IDC_BUTTON_USE_DEFAULT_CURSOR:
- {
hDlgCtrl = GetDlgItem(hwndDlg, IDC_LISTVIEW_CURSOR);
lResult = SendMessage(hDlgCtrl, CB_GETCURSEL, 0, 0);
if (lResult != CB_ERR)
@@ -782,9 +940,8 @@
memset(g_szHand, 0x0, MAX_PATH * sizeof(TCHAR));
}
break;
- }
+
case IDC_BUTTON_BROWSE_CURSOR:
- {
memset(buffer, 0x0, sizeof(buffer));
hDlgCtrl = GetDlgItem(hwndDlg, IDC_LISTVIEW_CURSOR);
lResult = SendMessage(hDlgCtrl, CB_GETCURSEL, 0, 0);
@@ -792,7 +949,6 @@
MessageBox(hwndDlg, _T("CB_ERR"),
_T(""),MB_ICONERROR);
if (BrowseCursor(buffer, hwndDlg))
{
-
if ((INT)lResult == 0)
_tcsncpy(g_szArrow, buffer, MAX_PATH);
else if ((INT)lResult == 1)
@@ -838,9 +994,8 @@
ReleaseDC(hDlgCtrl, memDC);
}
break;
- }
+
case IDC_BUTTON_DELETE_SCHEME:
- {
hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMBO_CURSOR_SCHEME);
wParam = SendMessage(hDlgCtrl, CB_GETCURSEL, 0, 0);
if(wParam == CB_ERR)
@@ -852,9 +1007,8 @@
SendMessage(hDlgCtrl, CB_SETCURSEL, (WPARAM)0, (LPARAM)0);
}
break;
- }
+
case IDC_CHECK_DROP_SHADOW:
- {
if(IsDlgButtonChecked(hwndDlg, IDC_CHECK_DROP_SHADOW))
{
g_DropShadow = 0;
@@ -864,22 +1018,20 @@
{
g_DropShadow = 1;
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
- }
- }
- }
- break;
- }
-
+ }
+ }
+ break;
}
return FALSE;
}
+
static INT_PTR CALLBACK
OptionProc(IN HWND hwndDlg,
- IN UINT uMsg,
- IN WPARAM wParam,
- IN LPARAM lParam)
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
{
HWND hDlgCtrl;
LPPSHNOTIFY lppsn;
@@ -888,14 +1040,13 @@
switch(uMsg)
{
case WM_INITDIALOG:
- {
if (InitializeMouse())
{
/* set mouse sensitivity */
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_MOUSE_SENSITIVITY);
SendMessage(hDlgCtrl, TBM_SETRANGE, (WPARAM)TRUE, (LPARAM)MAKELONG(0,
19));
SendMessage(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)g_MouseSensitivity-1);
-
+
if (g_MouseSpeed)
{
hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_POINTER_PRECISION);
@@ -921,23 +1072,19 @@
hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_SHOW_POINTER);
SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
}
-
+
if (g_HidePointer)
{
hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_HIDE_POINTER);
SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
}
-
- }
-
- break;
- }
+ }
+ break;
+
case WM_COMMAND:
- {
switch(LOWORD(wParam))
{
case IDC_CHECK_POINTER_PRECISION:
- {
if(IsDlgButtonChecked(hwndDlg, IDC_CHECK_POINTER_PRECISION))
{
g_MouseSpeed = 0;
@@ -953,9 +1100,8 @@
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
}
break;
- }
+
case IDC_CHECK_SNAP_TO:
- {
if(IsDlgButtonChecked(hwndDlg, IDC_CHECK_SNAP_TO))
{
g_SnapToDefaultButton = 0;
@@ -967,9 +1113,8 @@
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
}
break;
- }
+
case IDC_CHECK_POINTER_TRAIL:
- {
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_POINTER_TRAIL);
if(IsDlgButtonChecked(hwndDlg, IDC_CHECK_POINTER_TRAIL))
{
@@ -983,10 +1128,9 @@
EnableWindow(hDlgCtrl, TRUE);
g_MouseTrails = (ULONG) SendMessage(hDlgCtrl, TBM_GETPOS, 0, 0) +
2;
}
- break;
- }
+ break;
+
case IDC_CHECK_SHOW_POINTER:
- {
if(IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOW_POINTER))
{
g_ShowPointer = 0;
@@ -998,9 +1142,8 @@
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
}
break;
- }
+
case IDC_CHECK_HIDE_POINTER:
- {
if(IsDlgButtonChecked(hwndDlg, IDC_CHECK_HIDE_POINTER))
{
g_HidePointer = 0;
@@ -1012,27 +1155,27 @@
SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
}
break;
- }
}
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
break;
- }
+
case WM_NOTIFY:
- {
lppsn = (LPPSHNOTIFY) lParam;
if (lppsn->hdr.code == PSN_APPLY)
{
/* set snap to default button */
SystemParametersInfo(SPI_SETSNAPTODEFBUTTON, g_SnapToDefaultButton, 0,
SPIF_SENDCHANGE);
-
+
/* set mouse trails */
if(IsDlgButtonChecked(hwndDlg, IDC_CHECK_POINTER_TRAIL))
{
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_POINTER_TRAIL);
lResult = SendMessage(hDlgCtrl, TBM_GETPOS, 0, 0);
}
- else
+ else
+ {
lResult = 0;
+ }
SystemParametersInfo(SPI_SETMOUSETRAILS, (UINT) lResult, 0,
SPIF_SENDCHANGE);
@@ -1044,7 +1187,6 @@
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_MOUSE_SENSITIVITY);
lResult = SendMessage(hDlgCtrl, TBM_GETPOS, 0, 0) + 1;
SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)g_MouseSensitivity,
SPIF_SENDCHANGE);
-
/* hide pointer while typing */
SystemParametersInfo(SPI_SETMOUSEVANISH, 0, (PVOID)g_HidePointer,
SPIF_SENDCHANGE);
@@ -1055,17 +1197,18 @@
return TRUE;
}
break;
- }
+
case WM_HSCROLL:
- {
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
break;
- }
- }
+ }
+
return FALSE;
}
-static void ShowDialogWheelControls(HWND hwndDlg)
+
+static VOID
+ShowDialogWheelControls(HWND hwndDlg)
{
HWND hDlgCtrl;
@@ -1073,7 +1216,7 @@
{
hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_WHEEL_SCROLL_LINES);
SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
-
+
hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_WHEEL_SCROLL_LINES);
EnableWindow(hDlgCtrl, TRUE);
@@ -1097,25 +1240,24 @@
hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_WHEEL_SCROLL_PAGE);
SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
}
-
-}
+}
+
static INT_PTR CALLBACK
WheelProc(IN HWND hwndDlg,
- IN UINT uMsg,
- IN WPARAM wParam,
- IN LPARAM lParam)
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
{
HWND hDlgCtrl;
WCHAR buffer[MAX_PATH];
LPPSHNOTIFY lppsn;
- switch(uMsg)
+ switch (uMsg)
{
case WM_INITDIALOG:
- {
ShowDialogWheelControls(hwndDlg);
- SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WHEEL_SCROLL_LINES), UDM_SETRANGE, 0,
MAKELONG ((short) 100, (short) 0));
+ SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WHEEL_SCROLL_LINES), UDM_SETRANGE,
0, MAKELONG ((short) 100, (short) 0));
if (g_WheelScrollLines != UINT_MAX)
{
hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_WHEEL_SCROLL_LINES);
@@ -1123,10 +1265,9 @@
SendMessage(hDlgCtrl, WM_SETTEXT, (WPARAM)0, (LPARAM)buffer);
}
return TRUE;
- }
+
case WM_COMMAND:
- {
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_RADIO_WHEEL_SCROLL_LINES:
{
@@ -1145,9 +1286,8 @@
}
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
break;
- }
+
case WM_NOTIFY:
- {
lppsn = (LPPSHNOTIFY) lParam;
if (lppsn->hdr.code == PSN_APPLY)
{
@@ -1155,17 +1295,16 @@
SendMessageW(hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)buffer);
g_WheelScrollLines = _wtoi(buffer);
SystemParametersInfo(SPI_SETWHEELSCROLLLINES, g_WheelScrollLines, 0,
SPIF_SENDCHANGE);
-
+
SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR);
return TRUE;
}
-
- }
-
+ break;
}
return FALSE;
}
+
LONG APIENTRY
MouseApplet(HWND hwnd, UINT uMsg, LONG lParam1, LONG lParam2)
Modified: trunk/reactos/dll/cpl/main/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/resource.h?re…
==============================================================================
--- trunk/reactos/dll/cpl/main/resource.h (original)
+++ trunk/reactos/dll/cpl/main/resource.h Sat Apr 14 18:26:46 2007
@@ -1,9 +1,14 @@
#ifndef __CPL_RESOURCE_H
#define __CPL_RESOURCE_H
-
+/* Icons */
#define IDC_CPLICON_1 100
#define IDC_CPLICON_2 200
+
+#define IDI_FOLDER_OPEN 201
+#define IDI_FOLDER_CLOSED 202
+#define IDI_MOUSE_LEFT 203
+#define IDI_MOUSE_RIGHT 204
#define IDD_PAGE_BUTTON 101
#define IDD_PAGE_POINTER 102
Removed: trunk/reactos/dll/cpl/main/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/rsrc.rc?rev=2…
==============================================================================
--- trunk/reactos/dll/cpl/main/rsrc.rc (original)
+++ trunk/reactos/dll/cpl/main/rsrc.rc (removed)
@@ -1,24 +1,0 @@
-
-
-#include <windows.h>
-#include <commctrl.h>
-#include "resource.h"
-
-/* define language neutral resources */
-
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-
-/* include localised resources */
-
-#include "lang/cs-CZ.rc"
-#include "lang/de-DE.rc"
-#include "lang/en-US.rc"
-#include "lang/es-ES.rc"
-#include "lang/fr-FR.rc"
-#include "lang/hu-HU.rc"
-#include "lang/id-ID.rc"
-#include "lang/it-IT.rc"
-#include "lang/ja-JP.rc"
-#include "lang/nl-NL.rc"
-#include "lang/ru-RU.rc"
-#include "lang/uk-UA.rc"