[SHIMGVW] Add new features (CORE-11044) (#3113)

Add these new features:

- Use accelerator table for keyboard hotkeys.
- Updated italian translation.
- Simplified creation of toolbar and tooltips.
- Added missing toolbar buttons.
- Initialize common controls for theming.

French translation by Kyle Katarn.
Polish translation by Adam Stachowicz.
This commit is contained in:
Carlo Bramini 2021-02-13 15:22:21 +01:00 committed by GitHub
parent 986cc5e8e2
commit 0d4e921c93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 382 additions and 197 deletions

View file

@ -1,7 +1,7 @@
#define INITGUID
#include <windef.h>
#include <comsup.h>
#include "comsup.h"
LONG LockCount;
LONG ObjectCount;

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Следващо изображение"
IDS_TOOLTIP_PREV_PIC "Предходно изображение"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Увеличаване (+)"
IDS_TOOLTIP_ZOOM_OUT "Намаляване (-)"
IDS_TOOLTIP_ROT_CLOCKW "Завъртане по часовника (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Завъртане срещу часовника (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Разпечатване (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Записване като... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -14,12 +14,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Další obrázek"
IDS_TOOLTIP_PREV_PIC "Předchozí obrázek"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Přiblížit (+)"
IDS_TOOLTIP_ZOOM_OUT "Oddálit (-)"
IDS_TOOLTIP_ROT_CLOCKW "Otočit po směru hodinových ručiček (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Otočit proti směru hodinových ručiček (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Tisk (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Uložit jako... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Nächstes Bild"
IDS_TOOLTIP_PREV_PIC "Vorheriges Bild"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Vergrößern (+)"
IDS_TOOLTIP_ZOOM_OUT "Verkleinern (-)"
IDS_TOOLTIP_ROT_CLOCKW "Drehen im Uhrzeigersinn (Strg+K)"
IDS_TOOLTIP_ROT_COUNCW "Drehen gegen den Uhrzeigersinn (Strg+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Drucken (Strg+P)"
IDS_TOOLTIP_SAVEAS "Speichern unter... (Strg+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Next Picture"
IDS_TOOLTIP_PREV_PIC "Previous Picture"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Zoom In (+)"
IDS_TOOLTIP_ZOOM_OUT "Zoom Out (-)"
IDS_TOOLTIP_ROT_CLOCKW "Rotate Clockwise (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Rotate Counterclockwise (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Print (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Save As... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -11,12 +11,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Siguiente imagen"
IDS_TOOLTIP_PREV_PIC "Imagen anterior"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Acercar (+)"
IDS_TOOLTIP_ZOOM_OUT "Alejar (-)"
IDS_TOOLTIP_ROT_CLOCKW "Rotar en el sentido de las agujas del reloj (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Rotar en el sentido opuesto a las agujas del reloj (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Imprimir (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Guardar como... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Image Suivante"
IDS_TOOLTIP_PREV_PIC "Image Précédente"
IDS_TOOLTIP_BEST_FIT "Ajuster à la fenêtre (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Taille réelle (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Démarrer le diaporama (F11)"
IDS_TOOLTIP_ZOOM_IN "Augmenter (+)"
IDS_TOOLTIP_ZOOM_OUT "Diminuer (-)"
IDS_TOOLTIP_ROT_CLOCKW "Tourner dans le sens des aiguilles d'une montre (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Tourner dans le sens opposé des aiguilles d'une montre (Ctrl+L)"
IDS_TOOLTIP_DELETE "Supprimer (Suppr)"
IDS_TOOLTIP_PRINT "Imprimer (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Enregistrer sous... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modifier (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Aide (F1)"
END
STRINGTABLE

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "התמונה הבאה"
IDS_TOOLTIP_PREV_PIC "התמונה הקודמת"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "הגדלה (+)"
IDS_TOOLTIP_ZOOM_OUT "הרחקה (-)"
IDS_TOOLTIP_ROT_CLOCKW "סובב עם כיוון השעון (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "סובב כנגד כיוון השעון (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "הדפס (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "שמירה בשם... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -4,26 +4,32 @@ STRINGTABLE
BEGIN
IDS_APPTITLE "Visualizzatore immagini e fax di ReactOS"
IDS_SETASDESKBG "Imposta come sfondo del desktop"
IDS_NOPREVIEW "No preview available."
IDS_NOPREVIEW "Anteprima non disponibile."
IDS_PREVIEW "Anteprima"
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Immagine successiva"
IDS_TOOLTIP_PREV_PIC "Immagine precedente"
IDS_TOOLTIP_ZOOM_IN "Zoom avanti (+)"
IDS_TOOLTIP_ZOOM_OUT "Zoom indietro (-)"
IDS_TOOLTIP_ROT_CLOCKW "Ruotare in senso orario (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Ruotare in senso antiorario (Ctrl+L)"
IDS_TOOLTIP_PRINT "Stampare (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Salva in... (Ctrl+S)"
IDS_TOOLTIP_NEXT_PIC "Immagine successiva (Freccia destra)"
IDS_TOOLTIP_PREV_PIC "Immagine precedente (Freccia sinistra)"
IDS_TOOLTIP_BEST_FIT "Adatta alla finestra (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Dimensione effettiva (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Avvia presentazione (F11)"
IDS_TOOLTIP_ZOOM_IN "Ingrandisci (+)"
IDS_TOOLTIP_ZOOM_OUT "Riduci (-)"
IDS_TOOLTIP_ROT_CLOCKW "Ruota in senso orario (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Ruota in senso antiorario (Ctrl+L)"
IDS_TOOLTIP_DELETE "Elimina (CANC)"
IDS_TOOLTIP_PRINT "Stampa (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Salva come... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modifica (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Guida in linea (F1)"
END
STRINGTABLE
BEGIN
IDS_EMF_FILE "EMF Image"
IDS_GIF_FILE "GIF Image"
IDS_JPG_FILE "JPEG Image"
IDS_BMP_FILE "Bitmap Image"
IDS_PNG_FILE "PNG Image"
IDS_TIF_FILE "TIF Image"
IDS_WMF_FILE "WMF Image"
IDS_EMF_FILE "Immagine EMF"
IDS_GIF_FILE "Immagine GIF"
IDS_JPG_FILE "Immagine JPEG"
IDS_BMP_FILE "Immagine Bitmap"
IDS_PNG_FILE "Immagine PNG"
IDS_TIF_FILE "Immagine TIF"
IDS_WMF_FILE "Immagine WMF"
END

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "次の画像"
IDS_TOOLTIP_PREV_PIC "前の画像"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "ズームイン (+)"
IDS_TOOLTIP_ZOOM_OUT "ズームアウト (-)"
IDS_TOOLTIP_ROT_CLOCKW "時計回りに回転 (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "反時計回りに回転 (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "印刷 (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "名前を付けて保存... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -11,12 +11,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Tolesnis paveikslėlis"
IDS_TOOLTIP_PREV_PIC "Ankstesnis paveikslėlis"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Didinti (+)"
IDS_TOOLTIP_ZOOM_OUT "Mažinti (-)"
IDS_TOOLTIP_ROT_CLOCKW "Pasukti pagal laikrodžio rodyklę (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Pasukti prieš laikrodžio rodyklę (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Spausdinti (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Įrašyti kaip... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Neste bilde"
IDS_TOOLTIP_PREV_PIC "Forrige bilde"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Forstørre (+)"
IDS_TOOLTIP_ZOOM_OUT "Forminske (-)"
IDS_TOOLTIP_ROT_CLOCKW "Med urviseren (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Dreie mot urviseren (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Skriv ut (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Lagre som... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -14,12 +14,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Następny obraz"
IDS_TOOLTIP_PREV_PIC "Poprzedni obraz"
IDS_TOOLTIP_BEST_FIT "Rozmiar dopasowany optymalnie (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Rozmiar rzeczywisty (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Rozpocznij pokaz slajdów (F11)"
IDS_TOOLTIP_ZOOM_IN "Powiększ (+)"
IDS_TOOLTIP_ZOOM_OUT "Pomniejsz (-)"
IDS_TOOLTIP_ROT_CLOCKW "Obróć zgodnie z ruchem wskazówek zegara (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Obróć przeciwnie do ruchu wskazówek zegara (Ctrl+L)"
IDS_TOOLTIP_DELETE "Usuń (Delete)"
IDS_TOOLTIP_PRINT "Drukuj (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Zapisz jako... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Zamyka ten program i otwiera obraz w celu edycji (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Pomoc (F1)"
END
STRINGTABLE

View file

@ -14,12 +14,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Próxima imagem"
IDS_TOOLTIP_PREV_PIC "Imagem anterior"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Zoom (+)"
IDS_TOOLTIP_ZOOM_OUT "Zoom (-)"
IDS_TOOLTIP_ROT_CLOCKW "Girar no sentido dos ponteiros do relógio(Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Girar no sentido anti-horário (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Imprimir (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Guardar como... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -16,12 +16,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Imaginea următare"
IDS_TOOLTIP_PREV_PIC "Imaginea precedentă"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Mărire (+)"
IDS_TOOLTIP_ZOOM_OUT "Micșorare (-)"
IDS_TOOLTIP_ROT_CLOCKW "Rotire în sens orar (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Rotire în sens antiorar (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Imprimă (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Păstrare în… (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -9,12 +9,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Следующее изображение"
IDS_TOOLTIP_PREV_PIC "Предыдущее изображение"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Увеличить (+)"
IDS_TOOLTIP_ZOOM_OUT "Уменьшить (-)"
IDS_TOOLTIP_ROT_CLOCKW "Повернуть по часовой стрелке (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Повернуть против часовой стрелки (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Печать (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Сохранить как... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -13,12 +13,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Nasledujúci obrázok"
IDS_TOOLTIP_PREV_PIC "Predchádzajúci obrázok"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Priblížiť (+)"
IDS_TOOLTIP_ZOOM_OUT "Vzdialiť (-)"
IDS_TOOLTIP_ROT_CLOCKW "Otočiť v smere hodinových ručičiek (Ctrl+K)" // Otočiť vpravo
IDS_TOOLTIP_ROT_COUNCW "Otočiť proti smeru hodinových ručičiek (Ctrl+L)" // Otočiť vľavo
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Vytlačiť (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Uložiť ako... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -13,12 +13,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Fotoja Tjetër"
IDS_TOOLTIP_PREV_PIC "Fotoja Mëparshme"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Zoom Brënda (+)"
IDS_TOOLTIP_ZOOM_OUT "Zoom Jashtë (-)"
IDS_TOOLTIP_ROT_CLOCKW "Rrotullo KrahAkrepave (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Rrotullo kundërKrahAkrepave (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Printo (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Ruaj Si... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -11,12 +11,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Sonraki Resim"
IDS_TOOLTIP_PREV_PIC "Önceki Resim"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Yakınlaştır (+)"
IDS_TOOLTIP_ZOOM_OUT "Uzaklaştır (-)"
IDS_TOOLTIP_ROT_CLOCKW "Saat Yönünde Döndür (Denetim+K)"
IDS_TOOLTIP_ROT_COUNCW "Saat Yönünün Tersi Yönünde Döndür (Denetim+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Yazdır (Denetim+P)"
IDS_TOOLTIP_SAVEAS "Ayrı Sakla... (Denetim+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -17,12 +17,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "Наступне зображення"
IDS_TOOLTIP_PREV_PIC "Попереднє зображення"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "Збільшити (+)"
IDS_TOOLTIP_ZOOM_OUT "Зменшити (-)"
IDS_TOOLTIP_ROT_CLOCKW "Повернути за годинниковою стрілкою (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "Повернути проти годинникової стрілки (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "Друк (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "Зберегти як... (Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -12,12 +12,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "下一张图片"
IDS_TOOLTIP_PREV_PIC "上一张图片"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "放大 (+)"
IDS_TOOLTIP_ZOOM_OUT "缩小 (-)"
IDS_TOOLTIP_ROT_CLOCKW "顺时针旋转 (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "逆时针旋转 (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "打印 (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "另存为...(Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

View file

@ -11,12 +11,18 @@ BEGIN
/* Tooltips */
IDS_TOOLTIP_NEXT_PIC "下一張圖片"
IDS_TOOLTIP_PREV_PIC "上一張圖片"
IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)"
IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)"
IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)"
IDS_TOOLTIP_ZOOM_IN "放大 (+)"
IDS_TOOLTIP_ZOOM_OUT "縮小 (-)"
IDS_TOOLTIP_ROT_CLOCKW "順時針旋轉 (Ctrl+K)"
IDS_TOOLTIP_ROT_COUNCW "逆時針旋轉 (Ctrl+L)"
IDS_TOOLTIP_DELETE "Delete (DEL)"
IDS_TOOLTIP_PRINT "列印 (Ctrl+P)"
IDS_TOOLTIP_SAVEAS "另存新檔...(Ctrl+S)"
IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)"
IDS_TOOLTIP_HELP_TOC "Help topics (F1)"
END
STRINGTABLE

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

View file

@ -1,39 +1,60 @@
#pragma once
/* Icons */
#define IDI_APPICON 1
#define IDI_APP_ICON 1
#define IDI_BMP_ICON 2
#define IDI_GIF_ICON 3
#define IDI_JPG_ICON 4
#define IDI_PNG_ICON 5
#define IDB_PREVICON 50
#define IDB_NEXTICON 51
#define IDB_ZOOMPICON 52
#define IDB_ZOOMMICON 53
#define IDB_SAVEICON 54
#define IDB_PRINTICON 55
#define IDB_ROT1ICON 56
#define IDB_ROT2ICON 57
/* Toolbar images */
#define IDB_PREV_PIC 50
#define IDB_NEXT_PIC 51
#define IDB_BEST_FIT 52
#define IDB_REAL_SIZE 53
#define IDB_SLIDE_SHOW 54
#define IDB_ZOOM_IN 55
#define IDB_ZOOM_OUT 56
#define IDB_ROT_CLOCKW 57
#define IDB_ROT_COUNCW 58
#define IDB_DELETE 59
#define IDB_PRINT 60
#define IDB_SAVEAS 61
#define IDB_MODIFY 62
#define IDB_HELP_TOC 63
/* ToolBar buttons */
#define IDC_PREV 500
#define IDC_NEXT 501
#define IDC_ZOOMP 502
#define IDC_ZOOMM 503
#define IDC_SAVE 504
#define IDC_PRINT 505
#define IDC_ROT1 506
#define IDC_ROT2 507
#define IDC_TOOL_BASE 500
#define TBICON_PREV 0
#define TBICON_NEXT 1
#define TBICON_ZOOMP 2
#define TBICON_ZOOMM 3
#define TBICON_SAVE 4
#define TBICON_PRINT 5
#define TBICON_ROT1 6
#define TBICON_ROT2 7
#define IDC_PREV_PIC (IDC_TOOL_BASE + 0)
#define IDC_NEXT_PIC (IDC_TOOL_BASE + 1)
#define IDC_BEST_FIT (IDC_TOOL_BASE + 2)
#define IDC_REAL_SIZE (IDC_TOOL_BASE + 3)
#define IDC_SLIDE_SHOW (IDC_TOOL_BASE + 4)
#define IDC_ZOOM_IN (IDC_TOOL_BASE + 5)
#define IDC_ZOOM_OUT (IDC_TOOL_BASE + 6)
#define IDC_ROT_CLOCKW (IDC_TOOL_BASE + 7)
#define IDC_ROT_COUNCW (IDC_TOOL_BASE + 8)
#define IDC_DELETE (IDC_TOOL_BASE + 9)
#define IDC_PRINT (IDC_TOOL_BASE + 10)
#define IDC_SAVEAS (IDC_TOOL_BASE + 11)
#define IDC_MODIFY (IDC_TOOL_BASE + 12)
#define IDC_HELP_TOC (IDC_TOOL_BASE + 13)
#define TBICON_PREV_PIC 0
#define TBICON_NEXT_PIC 1
#define TBICON_BEST_FIT 2
#define TBICON_REAL_SIZE 3
#define TBICON_SLIDE_SHOW 4
#define TBICON_ZOOM_IN 5
#define TBICON_ZOOM_OUT 6
#define TBICON_ROT_CLOCKW 7
#define TBICON_ROT_COUNCW 8
#define TBICON_DELETE 9
#define TBICON_PRINT 10
#define TBICON_SAVEAS 11
#define TBICON_MODIFY 12
#define TBICON_HELP_TOC 13
/* Strings */
#define IDS_APPTITLE 100
@ -51,11 +72,20 @@
#define IDS_WMF_FILE 307
/* Tooltips strings */
#define IDS_TOOLTIP_NEXT_PIC 400
#define IDS_TOOLTIP_PREV_PIC 401
#define IDS_TOOLTIP_ZOOM_IN 402
#define IDS_TOOLTIP_ZOOM_OUT 404
#define IDS_TOOLTIP_ROT_CLOCKW 405
#define IDS_TOOLTIP_ROT_COUNCW 406
#define IDS_TOOLTIP_PRINT 407
#define IDS_TOOLTIP_SAVEAS 408
#define IDS_TOOLTIP_PREV_PIC 400
#define IDS_TOOLTIP_NEXT_PIC 401
#define IDS_TOOLTIP_BEST_FIT 402
#define IDS_TOOLTIP_REAL_SIZE 403
#define IDS_TOOLTIP_SLIDE_SHOW 404
#define IDS_TOOLTIP_ZOOM_IN 405
#define IDS_TOOLTIP_ZOOM_OUT 406
#define IDS_TOOLTIP_ROT_CLOCKW 407
#define IDS_TOOLTIP_ROT_COUNCW 408
#define IDS_TOOLTIP_DELETE 409
#define IDS_TOOLTIP_PRINT 410
#define IDS_TOOLTIP_SAVEAS 411
#define IDS_TOOLTIP_MODIFY 412
#define IDS_TOOLTIP_HELP_TOC 413
/* Keyboard accelerators */
#define IDR_ACCELERATOR 600

View file

@ -43,14 +43,73 @@ WNDPROC PrevProc = NULL;
HWND hDispWnd, hToolBar;
/* zooming */
#define MIN_ZOOM 10
#define MAX_ZOOM 1600
UINT ZoomPercents = 100;
static const UINT ZoomSteps[] =
{
10, 25, 50, 100, 200, 400, 800, 1600
};
#define MIN_ZOOM ZoomSteps[0]
#define MAX_ZOOM ZoomSteps[_countof(ZoomSteps)-1]
/* ToolBar Buttons */
typedef struct {
DWORD idb; /* Index to bitmap */
DWORD ids; /* Index to tooltip */
} TB_BUTTON_CONFIG;
/* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */
#define DEFINE_BTN_INFO(_name) \
{ TBICON_##_name, IDC_##_name, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }
#define DEFINE_BTN_SEPARATOR \
{ 15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0 }
/* ToolBar Buttons */
static const TBBUTTON Buttons[] =
{
DEFINE_BTN_INFO(PREV_PIC),
DEFINE_BTN_INFO(NEXT_PIC),
DEFINE_BTN_SEPARATOR,
DEFINE_BTN_INFO(BEST_FIT),
DEFINE_BTN_INFO(REAL_SIZE),
DEFINE_BTN_INFO(SLIDE_SHOW),
DEFINE_BTN_SEPARATOR,
DEFINE_BTN_INFO(ZOOM_IN),
DEFINE_BTN_INFO(ZOOM_OUT),
DEFINE_BTN_SEPARATOR,
DEFINE_BTN_INFO(ROT_CLOCKW),
DEFINE_BTN_INFO(ROT_COUNCW),
DEFINE_BTN_SEPARATOR,
DEFINE_BTN_INFO(DELETE),
DEFINE_BTN_INFO(PRINT),
DEFINE_BTN_INFO(SAVEAS),
DEFINE_BTN_INFO(MODIFY),
DEFINE_BTN_SEPARATOR,
DEFINE_BTN_INFO(HELP_TOC)
};
#define DEFINE_BTN_CONFIG(_name) { IDB_##_name, IDS_TOOLTIP_##_name }
static const TB_BUTTON_CONFIG BtnConfig[] =
{
DEFINE_BTN_CONFIG(PREV_PIC),
DEFINE_BTN_CONFIG(NEXT_PIC),
DEFINE_BTN_CONFIG(BEST_FIT),
DEFINE_BTN_CONFIG(REAL_SIZE),
DEFINE_BTN_CONFIG(SLIDE_SHOW),
DEFINE_BTN_CONFIG(ZOOM_IN),
DEFINE_BTN_CONFIG(ZOOM_OUT),
DEFINE_BTN_CONFIG(ROT_CLOCKW),
DEFINE_BTN_CONFIG(ROT_COUNCW),
DEFINE_BTN_CONFIG(DELETE),
DEFINE_BTN_CONFIG(PRINT),
DEFINE_BTN_CONFIG(SAVEAS),
DEFINE_BTN_CONFIG(MODIFY),
DEFINE_BTN_CONFIG(HELP_TOC)
};
/* animation */
UINT m_nFrameIndex = 0;
UINT m_nFrameCount = 0;
@ -203,11 +262,11 @@ static void ZoomInOrOut(BOOL bZoomIn)
ZoomPercents = ZoomSteps[i];
/* update tool bar buttons */
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_ZOOMM, TRUE);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_ZOOM_OUT, TRUE);
if (ZoomPercents >= MAX_ZOOM)
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_ZOOMP, FALSE);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_ZOOM_IN, FALSE);
else
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_ZOOMP, TRUE);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_ZOOM_IN, TRUE);
}
else /* zoom out */
{
@ -224,11 +283,11 @@ static void ZoomInOrOut(BOOL bZoomIn)
ZoomPercents = ZoomSteps[i];
/* update tool bar buttons */
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_ZOOMP, TRUE);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_ZOOM_IN, TRUE);
if (ZoomPercents <= MIN_ZOOM)
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_ZOOMM, FALSE);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_ZOOM_OUT, FALSE);
else
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_ZOOMM, TRUE);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_ZOOM_OUT, TRUE);
}
/* redraw */
@ -278,22 +337,6 @@ static void ResetZoom(void)
}
}
/* ToolBar Buttons */
static const TBBUTTON Buttons [] =
{ /* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */
{TBICON_PREV, IDC_PREV, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
{TBICON_NEXT, IDC_NEXT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
{15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
{TBICON_ZOOMP, IDC_ZOOMP, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
{TBICON_ZOOMM, IDC_ZOOMM, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
{15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
{TBICON_ROT1, IDC_ROT1, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
{TBICON_ROT2, IDC_ROT2, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
{15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
{TBICON_SAVE, IDC_SAVE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
{TBICON_PRINT, IDC_PRINT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
};
static void pLoadImage(LPWSTR szOpenFileName)
{
/* check file presence */
@ -439,8 +482,8 @@ pPrintImage(HWND hwnd)
static VOID
EnableToolBarButtons(BOOL bEnable)
{
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_SAVE, bEnable);
SendMessage(hToolBar, TB_ENABLEBUTTON, IDC_PRINT, bEnable);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_SAVEAS, bEnable);
SendMessageW(hToolBar, TB_ENABLEBUTTON, IDC_PRINT, bEnable);
}
static VOID
@ -598,6 +641,9 @@ pFreeFileList(SHIMGVW_FILENODE *root)
{
SHIMGVW_FILENODE *conductor;
if (!root)
return;
root->Prev->Next = NULL;
root->Prev = NULL;
@ -799,7 +845,7 @@ ImageView_SaveSettings(HWND hwnd)
static BOOL
ImageView_CreateToolBar(HWND hwnd)
{
INT numButtons = sizeof(Buttons) / sizeof(Buttons[0]);
int n;
hToolBar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL,
WS_CHILD | WS_VISIBLE | TBSTYLE_FLAT | CCS_BOTTOM | TBSTYLE_TOOLTIPS,
@ -809,45 +855,25 @@ ImageView_CreateToolBar(HWND hwnd)
{
HIMAGELIST hImageList;
SendMessage(hToolBar, TB_SETEXTENDEDSTYLE,
0, TBSTYLE_EX_HIDECLIPPEDBUTTONS);
SendMessageW(hToolBar, TB_SETEXTENDEDSTYLE,
0, TBSTYLE_EX_HIDECLIPPEDBUTTONS);
SendMessage(hToolBar, TB_BUTTONSTRUCTSIZE,
sizeof(Buttons[0]), 0);
SendMessageW(hToolBar, TB_BUTTONSTRUCTSIZE,
sizeof(Buttons[0]), 0);
hImageList = ImageList_Create(TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, ILC_MASK | ILC_COLOR24, 1, 1);
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_PREVICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_NEXTICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_ZOOMPICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_ZOOMMICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_SAVEICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_PRINTICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_ROT1ICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
ImageList_AddMasked(hImageList, LoadImage(hInstance, MAKEINTRESOURCE(IDB_ROT2ICON), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
if (hImageList == NULL) return FALSE;
ImageList_Destroy((HIMAGELIST)SendMessage(hToolBar, TB_SETIMAGELIST,
0, (LPARAM)hImageList));
for (n = 0; n < _countof(BtnConfig); n++)
{
ImageList_AddMasked(hImageList, LoadImageW(hInstance, MAKEINTRESOURCEW(BtnConfig[n].idb), IMAGE_BITMAP,
TB_IMAGE_WIDTH, TB_IMAGE_HEIGHT, LR_DEFAULTCOLOR), RGB(255, 255, 255));
}
SendMessage(hToolBar, TB_ADDBUTTONS,
numButtons, (LPARAM)Buttons);
ImageList_Destroy((HIMAGELIST)SendMessageW(hToolBar, TB_SETIMAGELIST,
0, (LPARAM)hImageList));
SendMessageW(hToolBar, TB_ADDBUTTONS, _countof(Buttons), (LPARAM)Buttons);
return TRUE;
}
@ -924,7 +950,7 @@ ImageView_OnSize(HWND hwnd, UINT state, INT cx, INT cy)
{
RECT rc;
SendMessage(hToolBar, TB_AUTOSIZE, 0, 0);
SendMessageW(hToolBar, TB_AUTOSIZE, 0, 0);
GetWindowRect(hToolBar, &rc);
@ -949,46 +975,41 @@ ImageView_WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
return 0L;
}
case WM_KEYDOWN:
switch (LOWORD(wParam))
{
case VK_LEFT:
PostMessage(hwnd, WM_COMMAND, MAKEWPARAM(IDC_PREV, BN_CLICKED), (LPARAM)NULL);
break;
case VK_RIGHT:
PostMessage(hwnd, WM_COMMAND, MAKEWPARAM(IDC_NEXT, BN_CLICKED), (LPARAM)NULL);
break;
}
break;
case WM_COMMAND:
{
switch (wParam)
switch (LOWORD(wParam))
{
case IDC_PREV:
{
case IDC_PREV_PIC:
currentFile = currentFile->Prev;
pLoadImageFromNode(currentFile, hwnd);
}
break;
break;
case IDC_NEXT:
{
case IDC_NEXT_PIC:
currentFile = currentFile->Next;
pLoadImageFromNode(currentFile, hwnd);
}
break;
break;
case IDC_ZOOMP:
case IDC_BEST_FIT:
DPRINT1("IDC_BEST_FIT unimplemented\n");
break;
case IDC_REAL_SIZE:
DPRINT1("IDC_REAL_SIZE unimplemented\n");
break;
case IDC_SLIDE_SHOW:
DPRINT1("IDC_SLIDE_SHOW unimplemented\n");
break;
case IDC_ZOOM_IN:
ZoomInOrOut(TRUE);
break;
case IDC_ZOOMM:
case IDC_ZOOM_OUT:
ZoomInOrOut(FALSE);
break;
case IDC_SAVE:
case IDC_SAVEAS:
pSaveImageAs(hwnd);
break;
@ -996,25 +1017,21 @@ ImageView_WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
pPrintImage(hwnd);
break;
case IDC_ROT1:
{
case IDC_ROT_CLOCKW:
if (image)
{
GdipImageRotateFlip(image, Rotate270FlipNone);
ImageView_UpdateWindow(hwnd);
}
break;
}
case IDC_ROT2:
{
case IDC_ROT_COUNCW:
if (image)
{
GdipImageRotateFlip(image, Rotate90FlipNone);
ImageView_UpdateWindow(hwnd);
}
break;
}
}
}
break;
@ -1033,40 +1050,12 @@ ImageView_WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
case TTN_GETDISPINFO:
{
LPTOOLTIPTEXT lpttt;
UINT idButton;
LPTOOLTIPTEXTW lpttt;
lpttt = (LPTOOLTIPTEXT)lParam;
idButton = (UINT)lpttt->hdr.idFrom;
lpttt = (LPTOOLTIPTEXTW)lParam;
lpttt->hinst = hInstance;
switch (idButton)
{
case IDC_PREV:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_PREV_PIC);
break;
case IDC_NEXT:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_NEXT_PIC);
break;
case IDC_ZOOMP:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_ZOOM_IN);
break;
case IDC_ZOOMM:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_ZOOM_OUT);
break;
case IDC_SAVE:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_SAVEAS);
break;
case IDC_PRINT:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_PRINT);
break;
case IDC_ROT1:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_ROT_COUNCW);
break;
case IDC_ROT2:
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_ROT_CLOCKW);
break;
}
lpttt->lpszText = MAKEINTRESOURCEW(BtnConfig[lpttt->hdr.idFrom - IDC_TOOL_BASE].ids);
return TRUE;
}
}
@ -1104,11 +1093,15 @@ ImageView_CreateWindow(HWND hwnd, LPWSTR szFileName)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
WNDCLASS WndClass = {0};
TCHAR szBuf[512];
WNDCLASSW WndClass = {0};
WCHAR szBuf[512];
WCHAR szInitialFile[MAX_PATH];
HWND hMainWnd;
MSG msg;
HACCEL hKbdAccel;
INITCOMMONCONTROLSEX Icc = { .dwSize = sizeof(Icc), .dwICC = ICC_WIN95_CLASSES };
InitCommonControlsEx(&Icc);
if (!ImageView_LoadSettings())
{
@ -1129,24 +1122,24 @@ ImageView_CreateWindow(HWND hwnd, LPWSTR szFileName)
pLoadImage(szFileName);
// Create the window
WndClass.lpszClassName = _T("shimgvw_window");
WndClass.lpszClassName = L"shimgvw_window";
WndClass.lpfnWndProc = ImageView_WndProc;
WndClass.hInstance = hInstance;
WndClass.style = CS_HREDRAW | CS_VREDRAW;
WndClass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_APPICON));
WndClass.hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_APP_ICON));
WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WndClass.hbrBackground = NULL; /* less flicker */
if (!RegisterClass(&WndClass)) return -1;
if (!RegisterClassW(&WndClass)) return -1;
LoadString(hInstance, IDS_APPTITLE, szBuf, sizeof(szBuf) / sizeof(TCHAR));
hMainWnd = CreateWindow(_T("shimgvw_window"), szBuf,
WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CAPTION,
CW_USEDEFAULT, CW_USEDEFAULT,
0, 0, NULL, NULL, hInstance, NULL);
LoadStringW(hInstance, IDS_APPTITLE, szBuf, sizeof(szBuf) / sizeof(TCHAR));
hMainWnd = CreateWindowExW(0, L"shimgvw_window", szBuf,
WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CAPTION,
CW_USEDEFAULT, CW_USEDEFAULT,
0, 0, NULL, NULL, hInstance, NULL);
// make sure the path has no quotes on it
wcscpy(szInitialFile, szFileName);
StringCbCopyW(szInitialFile, sizeof(szInitialFile), szFileName);
PathUnquoteSpacesW(szInitialFile);
currentFile = pBuildFileList(szInitialFile);
@ -1155,17 +1148,29 @@ ImageView_CreateWindow(HWND hwnd, LPWSTR szFileName)
pLoadImageFromNode(currentFile, hMainWnd);
}
/* Create accelerator table for keystrokes */
hKbdAccel = LoadAcceleratorsW(hInstance, MAKEINTRESOURCEW(IDR_ACCELERATOR));
// Show it
ShowWindow(hMainWnd, SW_SHOW);
UpdateWindow(hMainWnd);
// Message Loop
while(GetMessage(&msg,NULL,0,0))
for (;;)
{
TranslateMessage(&msg);
DispatchMessageW(&msg);
if (GetMessageW(&msg, NULL, 0, 0) <= 0)
break;
if (!TranslateAcceleratorW(hMainWnd, hKbdAccel, &msg))
{
TranslateMessage(&msg);
DispatchMessageW(&msg);
}
}
/* Destroy accelerator table */
DestroyAcceleratorTable(hKbdAccel);
pFreeFileList(currentFile);
if (image)

View file

@ -13,18 +13,42 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include <reactos/manifest_hosted.rc>
IDI_APPICON ICON "res/main.ico"
IDI_APP_ICON ICON "res/main.ico"
IDI_BMP_ICON ICON "res/bmp.ico"
IDI_PNG_ICON ICON "res/png.ico"
IDB_PREVICON BITMAP "res/prev.bmp"
IDB_NEXTICON BITMAP "res/next.bmp"
IDB_ZOOMPICON BITMAP "res/zoomp.bmp"
IDB_ZOOMMICON BITMAP "res/zoomm.bmp"
IDB_SAVEICON BITMAP "res/save.bmp"
IDB_PRINTICON BITMAP "res/print.bmp"
IDB_ROT1ICON BITMAP "res/rot1.bmp"
IDB_ROT2ICON BITMAP "res/rot2.bmp"
IDB_PREV_PIC BITMAP "res/prev.bmp"
IDB_NEXT_PIC BITMAP "res/next.bmp"
IDB_BEST_FIT BITMAP "res/best_fit.bmp"
IDB_REAL_SIZE BITMAP "res/real_size.bmp"
IDB_SLIDE_SHOW BITMAP "res/slide_show.bmp"
IDB_ZOOM_IN BITMAP "res/zoomp.bmp"
IDB_ZOOM_OUT BITMAP "res/zoomm.bmp"
IDB_ROT_CLOCKW BITMAP "res/rot1.bmp"
IDB_ROT_COUNCW BITMAP "res/rot2.bmp"
IDB_DELETE BITMAP "res/delete.bmp"
IDB_PRINT BITMAP "res/print.bmp"
IDB_SAVEAS BITMAP "res/save.bmp"
IDB_MODIFY BITMAP "res/modify.bmp"
IDB_HELP_TOC BITMAP "res/help_toc.bmp"
IDR_ACCELERATOR ACCELERATORS
BEGIN
VK_LEFT, IDC_PREV_PIC, VIRTKEY
VK_RIGHT, IDC_NEXT_PIC, VIRTKEY
"B", IDC_BEST_FIT, VIRTKEY, CONTROL
"A", IDC_REAL_SIZE, VIRTKEY, CONTROL
VK_F11, IDC_SLIDE_SHOW, VIRTKEY
VK_ADD, IDC_ZOOM_IN, VIRTKEY
VK_SUBTRACT, IDC_ZOOM_OUT, VIRTKEY
"K", IDC_ROT_COUNCW, VIRTKEY, CONTROL
"L", IDC_ROT_COUNCW, VIRTKEY, CONTROL
VK_DELETE, IDC_DELETE, VIRTKEY
"P", IDC_PRINT, VIRTKEY, CONTROL
"S", IDC_SAVEAS, VIRTKEY, CONTROL
"E", IDC_MODIFY, VIRTKEY, CONTROL
VK_F1, IDC_HELP_TOC, VIRTKEY
END
/* UTF-8 */
#pragma code_page(65001)