From faa96fba14b6ec21329c4e1cc718a28ec2f20859 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Tue, 5 Feb 2008 15:12:35 +0000 Subject: [PATCH] - Don't set a fixed size for the application name, allocate the needed memory dynamically using AllocAndLoadString - Small fixes to the german translation svn path=/trunk/; revision=32138 --- rosapps/devutils/vgafontedit/lang/de-DE.rc | 16 ++++++++-------- rosapps/devutils/vgafontedit/main.c | 5 +++++ rosapps/devutils/vgafontedit/mainwnd.c | 2 -- rosapps/devutils/vgafontedit/precomp.h | 4 +--- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/rosapps/devutils/vgafontedit/lang/de-DE.rc b/rosapps/devutils/vgafontedit/lang/de-DE.rc index f004133bdb0..d55985b1d01 100644 --- a/rosapps/devutils/vgafontedit/lang/de-DE.rc +++ b/rosapps/devutils/vgafontedit/lang/de-DE.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL IDD_ABOUT DIALOGEX 10, 10, 130, 62 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "Über" +CAPTION "Info" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 20, 20 @@ -22,7 +22,7 @@ END IDD_EDITGLYPH DIALOGEX 10, 10, 246, 197 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Glyphen bearbeiten" +CAPTION "Schriftzeichen bearbeiten" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_EDIT_GLYPH_TOOLBOX, TOOLBARCLASSNAMEA, CCS_NODIVIDER | CCS_NORESIZE, 5, 5, 24, 82 @@ -39,7 +39,7 @@ BEGIN BEGIN MENUITEM "&Neu\tStrg+N", ID_FILE_NEW MENUITEM "&Öffnen...\tStrg+O", ID_FILE_OPEN - MENUITEM "Schliessen", ID_FILE_CLOSE + MENUITEM "Schließen", ID_FILE_CLOSE MENUITEM SEPARATOR MENUITEM "Speichern\tStrg+S", ID_FILE_SAVE MENUITEM "Speichern unter...", ID_FILE_SAVE_AS @@ -59,19 +59,19 @@ BEGIN POPUP "&Hilfe" BEGIN - MENUITEM "&Über...", ID_HELP_ABOUT + MENUITEM "&Info...", ID_HELP_ABOUT END END STRINGTABLE BEGIN - IDS_OPENFILTER, "Alle unterstützten Formate (*.bin,*.psf)|*.bin;*.psf|Binary Font Files (*.bin)|*.bin|PC Screen Fonts Version 1 (*.psf)|*.psf|" - IDS_SAVEFILTER, "Binäre Font Dateien (*.bin)|*.bin|" + IDS_OPENFILTER, "Alle unterstützten Formate (*.bin,*.psf)|*.bin;*.psf|Binäre Schriftdateien (*.bin)|*.bin|PC Screen Fonts Version 1 (*.psf)|*.psf|" + IDS_SAVEFILTER, "Binäre Schriftdateien (*.bin)|*.bin|" IDS_OPENERROR, "Fehler beim Öffnen der Datei! (Fehlernummer %1!u!)" IDS_READERROR, "Fehler beim Lesen der Datei! (Fehlernummer %1!u!)" IDS_WRITEERROR, "Fehler beim Schreiben der Datei! (Fehlernummer %1!u!)" IDS_UNSUPPORTEDFORMAT, "Nicht unterstütztes Dateiformat!" - IDS_UNSUPPORTEDPSF, "Nicht unterstütztes PSF Font Format! Der Editor unterstützt nur Fonts im Format 8x8 ohne spezielle Modi." + IDS_UNSUPPORTEDPSF, "Nicht unterstütztes PSF-Format! Der Editor unterstützt nur Fonts im Format 8x8 ohne spezielle Modi." IDS_DOCNAME, "Font %1!u!" IDS_SAVEPROMPT, "Die Datei ""%1"" wurde geändert.\n\nMöchten Sie die Änderungen speichern?" IDS_APPTITLE, "ReactOS VGA Font Editor" @@ -79,5 +79,5 @@ BEGIN IDS_TOOLTIP_NEW, "Neu" IDS_TOOLTIP_OPEN, "Öffnen" IDS_TOOLTIP_SAVE, "Speichern" - IDS_TOOLTIP_EDIT_GLYPH, "Glyphen bearbeiten" + IDS_TOOLTIP_EDIT_GLYPH, "Schriftzeichen bearbeiten" END diff --git a/rosapps/devutils/vgafontedit/main.c b/rosapps/devutils/vgafontedit/main.c index 50721e7bc7a..690776fa693 100644 --- a/rosapps/devutils/vgafontedit/main.c +++ b/rosapps/devutils/vgafontedit/main.c @@ -10,6 +10,7 @@ HINSTANCE hInstance; HANDLE hProcessHeap; +PWSTR szAppName; INT WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) @@ -25,6 +26,8 @@ wWinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdSho hInstance = hInst; hProcessHeap = GetProcessHeap(); + AllocAndLoadString(&szAppName, IDS_APPTITLE); + hAccel = LoadAcceleratorsW( hInstance, MAKEINTRESOURCEW(IDA_MAINACCELERATORS) ); if( InitMainWndClass() && InitFontWndClass() && InitFontBoxesWndClass() && InitEditGlyphWndClasses() ) @@ -45,6 +48,8 @@ wWinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdSho } } + HeapFree(hProcessHeap, 0, szAppName); + // Just unregister our window classes, don't care whether they were created or not UnInitEditGlyphWndClasses(); UnInitFontBoxesWndClass(); diff --git a/rosapps/devutils/vgafontedit/mainwnd.c b/rosapps/devutils/vgafontedit/mainwnd.c index 973d9c50ed0..2c50fb526eb 100644 --- a/rosapps/devutils/vgafontedit/mainwnd.c +++ b/rosapps/devutils/vgafontedit/mainwnd.c @@ -433,8 +433,6 @@ CreateMainWindow(IN INT nCmdShow, OUT PMAIN_WND_INFO* Info) { (*Info)->nCmdShow = nCmdShow; - LoadString(hInstance, IDS_APPTITLE, szAppName, MAX_STRING); - hMainWnd = CreateWindowExW(0, szMainWndClass, szAppName, diff --git a/rosapps/devutils/vgafontedit/precomp.h b/rosapps/devutils/vgafontedit/precomp.h index 234dd8f9915..935be09df56 100644 --- a/rosapps/devutils/vgafontedit/precomp.h +++ b/rosapps/devutils/vgafontedit/precomp.h @@ -15,8 +15,6 @@ #include "resource.h" #include "customwndclasses.h" -#define MAX_STRING 128 - // Forward declarations typedef struct _FONT_WND_INFO FONT_WND_INFO, *PFONT_WND_INFO; @@ -139,7 +137,7 @@ BOOL InitFontWndClass(VOID); VOID UnInitFontWndClass(VOID); // main.c -WCHAR szAppName[MAX_STRING]; +extern PWSTR szAppName; extern HINSTANCE hInstance; extern HANDLE hProcessHeap;