Author: cfinck
Date: Thu Jul 26 11:43:01 2007
New Revision: 27821
URL:
http://svn.reactos.org/svn/reactos?rev=27821&view=rev
Log:
- Remove all the VS stuff from the english resource file and make it
readable/editable/translateable
- Remove some redundant resources
- Fix some typos
- Use RegisterClass instead of RegisterClassEx in the MyRegisterClass function: This way
we don't need a resource for the small icon, but it works the same
- Add a "rsrc.rc" file
Added:
trunk/rosapps/magnify/rsrc.rc
Modified:
trunk/rosapps/magnify/lang/en-US.rc
trunk/rosapps/magnify/magnifier.c
trunk/rosapps/magnify/magnify.rc
trunk/rosapps/magnify/resource.h
Modified: trunk/rosapps/magnify/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/magnify/lang/en-US.rc?rev=…
==============================================================================
--- trunk/rosapps/magnify/lang/en-US.rc (original)
+++ trunk/rosapps/magnify/lang/en-US.rc Thu Jul 26 11:43:01 2007
@@ -1,62 +1,4 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Neutral resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
-#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON ICON "res/magnify.ico"
-#endif // Neutral resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_MAGNIFIER ICON "res/Magnify.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
IDC_MAGNIFIER MENU
BEGIN
@@ -69,33 +11,21 @@
END
END
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-
IDC_MAGNIFIER ACCELERATORS
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
END
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
IDD_ABOUTBOX DIALOGEX 22, 17, 220, 75
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- ICON IDI_MAGNIFIER,IDC_MYICON,14,9,20,20
+ ICON IDI_ICON,IDC_MYICON,14,9,20,20
LTEXT "Magnifier Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
LTEXT "Copyright (C) 2007 Marc Piulachs
(marc.piulachs(a)codexchange.net)",IDC_STATIC,48,24,125,22
- PUSHBUTTON "Ok",IDOK,162,48,50,14
+ PUSHBUTTON "OK",IDOK,162,48,50,14
END
IDD_DIALOGOPTIONS DIALOGEX 0, 0, 153, 182
@@ -105,12 +35,12 @@
BEGIN
DEFPUSHBUTTON "Exit",IDOK,96,161,50,14
PUSHBUTTON "Help",IDOK,38,161,50,14
- LTEXT "Magnification level :",IDC_STATIC,6,12,68,8
+ LTEXT "Magnification level:",IDC_STATIC,6,12,68,8
COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
GROUPBOX "Tracking",IDC_STATIC,7,25,139,59
GROUPBOX "Presentation",IDC_STATIC,7,87,139,57
CONTROL "Follow mouse
cursor",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,18,42,114,10
- CONTROL "Follow keyboard
focus",IDC_FOLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,18,54,114,10
+ CONTROL "Follow keyboard
focus",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,18,54,114,10
CONTROL "Follow text
editing",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,18,66,114,10
CONTROL "Invert
colors",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,18,102,114,10
CONTROL "Start
Minimized",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,18,114,114,10
@@ -123,91 +53,13 @@
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,193,76,50,14
- ICON IDI_MAGNIFIER,IDC_STATIC,7,17,20,20
- LTEXT "Magnifier is intended to provide a minium level of funcionality
for users with slight visual impairments. Most users with visual impairments will need a
magnigication utility with higher funcionality for deily
use.",IDC_STATIC,36,7,207,33
- CONTROL "Do not show this message again",IDC_SHOWWARNINGCHECK,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10
+ ICON IDI_ICON,IDC_STATIC,7,17,20,20
+ LTEXT "Magnifier is intended to provide a minimum level of
functionality for users with slight visual impairments. Most users with visual impairments
will need a magnification utility with higher funcionality for daily
use.",IDC_STATIC,36,7,207,33
+ CONTROL "Do not show this message again",IDC_SHOWWARNINGCHECK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10
END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_DIALOGOPTIONS, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 146
- TOPMARGIN, 7
- BOTTOMMARGIN, 175
- END
-
- IDD_WARNINGDIALOG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 243
- TOPMARGIN, 7
- BOTTOMMARGIN, 90
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
STRINGTABLE
BEGIN
IDS_APP_TITLE "Magnifier"
IDC_MAGNIFIER "MAGNIFIER"
END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
Modified: trunk/rosapps/magnify/magnifier.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/magnify/magnifier.c?rev=27…
==============================================================================
--- trunk/rosapps/magnify/magnifier.c (original)
+++ trunk/rosapps/magnify/magnifier.c Thu Jul 26 11:43:01 2007
@@ -98,23 +98,20 @@
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
- WNDCLASSEX wcex;
-
- wcex.cbSize = sizeof(WNDCLASSEX);
-
- wcex.style = CS_HREDRAW | CS_VREDRAW;
- wcex.lpfnWndProc = WndProc;
- wcex.cbClsExtra = 0;
- wcex.cbWndExtra = 0;
- wcex.hInstance = hInstance;
- wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAGNIFIER));
- wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
- wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
- wcex.lpszMenuName = MAKEINTRESOURCE(IDC_MAGNIFIER);
- wcex.lpszClassName = szWindowClass;
- wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
-
- return RegisterClassEx(&wcex);
+ WNDCLASS wc;
+
+ wc.style = CS_HREDRAW | CS_VREDRAW;
+ wc.lpfnWndProc = WndProc;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = hInstance;
+ wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON));
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
+ wc.lpszMenuName = MAKEINTRESOURCE(IDC_MAGNIFIER);
+ wc.lpszClassName = szWindowClass;
+
+ return RegisterClass(&wc);
}
//
@@ -463,7 +460,7 @@
SendDlgItemMessage(hDlg,IDC_FOLLOWMOUSECHECK,BM_SETCHECK , wParam ,0);
if (bFollowFocus)
- SendDlgItemMessage(hDlg,IDC_FOLOWKEYBOARDCHECK,BM_SETCHECK , wParam ,0);
+ SendDlgItemMessage(hDlg,IDC_FOLLOWKEYBOARDCHECK,BM_SETCHECK , wParam ,0);
if (bFollowCaret)
SendDlgItemMessage(hDlg,IDC_FOLLOWTEXTEDITINGCHECK,BM_SETCHECK , wParam ,0);
@@ -513,8 +510,8 @@
case IDC_FOLLOWMOUSECHECK:
bFollowMouse = IsDlgButtonChecked (hDlg, IDC_FOLLOWMOUSECHECK);
break;
- case IDC_FOLOWKEYBOARDCHECK:
- bFollowFocus = IsDlgButtonChecked (hDlg, IDC_FOLOWKEYBOARDCHECK);
+ case IDC_FOLLOWKEYBOARDCHECK:
+ bFollowFocus = IsDlgButtonChecked (hDlg, IDC_FOLLOWKEYBOARDCHECK);
break;
case IDC_FOLLOWTEXTEDITINGCHECK:
bFollowCaret = IsDlgButtonChecked (hDlg, IDC_FOLLOWTEXTEDITINGCHECK);
Modified: trunk/rosapps/magnify/magnify.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/magnify/magnify.rc?rev=278…
==============================================================================
--- trunk/rosapps/magnify/magnify.rc (original)
+++ trunk/rosapps/magnify/magnify.rc Thu Jul 26 11:43:01 2007
@@ -1,6 +1,8 @@
#include <windows.h>
#include <commctrl.h>
#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Magnifier\0"
#define REACTOS_STR_INTERNAL_NAME "magnify\0"
@@ -8,4 +10,6 @@
#include <reactos/version.rc>
-#include "lang/en-US.rc"
+IDI_ICON ICON "res/magnify.ico"
+
+#include "rsrc.rc"
Modified: trunk/rosapps/magnify/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/magnify/resource.h?rev=278…
==============================================================================
--- trunk/rosapps/magnify/resource.h (original)
+++ trunk/rosapps/magnify/resource.h Thu Jul 26 11:43:01 2007
@@ -1,22 +1,19 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by Magnifier.rc
-//
-#define IDC_MYICON 2
+#define IDC_STATIC -1
+
+#define IDI_ICON 101
#define IDD_MAGNIFIER_DIALOG 102
#define IDS_APP_TITLE 103
#define IDD_ABOUTBOX 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
-#define IDI_MAGNIFIER 107
-#define IDI_SMALL 108
+#define IDC_MYICON 106
#define IDC_MAGNIFIER 109
#define IDR_MAINFRAME 128
#define IDD_DIALOGOPTIONS 129
#define IDD_WARNINGDIALOG 130
#define IDC_ZOOM 1000
#define IDC_CHECK1 1001
-#define IDC_FOLOWKEYBOARDCHECK 1002
+#define IDC_FOLLOWKEYBOARDCHECK 1002
#define IDC_FOLLOWTEXTEDITINGCHECK 1003
#define IDC_INVERTCOLORSCHECK 1004
#define IDC_STARTMINIMIZEDCHECK 1005
@@ -28,16 +25,3 @@
#define ID_FILE_OPTIONS 32771
#define ID_OPTIONS 32772
#define IDM_OPTIONS 32773
-#define IDC_STATIC -1
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 131
-#define _APS_NEXT_COMMAND_VALUE 32774
-#define _APS_NEXT_CONTROL_VALUE 1009
-#define _APS_NEXT_SYMED_VALUE 110
-#endif
-#endif
Added: trunk/rosapps/magnify/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/magnify/rsrc.rc?rev=27821&…
==============================================================================
--- trunk/rosapps/magnify/rsrc.rc (added)
+++ trunk/rosapps/magnify/rsrc.rc Thu Jul 26 11:43:01 2007
@@ -1,0 +1,4 @@
+#include <windows.h>
+#include "resource.h"
+
+#include "lang/en-US.rc"