ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2023
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
139 discussions
Start a n
N
ew thread
[reactos] 01/01: [NOTEPAD] Use _CrtSetDbgFlag to check memory leak (#5151)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9abd9b667a23afa916f9e…
commit 9abd9b667a23afa916f9eedc7d0e65577a38c53f Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Mar 14 07:08:56 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 14 07:08:56 2023 +0900 [NOTEPAD] Use _CrtSetDbgFlag to check memory leak (#5151) We can borrow the power of CRT debug. These changes are effective for debug version only: - Insert #include <crtdbg.h> at main.c. - Call _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF) at the prologue of _tWinMain. CORE-18837 --- base/applications/notepad/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/base/applications/notepad/main.c b/base/applications/notepad/main.c index 6c3ec3d6d19..f9e437f7720 100644 --- a/base/applications/notepad/main.c +++ b/base/applications/notepad/main.c @@ -27,6 +27,10 @@ #include <shlobj.h> #include <strsafe.h> +#ifdef _DEBUG +#include <crtdbg.h> +#endif + NOTEPAD_GLOBALS Globals; static ATOM aFINDMSGSTRING; @@ -565,10 +569,14 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh MONITORINFO info; INT x, y; RECT rcIntersect; - static const TCHAR className[] = _T("Notepad"); static const TCHAR winName[] = _T("Notepad"); +#ifdef _DEBUG + /* Report any memory leaks on exit */ + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +#endif + switch (GetUserDefaultUILanguage()) { case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NETSHELL] Shrink radio buttons vertically (#5157)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c766ee9ebba49df62ac99…
commit c766ee9ebba49df62ac995b2bb276862d1cc622c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Mar 14 07:03:54 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 14 07:03:54 2023 +0900 [NETSHELL] Shrink radio buttons vertically (#5157) - Fix the visual glitch of the network settings dialog of 2nd setup. - Shrink the IDC_NETWORK_TYPICAL and IDC_NETWORK_CUSTOM radio buttons of IDD_NETWORKSETTINGSPAGE resource dialog vertically not to be overlapped. CORE-18874 --- dll/shellext/netshell/lang/bg-BG.rc | 4 ++-- dll/shellext/netshell/lang/cs-CZ.rc | 4 ++-- dll/shellext/netshell/lang/da-DK.rc | 4 ++-- dll/shellext/netshell/lang/de-DE.rc | 4 ++-- dll/shellext/netshell/lang/el-GR.rc | 4 ++-- dll/shellext/netshell/lang/en-US.rc | 4 ++-- dll/shellext/netshell/lang/es-ES.rc | 4 ++-- dll/shellext/netshell/lang/fr-FR.rc | 4 ++-- dll/shellext/netshell/lang/he-IL.rc | 4 ++-- dll/shellext/netshell/lang/hi-IN.rc | 4 ++-- dll/shellext/netshell/lang/hu-HU.rc | 4 ++-- dll/shellext/netshell/lang/id-ID.rc | 4 ++-- dll/shellext/netshell/lang/it-IT.rc | 4 ++-- dll/shellext/netshell/lang/ja-JP.rc | 4 ++-- dll/shellext/netshell/lang/nl-NL.rc | 4 ++-- dll/shellext/netshell/lang/no-NO.rc | 4 ++-- dll/shellext/netshell/lang/pt-PT.rc | 4 ++-- dll/shellext/netshell/lang/ro-RO.rc | 4 ++-- dll/shellext/netshell/lang/ru-RU.rc | 4 ++-- dll/shellext/netshell/lang/sk-SK.rc | 4 ++-- dll/shellext/netshell/lang/sq-AL.rc | 4 ++-- dll/shellext/netshell/lang/sv-SE.rc | 4 ++-- dll/shellext/netshell/lang/tr-TR.rc | 4 ++-- dll/shellext/netshell/lang/uk-UA.rc | 4 ++-- dll/shellext/netshell/lang/zh-CN.rc | 4 ++-- dll/shellext/netshell/lang/zh-HK.rc | 4 ++-- dll/shellext/netshell/lang/zh-TW.rc | 4 ++-- 27 files changed, 54 insertions(+), 54 deletions(-) diff --git a/dll/shellext/netshell/lang/bg-BG.rc b/dll/shellext/netshell/lang/bg-BG.rc index 002b525a593..afe4f1feade 100644 --- a/dll/shellext/netshell/lang/bg-BG.rc +++ b/dll/shellext/netshell/lang/bg-BG.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/cs-CZ.rc b/dll/shellext/netshell/lang/cs-CZ.rc index a6afc239aae..4289187994d 100644 --- a/dll/shellext/netshell/lang/cs-CZ.rc +++ b/dll/shellext/netshell/lang/cs-CZ.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Zvolte, zda chcete použít typická nastavení nebo si je přizpůsobit:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typická nastavení", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Přizpůsobit", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typická nastavení", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Přizpůsobit", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Vytvoří připojení k síti pomocí Síťového klienta ReactOS, sdílení souborů a tiskáren a nastaví automatickou adresu protokolu TCP/IP.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Umožní ruční nastavení sítě.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/da-DK.rc b/dll/shellext/netshell/lang/da-DK.rc index 26b8287135d..2ea3ff413ef 100644 --- a/dll/shellext/netshell/lang/da-DK.rc +++ b/dll/shellext/netshell/lang/da-DK.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/de-DE.rc b/dll/shellext/netshell/lang/de-DE.rc index 8fe327084de..2ff01655446 100644 --- a/dll/shellext/netshell/lang/de-DE.rc +++ b/dll/shellext/netshell/lang/de-DE.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Wählen Sie, ob Standard- oder benutzerdefinierte Einstellungen verwendet werden sollen:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Standardeinstellungen", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Benutzerdefinierte Einstellungen", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Standardeinstellungen", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Benutzerdefinierte Einstellungen", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Erstellt Netzwerkverbindungen unter Verwendung des Clients für ReactOS-Netzwerke, Datei- und Druckerfreigabe für ReactOS-Netzwerke und des TCP/IP-Transportprotokolls mit automatischer Adressierung.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Ermöglicht die manuelle Konfiguration von Netzwerkkomponenten.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/el-GR.rc b/dll/shellext/netshell/lang/el-GR.rc index 4c15fa7aa96..7ba053088e5 100644 --- a/dll/shellext/netshell/lang/el-GR.rc +++ b/dll/shellext/netshell/lang/el-GR.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/en-US.rc b/dll/shellext/netshell/lang/en-US.rc index b4ee99d6133..07ef0ae842b 100644 --- a/dll/shellext/netshell/lang/en-US.rc +++ b/dll/shellext/netshell/lang/en-US.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/es-ES.rc b/dll/shellext/netshell/lang/es-ES.rc index fa19c8a3b2d..fff2a10b18d 100644 --- a/dll/shellext/netshell/lang/es-ES.rc +++ b/dll/shellext/netshell/lang/es-ES.rc @@ -91,8 +91,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Elija entre usar una configuración típica o personalizada:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Configuración típica", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Configuración personalizada", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Configuración típica", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Configuración personalizada", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Crea conexiones de red usando el Cliente para Redes de ReactOS, Archivos e Impresoras Compartidas para Redes de ReactOS, y el protocolo TCP/IP con direccionamiento automático.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Le permite configurar manualmente componentes de red.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/fr-FR.rc b/dll/shellext/netshell/lang/fr-FR.rc index a02068e5175..8225dc576f0 100644 --- a/dll/shellext/netshell/lang/fr-FR.rc +++ b/dll/shellext/netshell/lang/fr-FR.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Faut-il utiliser des paramètres par défaut ou des spécifiques :", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Paramètres par défaut", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Paramètres spécifiques", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Paramètres par défaut", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Paramètres spécifiques", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Crée les connexions réseau en utilisant le client pour les réseaux ReactOS, le partage des fichiers et des imprimantes pour les réseaux ReactOS, et le protocole de transport TCP/IP avec adressage automatique.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Cela vous autorise à configurer manuellement les composants réseau.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/he-IL.rc b/dll/shellext/netshell/lang/he-IL.rc index ec9c451b8bf..aa2cc1476fb 100644 --- a/dll/shellext/netshell/lang/he-IL.rc +++ b/dll/shellext/netshell/lang/he-IL.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/hi-IN.rc b/dll/shellext/netshell/lang/hi-IN.rc index 47501ee5abd..1a4d1968f06 100644 --- a/dll/shellext/netshell/lang/hi-IN.rc +++ b/dll/shellext/netshell/lang/hi-IN.rc @@ -90,8 +90,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "चुनें कि ठेठ या कस्टम सेटिंग्स का उपयोग करना है या नहीं:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "ठेठ सेटिंग्स", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "कस्टम सेटिंग्स", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "ठेठ सेटिंग्स", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "कस्टम सेटिंग्स", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "रिऐक्ट ओएस नेटवर्क के लिए क्लाइंट का उपयोग करके नेटवर्क कनेक्शन बनाता है, रिऐक्ट ओएस नेटवर्क के लिए फ़ाइल और प्रिंट शेयरिंग, और स्वचालित पते के साथ टीसीपी / आईपी परिवहन प्रोटोकॉल।", IDC_STATIC, 65, 45, 240, 30 LTEXT "आपको नेटवर्क कम्पोनन्ट को मैन्युअल रूप से कॉन्फ़िगर करने की अनुमति देता है।", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/hu-HU.rc b/dll/shellext/netshell/lang/hu-HU.rc index 2c11075e694..26f5513dc91 100644 --- a/dll/shellext/netshell/lang/hu-HU.rc +++ b/dll/shellext/netshell/lang/hu-HU.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Kérjük válasszon hogy tipikus vagy egyedi beállításokat szeretne:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Tipikus beállítások", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Egyedi beállítások", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Tipikus beállítások", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Egyedi beállítások", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Hálózati kapcsolatokat hoz létre a ReactOS Networks ügyfél, ReactOS Networks fájl- és nyomtatómegosztás, valamint az automatikus címzésű TCP/IP átviteli protokoll használatával.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Lehetővé teszi hogy kézzel állítsa be a hálózati összetevőket.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/id-ID.rc b/dll/shellext/netshell/lang/id-ID.rc index c86de12e25f..72d8c49af25 100644 --- a/dll/shellext/netshell/lang/id-ID.rc +++ b/dll/shellext/netshell/lang/id-ID.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/it-IT.rc b/dll/shellext/netshell/lang/it-IT.rc index 5dcebcc84bb..5c1754be95b 100644 --- a/dll/shellext/netshell/lang/it-IT.rc +++ b/dll/shellext/netshell/lang/it-IT.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/ja-JP.rc b/dll/shellext/netshell/lang/ja-JP.rc index e9acc2ae020..49f32ae64c6 100644 --- a/dll/shellext/netshell/lang/ja-JP.rc +++ b/dll/shellext/netshell/lang/ja-JP.rc @@ -83,8 +83,8 @@ FONT 9, "MS UI Gothic" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "一般的な設定かカスタム設定のどちらを使うかをお選び下さい:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "一般的な設定", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "カスタム設定", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "一般的な設定", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "カスタム設定", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "ReactOS ネットワークのクライアント、ReactOS ネットワークのファイルとプリンタ共有、自動アドレッシングによるTCP/IP通信プロトコルを使ってネットワーク接続を作成します。", IDC_STATIC, 65, 45, 240, 30 LTEXT "手動によるネットワーク コンポーネントの設定を可能にします。", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/nl-NL.rc b/dll/shellext/netshell/lang/nl-NL.rc index 1176299d32f..185dfdb6873 100644 --- a/dll/shellext/netshell/lang/nl-NL.rc +++ b/dll/shellext/netshell/lang/nl-NL.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/no-NO.rc b/dll/shellext/netshell/lang/no-NO.rc index 255576057d7..47ac08c8167 100644 --- a/dll/shellext/netshell/lang/no-NO.rc +++ b/dll/shellext/netshell/lang/no-NO.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/pt-PT.rc b/dll/shellext/netshell/lang/pt-PT.rc index bc2d60f02ce..f07d3c993d0 100644 --- a/dll/shellext/netshell/lang/pt-PT.rc +++ b/dll/shellext/netshell/lang/pt-PT.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Seleccione configuração típica ou personalizada:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Configuração &típica", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Configuração &personalizada", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Configuração &típica", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Configuração &personalizada", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Cria ligações de rede utilizando Cliente para Redes ReactOS. Ficheiros e Impresoras partilhadas para Redes ReactOS, e o protocolo TCP/IP com endereçamento automático.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Permite configurar manualmente componentes de rede.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/ro-RO.rc b/dll/shellext/netshell/lang/ro-RO.rc index 38db4a05133..74fcd2e9496 100644 --- a/dll/shellext/netshell/lang/ro-RO.rc +++ b/dll/shellext/netshell/lang/ro-RO.rc @@ -88,8 +88,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Alegeți o configurație tipică sau una particularizată:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Configurație tipică", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Configurație particularizată", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Configurație tipică", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Configurație particularizată", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Crează conexiuni de rețea utilizând Clientela de rețele ReactOS, Partajarea de fișiere și imprimante pentru rețele ReactOS, și (protocolul) TCP/IP pentru adresare automată.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Permite configurarea manuală a componentelor de rețea.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/ru-RU.rc b/dll/shellext/netshell/lang/ru-RU.rc index db5641cb659..0d61fb2f3b0 100644 --- a/dll/shellext/netshell/lang/ru-RU.rc +++ b/dll/shellext/netshell/lang/ru-RU.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Выберите режим настройки сети:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Обычный режим настройки", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Расширенный режим настройки", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Обычный режим настройки", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Расширенный режим настройки", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Создает сетевые соединения, используя клиент для сетей ReactOS, Общие файлы и принтеры для сетей ReactOS и транспортный протокол TCP/IP с автоматической адресацией.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Позволяет вам настроить сетевые компоненты вручную.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/sk-SK.rc b/dll/shellext/netshell/lang/sk-SK.rc index 0185831ed76..dfb57bbcc40 100644 --- a/dll/shellext/netshell/lang/sk-SK.rc +++ b/dll/shellext/netshell/lang/sk-SK.rc @@ -88,8 +88,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/sq-AL.rc b/dll/shellext/netshell/lang/sq-AL.rc index 26173d9d35a..e84a24bed06 100644 --- a/dll/shellext/netshell/lang/sq-AL.rc +++ b/dll/shellext/netshell/lang/sq-AL.rc @@ -87,8 +87,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/sv-SE.rc b/dll/shellext/netshell/lang/sv-SE.rc index a01d9ca335c..a5387070585 100644 --- a/dll/shellext/netshell/lang/sv-SE.rc +++ b/dll/shellext/netshell/lang/sv-SE.rc @@ -83,8 +83,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/tr-TR.rc b/dll/shellext/netshell/lang/tr-TR.rc index c20ee112b26..cc5e768d9c9 100644 --- a/dll/shellext/netshell/lang/tr-TR.rc +++ b/dll/shellext/netshell/lang/tr-TR.rc @@ -85,8 +85,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Normal ya da özelleştirilmiş ayarlar kullanıp kullanmayacağınızı seçiniz:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Normal Ayarlar", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Özelleştirilmiş Ayarlar", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Normal Ayarlar", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Özelleştirilmiş Ayarlar", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "ReactOS Ağları için İstemci'yi, Dosya ve Yazdırma Paylaşımı'nı ve otomatik adreslemeli TCP/IP protokolünü kullanarak ağ bağlantıları oluşturur.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Ağ bileşenlerini elle yapılandırmanıza olanak sağlar.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/uk-UA.rc b/dll/shellext/netshell/lang/uk-UA.rc index bb1eb777c88..54e6fc75de5 100644 --- a/dll/shellext/netshell/lang/uk-UA.rc +++ b/dll/shellext/netshell/lang/uk-UA.rc @@ -91,8 +91,8 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "Виберіть режим налаштування мережі:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Звичайні налаштування", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Розширені налаштування", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "Звичайні налаштування", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Розширені налаштування", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "Створює мережеві з'єднання, використовуючи клієнт для мереж ReactOS, загальні файли і принтери для мереж ReactOS і транспортний протокол TCP/IP з автоматичною адресацією.", IDC_STATIC, 65, 45, 240, 30 LTEXT "Дозволяє вам налаштувати мережеві компоненти вручну.", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/zh-CN.rc b/dll/shellext/netshell/lang/zh-CN.rc index 4d3f183ad94..00d32afa287 100644 --- a/dll/shellext/netshell/lang/zh-CN.rc +++ b/dll/shellext/netshell/lang/zh-CN.rc @@ -92,8 +92,8 @@ FONT 9, "宋体" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "请选择使用典型设置还是自定义设置:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "典型设置", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "自定义设置", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "典型设置", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "自定义设置", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "使用 ReactOS 网络客户端,ReactOS 网络的文件和打印共享以及具有自动寻址功能的 TCP/IP 传输协议创建网络连接。", IDC_STATIC, 65, 45, 240, 30 LTEXT "允许您手动配置网络组件。", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/zh-HK.rc b/dll/shellext/netshell/lang/zh-HK.rc index 43ffcda09ef..e18c29aac9a 100644 --- a/dll/shellext/netshell/lang/zh-HK.rc +++ b/dll/shellext/netshell/lang/zh-HK.rc @@ -91,8 +91,8 @@ FONT 9, "新細明體" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "請問您想使用一般或自訂設定:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "一般設定", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "自訂設定", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "一般設定", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "自訂設定", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "使用 ReactOS 網絡用户端、ReactOS 網絡檔案和列印共享及具有自動指派位址功能的 TCP/IP 傳輸協議來建立網絡連線。", IDC_STATIC, 65, 45, 240, 30 LTEXT "可讓您手動更改網絡元件。", IDC_STATIC, 65, 90, 243, 20 END diff --git a/dll/shellext/netshell/lang/zh-TW.rc b/dll/shellext/netshell/lang/zh-TW.rc index 27e000d30c0..0109e90a44c 100644 --- a/dll/shellext/netshell/lang/zh-TW.rc +++ b/dll/shellext/netshell/lang/zh-TW.rc @@ -91,8 +91,8 @@ FONT 9, "新細明體" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 LTEXT "請問您想使用一般或自訂設定:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "一般設定", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "自訂設定", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + AUTORADIOBUTTON "一般設定", IDC_NETWORK_TYPICAL, 53, 27, 253, 18, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "自訂設定", IDC_NETWORK_CUSTOM, 53, 72, 253, 18, WS_TABSTOP LTEXT "使用 ReactOS 網路用戶端、ReactOS 網絡檔案和列印共享及具有自動指派位址功能的 TCP/IP 傳輸協議來建立網路連接。", IDC_STATIC, 65, 45, 240, 30 LTEXT "可讓您手動更改網路元件。", IDC_STATIC, 65, 90, 243, 20 END
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NTUSER] Scrollbar.c pure whitespace fixes
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2aea4ab94529a0a6b1620…
commit 2aea4ab94529a0a6b1620217b272e5b6f06733b8 Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Sun Mar 12 10:33:21 2023 +0100 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Sun Mar 12 10:34:50 2023 +0100 [NTUSER] Scrollbar.c pure whitespace fixes The scrollbar code is now finally in a good shape. Therefore I will port the current state back today, and for that I want to have the formatting in good shape. No functional changes! --- win32ss/user/ntuser/scrollbar.c | 412 +++++++++++++++------------------------- 1 file changed, 152 insertions(+), 260 deletions(-) diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c index e52b70a21da..63bb168ca34 100644 --- a/win32ss/user/ntuser/scrollbar.c +++ b/win32ss/user/ntuser/scrollbar.c @@ -1,48 +1,43 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Scrollbars - * FILE: win32ss/user/ntuser/scrollbar.c - * PROGRAMER: Thomas Weidenmueller (w3seek(a)users.sourceforge.net) - * Jason Filby (jasonfilby(a)yahoo.com) + * PROJECT: ReactOS kernel + * LICENSE: See COPYING in the top level directory + * PURPOSE: Scrollbars + * COPYRIGHT: Thomas Weidenmueller (w3seek(a)users.sourceforge.net) + * Jason Filby (jasonfilby(a)yahoo.com) */ #include <win32k.h> DBG_DEFAULT_CHANNEL(UserScrollbar); /* Definitions for scrollbar hit testing [See SCROLLBARINFO in MSDN] */ -#define SCROLL_NOWHERE 0x00 /* Outside the scroll bar */ +#define SCROLL_NOWHERE 0x00 /* Outside the scrollbar */ #define SCROLL_TOP_ARROW 0x01 /* Top or left arrow */ #define SCROLL_TOP_RECT 0x02 /* Rectangle between the top arrow and the thumb */ #define SCROLL_THUMB 0x03 /* Thumb rectangle */ #define SCROLL_BOTTOM_RECT 0x04 /* Rectangle between the thumb and the bottom arrow */ #define SCROLL_BOTTOM_ARROW 0x05 /* Bottom or right arrow */ -#define SCROLL_FIRST_DELAY 200 /* Delay (in ms) before first repetition when - holding the button down */ -#define SCROLL_REPEAT_DELAY 50 /* Delay (in ms) between scroll repetitions */ +#define SCROLL_FIRST_DELAY 200 /* Delay (in ms) before first repetition when holding the button down */ +#define SCROLL_REPEAT_DELAY 50 /* Delay (in ms) between scroll repetitions */ -#define SCROLL_TIMER 0 /* Scroll timer id */ +#define SCROLL_TIMER 0 /* Scroll timer id */ - /* Minimum size of the rectangle between the arrows */ +/* Minimum size of the rectangle between the arrows */ #define SCROLL_MIN_RECT 4 - /* Minimum size of the thumb in pixels */ +/* Minimum size of the thumb in pixels */ #define SCROLL_MIN_THUMB 6 - /* Overlap between arrows and thumb */ +/* Overlap between arrows and thumb */ #define SCROLL_ARROW_THUMB_OVERLAP 0 -// -// -// -#define MINTRACKTHUMB 8 /* Minimum size of the rectangle between the arrows */ +#define MINTRACKTHUMB 8 /* Minimum size of the rectangle between the arrows */ - /* What to do after SetScrollInfo() */ - #define SA_SSI_HIDE 0x0001 - #define SA_SSI_SHOW 0x0002 - #define SA_SSI_REFRESH 0x0004 - #define SA_SSI_REPAINT_ARROWS 0x0008 +/* What to do after SetScrollInfo() */ +#define SA_SSI_HIDE 0x0001 +#define SA_SSI_SHOW 0x0002 +#define SA_SSI_REFRESH 0x0004 +#define SA_SSI_REPAINT_ARROWS 0x0008 #define SBRG_SCROLLBAR 0 /* The scrollbar itself */ #define SBRG_TOPRIGHTBTN 1 /* The top or right button */ @@ -64,14 +59,13 @@ IntEnableScrollBar(BOOL Horz, PSCROLLBARINFO Info, UINT wArrows); static void IntRefeshScrollInterior(PWND pWnd, INT nBar, PSCROLLBARINFO psbi); - /* Ported from WINE20020904 */ -/* Compute the scroll bar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and +/* Compute the scrollbar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and * SB_HORZ). 'arrowSize' returns the width or height of an arrow (depending on * the orientation of the scrollbar), * 'thumbSize' returns the size of the thumb, and 'thumbPos' returns the position of the thumb relative to the left or to * the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal. */ -static inline void mirror_rect( const RECT *window_rect, RECT *rect ) +static inline void mirror_rect(const RECT *window_rect, RECT *rect) { int width = window_rect->right - window_rect->left; int tmp = rect->left; @@ -88,39 +82,39 @@ IntGetSBData(PWND pwnd, INT Bar) pSBInfo = pwnd->pSBInfo; switch (Bar) { - case SB_HORZ: + case SB_HORZ: return &pSBInfo->Horz; - case SB_VERT: + case SB_VERT: return &pSBInfo->Vert; - case SB_CTL: - if ( pwnd->cbwndExtra < (sizeof(SBWND)-sizeof(WND)) ) + case SB_CTL: + if (pwnd->cbwndExtra < (sizeof(SBWND)-sizeof(WND))) { - ERR("IntGetSBData Wrong Extra bytes for CTL Scrollbar!\n"); + ERR("IntGetSBData Wrong Extra bytes for CTL Scrollbar\n"); return 0; } pSBWnd = (PSBWND)pwnd; return (PSBDATA)&pSBWnd->SBCalc; - default: - ERR("IntGetSBData Bad Bar!\n"); + default: + ERR("IntGetSBData Bad Bar\n"); } return NULL; } BOOL FASTCALL -IntGetScrollBarRect (PWND Wnd, INT nBar, RECTL *lprect) +IntGetScrollBarRect(PWND Wnd, INT nBar, RECTL *lprect) { BOOL vertical; *lprect = Wnd->rcClient; - RECTL_vOffsetRect( lprect, -Wnd->rcWindow.left, -Wnd->rcWindow.top ); + RECTL_vOffsetRect(lprect, -Wnd->rcWindow.left, -Wnd->rcWindow.top); if (Wnd->ExStyle & WS_EX_LAYOUTRTL) - mirror_rect( &Wnd->rcWindow, lprect ); + mirror_rect(&Wnd->rcWindow, lprect); switch (nBar) { case SB_HORZ: lprect->top = lprect->bottom; - lprect->bottom += UserGetSystemMetrics (SM_CYHSCROLL); + lprect->bottom += UserGetSystemMetrics(SM_CYHSCROLL); if (Wnd->style & WS_BORDER) { lprect->left--; @@ -157,7 +151,7 @@ IntGetScrollBarRect (PWND Wnd, INT nBar, RECTL *lprect) break; case SB_CTL: - IntGetClientRect (Wnd, lprect); + IntGetClientRect(Wnd, lprect); vertical = !!(Wnd->style & SBS_VERT); break; @@ -202,7 +196,7 @@ IntCalculateThumb(PWND Wnd, LONG idObject, PSCROLLBARINFO psbi, PSBDATA pSBData) } ThumbPos = Thumb; - /* Calculate Thumb */ + // Calculate Thumb if(cxy <= (2 * Thumb)) { Thumb = cxy / 2; @@ -214,7 +208,7 @@ IntCalculateThumb(PWND Wnd, LONG idObject, PSCROLLBARINFO psbi, PSBDATA pSBData) psbi->rgstate[SBRG_BOTTOMLEFTBTN] == STATE_SYSTEM_UNAVAILABLE && pSBData->posMin >= (int)(pSBData->posMax - max(pSBData->page - 1, 0))) { - /* Nothing to scroll */ + // Nothing to scroll psbi->xyThumbTop = 0; psbi->xyThumbBottom = 0; } @@ -225,9 +219,7 @@ IntCalculateThumb(PWND Wnd, LONG idObject, PSCROLLBARINFO psbi, PSBDATA pSBData) if(cxy >= ThumbBox) { if(pSBData->page) - { ThumbBox = max(EngMulDiv(cxy, pSBData->page, pSBData->posMax - pSBData->posMin + 1), ThumbBox); - } if(cxy > ThumbBox) { @@ -276,7 +268,7 @@ co_IntGetScrollInfo(PWND Window, INT nBar, PSBDATA pSBData, LPSCROLLINFO lpsi) ASSERT_REFS_CO(Window); - lpsi->fMask &= ~SIF_THEMED; // Remove Theme bit + lpsi->fMask &= ~SIF_THEMED; // Remove Theme bit if(!SBID_IS_VALID(nBar)) { EngSetLastError(ERROR_INVALID_PARAMETER); @@ -286,30 +278,22 @@ co_IntGetScrollInfo(PWND Window, INT nBar, PSBDATA pSBData, LPSCROLLINFO lpsi) if (!Window->pSBInfo) { - ERR("IntGetScrollInfo No window scrollbar info!\n"); + ERR("IntGetScrollInfo No window scrollbar info\n"); return FALSE; } psi = IntGetScrollInfoFromWindow(Window, nBar); if (lpsi->fMask == SIF_ALL) - { Mask = SIF_PAGE | SIF_POS | SIF_RANGE | SIF_TRACKPOS; - } else - { Mask = lpsi->fMask; - } if (0 != (Mask & SIF_PAGE)) - { lpsi->nPage = psi->nPage; - } if (0 != (Mask & SIF_POS)) - { lpsi->nPos = psi->nPos; - } if (0 != (Mask & SIF_RANGE)) { @@ -318,9 +302,7 @@ co_IntGetScrollInfo(PWND Window, INT nBar, PSBDATA pSBData, LPSCROLLINFO lpsi) } if (0 != (Mask & SIF_TRACKPOS)) - { lpsi->nTrackPos = psi->nTrackPos; - } return TRUE; } @@ -335,12 +317,12 @@ NEWco_IntGetScrollInfo( UINT Mask; PSBTRACK pSBTrack = pWnd->head.pti->pSBTrack; - lpsi->fMask &= ~SIF_THEMED; // Remove Theme bit + lpsi->fMask &= ~SIF_THEMED; // Remove Theme bit if (!SBID_IS_VALID(nBar)) { - EngSetLastError(ERROR_INVALID_PARAMETER); - ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar); - return FALSE; + EngSetLastError(ERROR_INVALID_PARAMETER); + ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar); + return FALSE; } if (!pWnd->pSBInfo || !pSBTrack) return FALSE; @@ -348,35 +330,29 @@ NEWco_IntGetScrollInfo( Mask = lpsi->fMask; if (0 != (Mask & SIF_PAGE)) - { - lpsi->nPage = pSBData->page; - } + lpsi->nPage = pSBData->page; if (0 != (Mask & SIF_POS)) - { - lpsi->nPos = pSBData->pos; - } + lpsi->nPos = pSBData->pos; if (0 != (Mask & SIF_RANGE)) { - lpsi->nMin = pSBData->posMin; - lpsi->nMax = pSBData->posMax; + lpsi->nMin = pSBData->posMin; + lpsi->nMax = pSBData->posMax; } if (0 != (Mask & SIF_TRACKPOS)) { - if ( pSBTrack && - pSBTrack->nBar == nBar && - pSBTrack->spwndTrack == pWnd ) - lpsi->nTrackPos = pSBTrack->posNew; - else - lpsi->nTrackPos = pSBData->pos; + if (pSBTrack && pSBTrack->nBar == nBar && pSBTrack->spwndTrack == pWnd) + lpsi->nTrackPos = pSBTrack->posNew; + else + lpsi->nTrackPos = pSBData->pos; } return (Mask & SIF_ALL) !=0; } /************************************************************************* - * SCROLL_GetScrollBarInfo + * SCROLL_GetScrollBarInfo * * Internal helper for the API function * @@ -406,13 +382,13 @@ static BOOL SCROLL_GetScrollBarInfo(HWND hwnd, LONG idObject, LPSCROLLBARINFO in default: return FALSE; } - /* handle invalid data structure */ + // handle invalid data structure if (info->cbSize != sizeof(*info)) return FALSE; SCROLL_GetScrollBarRect(hwnd, nBar, &info->rcScrollBar, &nDummy, &info->dxyLineButton, &info->xyThumbTop); - /* rcScrollBar needs to be in screen coordinates */ + // rcScrollBar needs to be in screen coordinates GetWindowRect(hwnd, &rect); OffsetRect(&info->rcScrollBar, rect.left, rect.top); @@ -422,7 +398,7 @@ static BOOL SCROLL_GetScrollBarInfo(HWND hwnd, LONG idObject, LPSCROLLBARINFO in if (!infoPtr) return FALSE; - /* Scroll bar state */ + // Scrollbar state info->rgstate[0] = 0; if ((nBar == SB_HORZ && !(style & WS_HSCROLL)) || (nBar == SB_VERT && !(style & WS_VSCROLL))) @@ -436,52 +412,50 @@ static BOOL SCROLL_GetScrollBarInfo(HWND hwnd, LONG idObject, LPSCROLLBARINFO in } if (nBar == SB_CTL && !IsWindowEnabled(hwnd)) info->rgstate[0] |= STATE_SYSTEM_UNAVAILABLE; - + pressed = ((nBar == SB_VERT) == SCROLL_trackVertical && GetCapture() == hwnd); - - /* Top/left arrow button state. MSDN says top/right, but I don't believe it */ + + // Top/left arrow button state. MSDN says top/right, but I don't believe it info->rgstate[1] = 0; if (pressed && SCROLL_trackHitTest == SCROLL_TOP_ARROW) info->rgstate[1] |= STATE_SYSTEM_PRESSED; if (infoPtr->flags & ESB_DISABLE_LTUP) info->rgstate[1] |= STATE_SYSTEM_UNAVAILABLE; - /* Page up/left region state. MSDN says up/right, but I don't believe it */ + // Page up/left region state. MSDN says up/right, but I don't believe it info->rgstate[2] = 0; if (infoPtr->curVal == infoPtr->minVal) info->rgstate[2] |= STATE_SYSTEM_INVISIBLE; if (pressed && SCROLL_trackHitTest == SCROLL_TOP_RECT) info->rgstate[2] |= STATE_SYSTEM_PRESSED; - /* Thumb state */ + // Thumb state info->rgstate[3] = 0; if (pressed && SCROLL_trackHitTest == SCROLL_THUMB) info->rgstate[3] |= STATE_SYSTEM_PRESSED; - /* Page down/right region state. MSDN says down/left, but I don't believe it */ + // Page down/right region state. MSDN says down/left, but I don't believe it info->rgstate[4] = 0; if (infoPtr->curVal >= infoPtr->maxVal - 1) info->rgstate[4] |= STATE_SYSTEM_INVISIBLE; if (pressed && SCROLL_trackHitTest == SCROLL_BOTTOM_RECT) info->rgstate[4] |= STATE_SYSTEM_PRESSED; - - /* Bottom/right arrow button state. MSDN says bottom/left, but I don't believe it */ + + // Bottom/right arrow button state. MSDN says bottom/left, but I don't believe it info->rgstate[5] = 0; if (pressed && SCROLL_trackHitTest == SCROLL_BOTTOM_ARROW) info->rgstate[5] |= STATE_SYSTEM_PRESSED; if (infoPtr->flags & ESB_DISABLE_RTDN) info->rgstate[5] |= STATE_SYSTEM_UNAVAILABLE; - + return TRUE; } #endif static DWORD FASTCALL co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) { - /* - * Update the scrollbar state and set action flags according to - * what has to be done graphics wise. - */ + // Update the scrollbar state and set action flags according to + // what has to be done graphics wise. LPSCROLLINFO Info; PSCROLLBARINFO psbi; @@ -489,7 +463,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) INT action = 0; PSBDATA pSBData; DWORD OldPos = 0; - BOOL bChangeParams = FALSE; /* Don't show/hide scrollbar if params don't change */ + BOOL bChangeParams = FALSE; // Don't show/hide scrollbar if params don't change UINT MaxPage; int MaxPos; BOOL bVisible; @@ -504,9 +478,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) } if(!co_IntCreateScrollBars(Window)) - { return FALSE; - } if (lpsi->cbSize != sizeof(SCROLLINFO) && lpsi->cbSize != (sizeof(SCROLLINFO) - sizeof(lpsi->nTrackPos))) @@ -525,11 +497,9 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) pSBData = IntGetSBData(Window, nBar); if (lpsi->fMask & SIF_THEMED && !(Info->fMask & SIF_THEMED)) - { - Info->fMask |= SIF_THEMED; - } + Info->fMask |= SIF_THEMED; - /* Set the page size */ + // Set the page size if (lpsi->fMask & SIF_PAGE) { if (Info->nPage != lpsi->nPage) @@ -540,7 +510,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) } } - /* Set the scroll pos */ + // Set the scroll pos if (lpsi->fMask & SIF_POS) { OldPos = Info->nPos; @@ -551,7 +521,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) } } - /* Set the scroll range */ + // Set the scroll range if (lpsi->fMask & SIF_RANGE) { if (lpsi->nMin > lpsi->nMax) @@ -572,42 +542,30 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) } } - /* Make sure the page size is valid */ + // Make sure the page size is valid MaxPage = abs(Info->nMax - Info->nMin) + 1; if (Info->nPage > MaxPage) - { pSBData->page = Info->nPage = MaxPage; - } - /* Make sure the pos is inside the range */ + // Make sure the pos is inside the range MaxPos = Info->nMax + 1 - (int)max(Info->nPage, 1); ASSERT(MaxPos >= Info->nMin); if (Info->nPos < Info->nMin) - { pSBData->pos = Info->nPos = Info->nMin; - } else if (Info->nPos > MaxPos) - { pSBData->pos = Info->nPos = MaxPos; - } - /* - * Don't change the scrollbar state if SetScrollInfo is just called - * with SIF_DISABLENOSCROLL - */ + // Don't change the scrollbar state if SetScrollInfo is just called with SIF_DISABLENOSCROLL if (!(lpsi->fMask & SIF_ALL)) - { - //goto done; return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos; - } - /* Check if the scrollbar should be hidden or disabled */ + // Check if the scrollbar should be hidden or disabled if (lpsi->fMask & (SIF_RANGE | SIF_PAGE | SIF_DISABLENOSCROLL)) { new_flags = Window->pSBInfo->WSBflags; if (Info->nMin + (int)max(Info->nPage, 1) > Info->nMax) { - /* Hide or disable scroll-bar */ + // Hide or disable scrollbar if (lpsi->fMask & SIF_DISABLENOSCROLL) { new_flags = ESB_DISABLE_BOTH; @@ -618,9 +576,8 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) action = SA_SSI_HIDE; } } - else /* Show and enable scroll-bar only if no page only changed. */ - if ((lpsi->fMask & ~SIF_THEMED) != SIF_PAGE) - { + else if ((lpsi->fMask & ~SIF_THEMED) != SIF_PAGE) + { // Show and enable scrollbar only if no page only changed if ((nBar != SB_CTL) && bChangeParams) { new_flags = ESB_ENABLE_BOTH; @@ -632,23 +589,22 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) } } - if (Window->pSBInfo->WSBflags != new_flags) /* Check arrow flags */ + if (Window->pSBInfo->WSBflags != new_flags) // Check arrow flags { Window->pSBInfo->WSBflags = new_flags; action |= SA_SSI_REPAINT_ARROWS; } } -//done: - if ( action & SA_SSI_HIDE ) + if (action & SA_SSI_HIDE) { co_UserShowScrollBar(Window, nBar, FALSE, FALSE); } else { - if ( action & SA_SSI_SHOW ) - if ( co_UserShowScrollBar(Window, nBar, TRUE, TRUE) ) - return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos; /* SetWindowPos() already did the painting */ + if (action & SA_SSI_SHOW) + if (co_UserShowScrollBar(Window, nBar, TRUE, TRUE)) + return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos; // SetWindowPos() already did the painting switch (nBar) { @@ -668,11 +624,11 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) if (bRedraw && bVisible) { - if (!(Info->fMask & SIF_THEMED)) /* Not Using Themes */ + if (!(Info->fMask & SIF_THEMED)) // Not Using Themes { if (action & SA_SSI_REPAINT_ARROWS) { - // Redraw the entire bar. + // Redraw the entire bar RECTL UpdateRect = psbi->rcScrollBar; UpdateRect.left -= Window->rcClient.left - Window->rcWindow.left; UpdateRect.right -= Window->rcClient.left - Window->rcWindow.left; @@ -682,11 +638,11 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) } else { - // Redraw only the interior part of the bar. + // Redraw only the interior part of the bar IntRefeshScrollInterior(Window, nBar, psbi); } } - else /* Using Themes */ + else // Using Themes { RECTL UpdateRect = psbi->rcScrollBar; UpdateRect.left -= Window->rcClient.left - Window->rcWindow.left; @@ -694,17 +650,15 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) UpdateRect.top -= Window->rcClient.top - Window->rcWindow.top; UpdateRect.bottom -= Window->rcClient.top - Window->rcWindow.top; if (bChangeParams || (OldPos != pSBData->pos)) - co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); + co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); } } } if (bChangeParams && (nBar == SB_HORZ || nBar == SB_VERT) && (lpsi->fMask & SIF_DISABLENOSCROLL)) - { - IntEnableScrollBar(nBar == SB_HORZ, psbi, Window->pSBInfo->WSBflags); - } + IntEnableScrollBar(nBar == SB_HORZ, psbi, Window->pSBInfo->WSBflags); - /* Return current position */ + // Return current position return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos; } @@ -727,7 +681,7 @@ co_IntGetScrollBarInfo(PWND Window, LONG idObject, PSCROLLBARINFO psbi) if(!co_IntCreateScrollBars(Window)) { - ERR("Failed to create scrollbars for window.\n"); + ERR("Failed to create scrollbars for window\n"); return FALSE; } @@ -737,7 +691,7 @@ co_IntGetScrollBarInfo(PWND Window, LONG idObject, PSCROLLBARINFO psbi) IntGetScrollBarRect(Window, Bar, &(sbi->rcScrollBar)); IntCalculateThumb(Window, Bar, sbi, pSBData); - /* Scroll bar state */ + // Scrollbar state psbi->rgstate[0] = 0; if ((Bar == SB_HORZ && !(Window->style & WS_HSCROLL)) || (Bar == SB_VERT && !(Window->style & WS_VSCROLL))) @@ -776,7 +730,7 @@ co_IntSetScrollBarInfo(PWND Window, LONG idObject, PSETSCROLLBARINFO psbi) if(!co_IntCreateScrollBars(Window)) { - ERR("Failed to create scrollbars for window.\n"); + ERR("Failed to create scrollbars for window\n"); return FALSE; } @@ -801,12 +755,9 @@ co_IntCreateScrollBars(PWND Window) ASSERT_REFS_CO(Window); if (Window->pSBInfo && Window->pSBInfoex) - { - /* No need to create it anymore */ - return TRUE; - } + return TRUE; // No need to create it anymore - /* Allocate memory for all scrollbars (HORZ, VERT, CONTROL) */ + // Allocate memory for all scrollbars (HORZ, VERT, CONTROL) Size = 3 * (sizeof(SBINFOEX)); if(!(Window->pSBInfoex = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO))) { @@ -816,7 +767,7 @@ co_IntCreateScrollBars(PWND Window) RtlZeroMemory(Window->pSBInfoex, Size); - if(!(Window->pSBInfo = DesktopHeapAlloc( Window->head.rpdesk, sizeof(SBINFO)))) + if(!(Window->pSBInfo = DesktopHeapAlloc(Window->head.rpdesk, sizeof(SBINFO)))) { ERR("Unable to allocate memory for scrollbar information for window %p\n", Window->head.h); return FALSE; @@ -826,9 +777,7 @@ co_IntCreateScrollBars(PWND Window) Window->pSBInfo->Vert.posMax = 100; Window->pSBInfo->Horz.posMax = 100; - co_WinPosGetNonClientSize(Window, - &Window->rcWindow, - &Window->rcClient); + co_WinPosGetNonClientSize(Window, &Window->rcWindow, &Window->rcClient); for(s = SB_HORZ; s <= SB_VERT; s++) { @@ -911,7 +860,6 @@ co_UserShowScrollBar(PWND Wnd, int nBar, BOOL fShowH, BOOL fShowV) case SB_CTL: { //IntUpdateSBInfo(Wnd, SB_CTL); // Is this needed? Was tested w/o! - co_WinPosShowWindow(Wnd, fShowH ? SW_SHOW : SW_HIDE); return TRUE; } @@ -920,29 +868,29 @@ co_UserShowScrollBar(PWND Wnd, int nBar, BOOL fShowH, BOOL fShowV) if (fShowH) set_bits |= WS_HSCROLL; else clear_bits |= WS_HSCROLL; if( nBar == SB_HORZ ) break; - /* Fall through */ + // Fall through case SB_VERT: if (fShowV) set_bits |= WS_VSCROLL; else clear_bits |= WS_VSCROLL; break; default: EngSetLastError(ERROR_INVALID_PARAMETER); - return FALSE; /* Nothing to do! */ + return FALSE; // Nothing to do } - old_style = IntSetStyle( Wnd, set_bits, clear_bits ); + old_style = IntSetStyle(Wnd, set_bits, clear_bits); if ((old_style & clear_bits) != 0 || (old_style & set_bits) != set_bits) { - ///// Is this needed? Was tested w/o! + //// Is this needed? Was tested w/o! //if (Wnd->style & WS_HSCROLL) IntUpdateSBInfo(Wnd, SB_HORZ); //if (Wnd->style & WS_VSCROLL) IntUpdateSBInfo(Wnd, SB_VERT); - ///// - /* Frame has been changed, let the window redraw itself */ - co_WinPosSetWindowPos( Wnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE - | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); + + // Frame has been changed, let the window redraw itself + co_WinPosSetWindowPos(Wnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE + | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED); return TRUE; } - return FALSE; /* no frame changes */ + return FALSE; // no frame changes } static void @@ -959,14 +907,12 @@ IntDrawScrollInterior(PWND pWnd, HDC hDC, INT nBar, BOOL Vertical, PSCROLLBARINF if (ScrollBarInfo->rgstate[SCROLL_BOTTOM_RECT] & STATE_SYSTEM_PRESSED) BottomSelected = TRUE; - /* - * Only scrollbar controls send WM_CTLCOLORSCROLLBAR. - * The window-owned scrollbars need to call DefWndControlColor - * to correctly setup default scrollbar colors - */ + // Only scrollbar controls send WM_CTLCOLORSCROLLBAR. + // The window-owned scrollbars need to call DefWndControlColor + // to correctly setup default scrollbar colors if (nBar == SB_CTL) { - hBrush = GetControlBrush( pWnd, hDC, WM_CTLCOLORSCROLLBAR); + hBrush = GetControlBrush(pWnd, hDC, WM_CTLCOLORSCROLLBAR); if (!hBrush) hBrush = IntGetSysColorBrush(COLOR_SCROLLBAR); } @@ -977,7 +923,7 @@ IntDrawScrollInterior(PWND pWnd, HDC hDC, INT nBar, BOOL Vertical, PSCROLLBARINF hSaveBrush = NtGdiSelectBrush(hDC, hBrush); - /* Calculate the scroll rectangle */ + // Calculate the scroll rectangle if (Vertical) { Rect.top = ScrollBarInfo->rcScrollBar.top + ScrollBarInfo->dxyLineButton; @@ -993,13 +939,13 @@ IntDrawScrollInterior(PWND pWnd, HDC hDC, INT nBar, BOOL Vertical, PSCROLLBARINF Rect.right = ScrollBarInfo->rcScrollBar.right - ScrollBarInfo->dxyLineButton; } - /* Draw the scroll rectangles and thumb */ + // Draw scroll rectangles and thumb if (!ScrollBarInfo->xyThumbBottom) { NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right - Rect.left, Rect.bottom - Rect.top, PATCOPY); - /* Cleanup and return */ + // Cleanup and return NtGdiSelectBrush(hDC, hSaveBrush); return; } @@ -1013,7 +959,7 @@ IntDrawScrollInterior(PWND pWnd, HDC hDC, INT nBar, BOOL Vertical, PSCROLLBARINF if (ThumbSize) { NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right - Rect.left, - ThumbTop, TopSelected ? BLACKNESS : PATCOPY); + ThumbTop, TopSelected ? BLACKNESS : PATCOPY); Rect.top += ThumbTop; NtGdiPatBlt(hDC, Rect.left, Rect.top + ThumbSize, Rect.right - Rect.left, Rect.bottom - Rect.top - ThumbSize, BottomSelected ? BLACKNESS : PATCOPY); @@ -1051,15 +997,14 @@ IntDrawScrollInterior(PWND pWnd, HDC hDC, INT nBar, BOOL Vertical, PSCROLLBARINF } } - /* Draw the thumb */ + // Draw thumb if (ThumbSize) DrawEdge(hDC, &Rect, EDGE_RAISED, BF_RECT | BF_MIDDLE); - /* Cleanup */ + // Cleanup NtGdiSelectBrush(hDC, hSaveBrush); } - static VOID FASTCALL IntDrawScrollArrows(HDC hDC, PSCROLLBARINFO ScrollBarInfo, BOOL Vertical) { @@ -1083,21 +1028,16 @@ IntDrawScrollArrows(HDC hDC, PSCROLLBARINFO ScrollBarInfo, BOOL Vertical) } if (ScrollBarInfo->rgstate[SCROLL_TOP_ARROW] & STATE_SYSTEM_PRESSED) - { ScrollDirFlagLT |= DFCS_PUSHED | DFCS_FLAT; - } + if (ScrollBarInfo->rgstate[SCROLL_TOP_ARROW] & STATE_SYSTEM_UNAVAILABLE) - { ScrollDirFlagLT |= DFCS_INACTIVE; - } + if (ScrollBarInfo->rgstate[SCROLL_BOTTOM_ARROW] & STATE_SYSTEM_PRESSED) - { ScrollDirFlagRB |= DFCS_PUSHED | DFCS_FLAT; - } + if (ScrollBarInfo->rgstate[SCROLL_BOTTOM_ARROW] & STATE_SYSTEM_UNAVAILABLE) - { ScrollDirFlagRB |= DFCS_INACTIVE; - } DrawFrameControl(hDC, &RectLT, DFC_SCROLL, ScrollDirFlagLT); DrawFrameControl(hDC, &RectRB, DFC_SCROLL, ScrollDirFlagRB); @@ -1107,9 +1047,9 @@ static LONG FASTCALL IntScrollGetObjectId(INT SBType) { if (SBType == SB_VERT) - return OBJID_VSCROLL; + return OBJID_VSCROLL; if (SBType == SB_HORZ) - return OBJID_HSCROLL; + return OBJID_HSCROLL; return OBJID_CLIENT; } @@ -1121,7 +1061,7 @@ IntRefeshScrollInterior(PWND pWnd, INT nBar, PSCROLLBARINFO psbi) hdc = UserGetDCEx(pWnd, NULL, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW)); if (hdc) - { /* Get updated info. */ + { co_IntGetScrollBarInfo(pWnd, IntScrollGetObjectId(nBar), psbi); IntDrawScrollInterior(pWnd, hdc, nBar, Vertical, psbi); UserReleaseDC(pWnd, hdc, FALSE); @@ -1131,17 +1071,13 @@ IntRefeshScrollInterior(PWND pWnd, INT nBar, PSCROLLBARINFO psbi) void IntDrawScrollBar(PWND Wnd, HDC DC, INT Bar) { - //PSBWND pSBWnd; - //INT ThumbSize; PTHREADINFO pti; SCROLLBARINFO Info; BOOL Vertical; pti = PsGetCurrentThreadWin32Thread(); - /* - * Get scroll bar info. - */ + // Get scrollbar info switch (Bar) { case SB_HORZ: @@ -1161,47 +1097,28 @@ IntDrawScrollBar(PWND Wnd, HDC DC, INT Bar) } if (!co_IntGetScrollBarInfo(Wnd, IntScrollGetObjectId(Bar), &Info)) - { return; - } if (RECTL_bIsEmptyRect(&Info.rcScrollBar)) - { return; - } - - //ThumbSize = pSBWnd->pSBCalc->pxThumbBottom - pSBWnd->pSBCalc->pxThumbTop; - /* - * Draw the arrows. - */ + // Draw arrows if (Info.dxyLineButton) - { IntDrawScrollArrows(DC, &Info, Vertical); - } - /* - * Draw the interior. - */ + // Draw interior IntDrawScrollInterior(Wnd, DC, Bar, Vertical, &Info); - /* - * If scroll bar has focus, reposition the caret. - */ - if ( Wnd == pti->MessageQueue->spwndFocus && Bar == SB_CTL ) + // If scrollbar has focus, reposition the caret + if (Wnd == pti->MessageQueue->spwndFocus && Bar == SB_CTL) { if (Vertical) - { - co_IntSetCaretPos(Info.rcScrollBar.top + 1, Info.dxyLineButton + 1); - } + co_IntSetCaretPos(Info.rcScrollBar.top + 1, Info.dxyLineButton + 1); else - { - co_IntSetCaretPos(Info.dxyLineButton + 1, Info.rcScrollBar.top + 1); - } + co_IntSetCaretPos(Info.dxyLineButton + 1, Info.rcScrollBar.top + 1); } } - LRESULT APIENTRY ScrollBarWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { @@ -1212,20 +1129,14 @@ ScrollBarWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) switch(Msg) { - case WM_ENABLE: - { - if (pWnd->pSBInfo) - { - pWnd->pSBInfo->WSBflags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH; - } - } - break; + case WM_ENABLE: + if (pWnd->pSBInfo) + pWnd->pSBInfo->WSBflags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH; + break; } return lResult; } -//// - BOOL APIENTRY NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) @@ -1248,9 +1159,7 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) } if(!(Window = UserGetWindowObject(hWnd))) - { RETURN(FALSE); - } UserRefObjectCo(Window, &Ref); Ret = co_IntGetScrollBarInfo(Window, idObject, &sbi); @@ -1263,13 +1172,12 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) Ret = FALSE; } - RETURN( Ret); + RETURN(Ret); CLEANUP: TRACE("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_); UserLeave(); END_CLEANUP; - } BOOL @@ -1294,13 +1202,11 @@ NtUserSBGetParms( { RtlCopyMemory(&psi, lpsi, sizeof(SCROLLINFO)); if (pSBData) - { RtlCopyMemory(&SBDataSafe, pSBData, sizeof(SBDATA)); - } } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - ERR("NtUserGetScrollInfo Failed size.\n"); + ERR("NtUserGetScrollInfo Failed size\n"); SetLastNtError(_SEH2_GetExceptionCode()); _SEH2_YIELD(RETURN(FALSE)); } @@ -1308,7 +1214,7 @@ NtUserSBGetParms( if(!(Window = UserGetWindowObject(hWnd))) { - ERR("NtUserGetScrollInfo Bad window.\n"); + ERR("NtUserGetScrollInfo Bad window\n"); RETURN(FALSE); } @@ -1322,13 +1228,13 @@ NtUserSBGetParms( } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - ERR("NtUserGetScrollInfo Failed copy to user.\n"); + ERR("NtUserGetScrollInfo Failed copy to user\n"); SetLastNtError(_SEH2_GetExceptionCode()); _SEH2_YIELD(RETURN(FALSE)); } _SEH2_END - RETURN( Ret); + RETURN(Ret); CLEANUP: TRACE("Leave NtUserGetScrollInfo, ret=%i\n",_ret_); @@ -1353,17 +1259,13 @@ NtUserEnableScrollBar( TRACE("Enter NtUserEnableScrollBar\n"); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd)) || - UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) - { + if (!(Window = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) RETURN(FALSE); - } + UserRefObjectCo(Window, &Ref); if (!co_IntCreateScrollBars(Window)) - { - RETURN( FALSE); - } + RETURN(FALSE); OrigArrows = Window->pSBInfo->WSBflags; Window->pSBInfo->WSBflags = wArrows; @@ -1387,7 +1289,7 @@ NtUserEnableScrollBar( { case SB_BOTH: InfoV = IntGetScrollbarInfoFromWindow(Window, SB_VERT); - /* Fall through */ + // Fall through case SB_HORZ: InfoH = IntGetScrollbarInfoFromWindow(Window, SB_HORZ); break; @@ -1406,11 +1308,11 @@ NtUserEnableScrollBar( ERR("FIXME: EnableScrollBar wSBflags %u wArrows %u Chg %d\n", wSBflags, wArrows, Chg); // Done in user32: -// SCROLL_RefreshScrollBar( hwnd, nBar, TRUE, TRUE ); +// SCROLL_RefreshScrollBar(hwnd, nBar, TRUE, TRUE); - RETURN( Chg); - if (OrigArrows == wArrows) RETURN( FALSE); - RETURN( TRUE); + RETURN(Chg); + if (OrigArrows == wArrows) RETURN(FALSE); + RETURN(TRUE); CLEANUP: if (Window) @@ -1438,18 +1340,16 @@ NtUserSetScrollInfo( TRACE("Enter NtUserSetScrollInfo\n"); UserEnterExclusive(); - if(!(Window = UserGetWindowObject(hWnd)) || - UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) - { - RETURN( 0); - } + if(!(Window = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) + RETURN(0); + UserRefObjectCo(Window, &Ref); Status = MmCopyFromCaller(&ScrollInfo, lpsi, sizeof(SCROLLINFO) - sizeof(ScrollInfo.nTrackPos)); if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( 0); + RETURN(0); } RETURN(co_IntSetScrollInfo(Window, fnBar, &ScrollInfo, bRedraw)); @@ -1461,7 +1361,6 @@ CLEANUP: TRACE("Leave NtUserSetScrollInfo, ret=%lu\n", _ret_); UserLeave(); END_CLEANUP; - } DWORD APIENTRY @@ -1476,9 +1375,7 @@ NtUserShowScrollBar(HWND hWnd, int nBar, DWORD bShow) UserEnterExclusive(); if (!(Window = UserGetWindowObject(hWnd))) - { RETURN(0); - } UserRefObjectCo(Window, &Ref); ret = co_UserShowScrollBar(Window, nBar, (nBar == SB_VERT) ? 0 : bShow, @@ -1488,14 +1385,12 @@ NtUserShowScrollBar(HWND hWnd, int nBar, DWORD bShow) RETURN(ret); CLEANUP: - TRACE("Leave NtUserShowScrollBar, ret%lu\n", _ret_); + TRACE("Leave NtUserShowScrollBar, ret%lu\n", _ret_); UserLeave(); END_CLEANUP; - } - -//// Ugly NtUser API //// +// Ugly NtUser API BOOL APIENTRY @@ -1517,9 +1412,8 @@ NtUserSetScrollBarInfo( UserEnterExclusive(); if(!(Window = UserGetWindowObject(hWnd))) - { - RETURN( FALSE); - } + RETURN(FALSE); + UserRefObjectCo(Window, &Ref); Obj = SBOBJ_TO_SBID(idObject); @@ -1527,13 +1421,11 @@ NtUserSetScrollBarInfo( { EngSetLastError(ERROR_INVALID_PARAMETER); ERR("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj); - RETURN( FALSE); + RETURN(FALSE); } if(!co_IntCreateScrollBars(Window)) - { RETURN(FALSE); - } Status = MmCopyFromCaller(&Safeinfo, info, sizeof(SETSCROLLBARINFO)); if(!NT_SUCCESS(Status))
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NTUSER][USER32] KLF_SETFORPROCESS for ActivateKeyboardLayout (#5126)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9ef348ab08b446594a25…
commit b9ef348ab08b446594a25c7070273bc265021dbc Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Mar 12 13:39:41 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Mar 12 13:39:41 2023 +0900 [NTUSER][USER32] KLF_SETFORPROCESS for ActivateKeyboardLayout (#5126) Supporting KLF_SETFORPROCESS flag in ActivateKeyboardLayout function. Implement KLF_SETFORPROCESS for co_UserActivateKeyboardLayout. Use KLF_SETFORPROCESS flag in WM_INPUTLANGCHANGEREQUEST handling. Add co_IntSetKeyboardLayoutForProcess helper function. --- win32ss/user/ntuser/kbdlayout.c | 56 ++++++++++++++++++++++++++++++------ win32ss/user/user32/windows/defwnd.c | 2 +- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/win32ss/user/ntuser/kbdlayout.c b/win32ss/user/ntuser/kbdlayout.c index 9a5c43d60a4..2f9ea599ab7 100644 --- a/win32ss/user/ntuser/kbdlayout.c +++ b/win32ss/user/ntuser/kbdlayout.c @@ -630,7 +630,6 @@ co_UserActivateKbl(PTHREADINFO pti, PKL pKl, UINT Flags) return pklPrev; } -// Win: xxxImmActivateLayout VOID APIENTRY IntImmActivateLayout( _Inout_ PTHREADINFO pti, @@ -656,7 +655,40 @@ IntImmActivateLayout( pti->pClientInfo->hKL = pKL->hkl; } -/* Win: xxxInternalActivateKeyboardLayout */ +static VOID co_IntSetKeyboardLayoutForProcess(PPROCESSINFO ppi, PKL pKL) +{ + PTHREADINFO ptiNode, ptiNext; + PCLIENTINFO pClientInfo; + BOOL bImmMode = IS_IMM_MODE(); + + for (ptiNode = ppi->ptiList; ptiNode; ptiNode = ptiNext) + { + IntReferenceThreadInfo(ptiNode); + ptiNext = ptiNode->ptiSibling; + + /* Skip this thread if its keyboard layout is already the correct one, or if it's dying */ + if (ptiNode->KeyboardLayout == pKL || (ptiNode->TIF_flags & TIF_INCLEANUP)) + { + IntDereferenceThreadInfo(ptiNode); + continue; + } + + if (bImmMode) + { + IntImmActivateLayout(ptiNode, pKL); + } + else + { + UserAssignmentLock((PVOID*)&ptiNode->KeyboardLayout, pKL); + pClientInfo = ptiNode->pClientInfo; + pClientInfo->CodePage = pKL->CodePage; + pClientInfo->hKL = pKL->hkl; + } + + IntDereferenceThreadInfo(ptiNode); + } +} + HKL APIENTRY co_UserActivateKeyboardLayout( _Inout_ PKL pKL, @@ -669,7 +701,11 @@ co_UserActivateKeyboardLayout( PWND pTargetWnd, pImeWnd; HWND hTargetWnd, hImeWnd; USER_REFERENCE_ENTRY Ref1, Ref2; - PCLIENTINFO ClientInfo = pti->pClientInfo; + PCLIENTINFO ClientInfo; + BOOL bSetForProcess = !!(uFlags & KLF_SETFORPROCESS); + + IntReferenceThreadInfo(pti); + ClientInfo = pti->pClientInfo; if (pti->KeyboardLayout) { @@ -683,8 +719,11 @@ co_UserActivateKeyboardLayout( FIXME("KLF_RESET\n"); } - if (!(uFlags & KLF_SETFORPROCESS) && pKL == pti->KeyboardLayout) + if (!bSetForProcess && pKL == pti->KeyboardLayout) + { + IntDereferenceThreadInfo(pti); return hOldKL; + } pKL->wchDiacritic = 0; @@ -697,9 +736,9 @@ co_UserActivateKeyboardLayout( ClientInfo->CodePage = pKL->CodePage; ClientInfo->hKL = pKL->hkl; } - else if (uFlags & KLF_SETFORPROCESS) + else if (bSetForProcess) { - FIXME("KLF_SETFORPROCESS\n"); + co_IntSetKeyboardLayoutForProcess(pti->ppi, pKL); } else { @@ -748,9 +787,8 @@ co_UserActivateKeyboardLayout( if (pImeWnd) { UserRefObjectCo(pImeWnd, &Ref2); - BOOL bProcess = !!(pti->TIF_flags & KLF_SETFORPROCESS); hImeWnd = UserHMGetHandle(pImeWnd); - co_IntSendMessage(hImeWnd, WM_IME_SYSTEM, IMS_SENDNOTIFICATION, bProcess); + co_IntSendMessage(hImeWnd, WM_IME_SYSTEM, IMS_SENDNOTIFICATION, bSetForProcess); UserDerefObjectCo(pImeWnd); } } @@ -758,6 +796,8 @@ co_UserActivateKeyboardLayout( if (pOldKL) UserDerefObjectCo(pOldKL); + + IntDereferenceThreadInfo(pti); return hOldKL; } diff --git a/win32ss/user/user32/windows/defwnd.c b/win32ss/user/user32/windows/defwnd.c index 0a976bf50ee..cbb421209dc 100644 --- a/win32ss/user/user32/windows/defwnd.c +++ b/win32ss/user/user32/windows/defwnd.c @@ -561,7 +561,7 @@ User32DefWindowProc(HWND hWnd, else if(wParam & INPUTLANGCHANGE_FORWARD) NewHkl = (HKL) HKL_NEXT; else NewHkl = (HKL) lParam; - NtUserActivateKeyboardLayout(NewHkl, 0); + NtUserActivateKeyboardLayout(NewHkl, KLF_SETFORPROCESS); return TRUE; }
1 year, 9 months
1
0
0
0
[reactos] 02/02: [NTOS:KD] Remove unneeded 'extern' declaration. Addendum to commit 4ce819ca.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab92e4031717d8fab8450…
commit ab92e4031717d8fab8450a8d2ef592fc4b7e1068 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Mar 11 17:08:39 2023 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Mar 12 02:17:15 2023 +0100 [NTOS:KD] Remove unneeded 'extern' declaration. Addendum to commit 4ce819ca. --- ntoskrnl/kd/kdio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c index 4575b9a2e8b..396c0432317 100644 --- a/ntoskrnl/kd/kdio.c +++ b/ntoskrnl/kd/kdio.c @@ -26,7 +26,6 @@ static KSPIN_LOCK KdpDebugLogSpinLock; static KEVENT KdpLoggerThreadEvent; static HANDLE KdpLogFileHandle; ANSI_STRING KdpLogFileName = RTL_CONSTANT_STRING("\\SystemRoot\\debug.log"); -extern ULONG ExpInitializationPhase; static KSPIN_LOCK KdpSerialSpinLock; ULONG SerialPortNumber = DEFAULT_DEBUG_PORT;
1 year, 9 months
1
0
0
0
[reactos] 01/02: [NTOS:KDBG] Remove dead code. Addendum to baa47fa5e and fe777bb52.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=372eb0c0b8e09af0fa646…
commit 372eb0c0b8e09af0fa646c7e9245f49b65f05c2d Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Nov 28 00:43:22 2022 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Mar 12 02:16:58 2023 +0100 [NTOS:KDBG] Remove dead code. Addendum to baa47fa5e and fe777bb52. --- ntoskrnl/kdbg/kdb.c | 32 -------------------------------- ntoskrnl/kdbg/kdb.h | 4 ---- 2 files changed, 36 deletions(-) diff --git a/ntoskrnl/kdbg/kdb.c b/ntoskrnl/kdbg/kdb.c index abe8f96b2cd..1b03f692ec5 100644 --- a/ntoskrnl/kdbg/kdb.c +++ b/ntoskrnl/kdbg/kdb.c @@ -1623,38 +1623,6 @@ continue_execution: return ContinueType; } -KD_CONTINUE_TYPE -KdbEnterDebuggerFirstChanceException( - IN OUT PKTRAP_FRAME TrapFrame) -{ - EXCEPTION_RECORD64 ExceptionRecord; - KD_CONTINUE_TYPE Return; - CONTEXT Context; - - /* Copy TrapFrame to Context */ - RtlZeroMemory(&Context, sizeof(CONTEXT)); - Context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS; -#ifdef CONTEXT_EXTENDED_REGISTERS - Context.ContextFlags |= CONTEXT_EXTENDED_REGISTERS; -#endif - KeTrapFrameToContext(TrapFrame, NULL, &Context); - - /* Create ExceptionRecord (assume breakpoint) */ - RtlZeroMemory(&ExceptionRecord, sizeof(EXCEPTION_RECORD64)); - ExceptionRecord.ExceptionCode = STATUS_BREAKPOINT; - - /* Call real function */ - Return = KdbEnterDebuggerException(&ExceptionRecord, - KernelMode, - &Context, - TRUE); - - /* Copy back Context to TrapFrame */ - KeContextToTrapFrame(&Context, NULL, TrapFrame, Context.ContextFlags, KernelMode); - - return Return; -} - VOID NTAPI KdbpGetCommandLineSettings( diff --git a/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h index 4424dd4837c..b606d4a5156 100644 --- a/ntoskrnl/kdbg/kdb.h +++ b/ntoskrnl/kdbg/kdb.h @@ -257,10 +257,6 @@ KdbEnterDebuggerException(IN PEXCEPTION_RECORD64 ExceptionRecord, IN OUT PCONTEXT Context, IN BOOLEAN FirstChance); -KD_CONTINUE_TYPE -KdbEnterDebuggerFirstChanceException( - IN OUT PKTRAP_FRAME TrapFrame); - /* other functions */ NTSTATUS
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NOTEPAD] Refactor around _tWinMain (#5135)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d0ab35e9da0cfa78ffb10…
commit d0ab35e9da0cfa78ffb10fd08056bf4a0b454777 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Mar 12 08:26:33 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Mar 12 08:26:33 2023 +0900 [NOTEPAD] Refactor around _tWinMain (#5135) - Add hInstance parameter to NOTEPAD_InitData. - Move some code in _tWinMain into NOTEPAD_InitData. - Move some code in _tWinMain into WM_CREATE handling. - Move some code in WM_CLOSE handling into WM_DESTROY handling. - Fix the exit code of _tWinMain. CORE-18837 --- base/applications/notepad/main.c | 86 ++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/base/applications/notepad/main.c b/base/applications/notepad/main.c index d2d7331db3f..6c3ec3d6d19 100644 --- a/base/applications/notepad/main.c +++ b/base/applications/notepad/main.c @@ -253,12 +253,17 @@ static VOID NOTEPAD_FindTerm(VOID) /*********************************************************************** * Data Initialization */ -static VOID NOTEPAD_InitData(VOID) +static VOID NOTEPAD_InitData(HINSTANCE hInstance) { - LPTSTR p = Globals.szFilter; + LPTSTR p; static const TCHAR txt_files[] = _T("*.txt"); static const TCHAR all_files[] = _T("*.*"); + ZeroMemory(&Globals, sizeof(Globals)); + Globals.hInstance = hInstance; + Globals.encFile = ENCODING_DEFAULT; + + p = Globals.szFilter; p += LoadString(Globals.hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN) + 1; _tcscpy(p, txt_files); p += ARRAY_SIZE(txt_files); @@ -340,8 +345,17 @@ NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { case WM_CREATE: + Globals.hMainWnd = hWnd; Globals.hMenu = GetMenu(hWnd); + DragAcceptFiles(hWnd, TRUE); /* Accept Drag & Drop */ + + /* Create controls */ + DoCreateEditWindow(); + DoShowHideStatusBar(); + + DIALOG_FileNew(); /* Initialize file info */ + // For now, the "Help" dialog is disabled due to the lack of HTML Help support EnableMenuItem(Globals.hMenu, CMD_HELP_CONTENTS, MF_BYCOMMAND | MF_GRAYED); break; @@ -354,20 +368,9 @@ NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) NOTEPAD_MenuCommand(LOWORD(wParam)); break; - case WM_DESTROYCLIPBOARD: - /*MessageBox(Globals.hMainWnd, "Empty clipboard", "Debug", MB_ICONEXCLAMATION);*/ - break; - case WM_CLOSE: - if (DoCloseFile()) { - if (Globals.hFont) - DeleteObject(Globals.hFont); - if (Globals.hDevMode) - GlobalFree(Globals.hDevMode); - if (Globals.hDevNames) - GlobalFree(Globals.hDevNames); + if (DoCloseFile()) DestroyWindow(hWnd); - } break; case WM_QUERYENDSESSION: @@ -377,6 +380,12 @@ NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) break; case WM_DESTROY: + if (Globals.hFont) + DeleteObject(Globals.hFont); + if (Globals.hDevMode) + GlobalFree(Globals.hDevMode); + if (Globals.hDevNames) + GlobalFree(Globals.hDevNames); SetWindowLongPtr(Globals.hEdit, GWLP_WNDPROC, (LONG_PTR)Globals.EditProc); NOTEPAD_SaveSettingsToRegistry(); PostQuitMessage(0); @@ -574,9 +583,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh aFINDMSGSTRING = (ATOM)RegisterWindowMessage(FINDMSGSTRING); - ZeroMemory(&Globals, sizeof(Globals)); - Globals.hInstance = hInstance; - Globals.encFile = ENCODING_DEFAULT; + NOTEPAD_InitData(hInstance); NOTEPAD_LoadSettingsFromRegistry(); ZeroMemory(&wndclass, sizeof(wndclass)); @@ -591,11 +598,14 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh wndclass.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_NPICON), IMAGE_ICON, - 16, - 16, + GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), 0); - - if (!RegisterClassEx(&wndclass)) return FALSE; + if (!RegisterClassEx(&wndclass)) + { + ShowLastError(); + return 1; + } /* Setup windows */ @@ -608,37 +618,29 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh if (!IntersectRect(&rcIntersect, &Globals.main_rect, &info.rcWork)) x = y = CW_USEDEFAULT; - Globals.hMainWnd = CreateWindow(className, - winName, - WS_OVERLAPPEDWINDOW, - x, - y, - Globals.main_rect.right - Globals.main_rect.left, - Globals.main_rect.bottom - Globals.main_rect.top, - NULL, - NULL, - Globals.hInstance, - NULL); + /* Globals.hMainWnd will be set in WM_CREATE handling */ + CreateWindow(className, + winName, + WS_OVERLAPPEDWINDOW, + x, + y, + Globals.main_rect.right - Globals.main_rect.left, + Globals.main_rect.bottom - Globals.main_rect.top, + NULL, + NULL, + Globals.hInstance, + NULL); if (!Globals.hMainWnd) { ShowLastError(); - ExitProcess(1); + return 1; } - DoCreateEditWindow(); - DoShowHideStatusBar(); - - NOTEPAD_InitData(); - DIALOG_FileNew(); - ShowWindow(Globals.hMainWnd, show); UpdateWindow(Globals.hMainWnd); - DragAcceptFiles(Globals.hMainWnd, TRUE); if (!HandleCommandLine(cmdline)) - { return 0; - } hAccel = LoadAccelerators(hInstance, MAKEINTRESOURCE(ID_ACCEL));
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NOTEPAD] Move the printing code to the newly added printing.c
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b0791547f8857110352e…
commit 3b0791547f8857110352e1837e8cfbc2c7a93a46 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Mar 12 07:51:53 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sun Mar 12 07:51:53 2023 +0900 [NOTEPAD] Move the printing code to the newly added printing.c CORE-18837 --- base/applications/notepad/CMakeLists.txt | 1 + base/applications/notepad/dialog.c | 677 ------------------------------ base/applications/notepad/printing.c | 688 +++++++++++++++++++++++++++++++ 3 files changed, 689 insertions(+), 677 deletions(-) diff --git a/base/applications/notepad/CMakeLists.txt b/base/applications/notepad/CMakeLists.txt index aa1aae6034a..f9a534a70e5 100644 --- a/base/applications/notepad/CMakeLists.txt +++ b/base/applications/notepad/CMakeLists.txt @@ -2,6 +2,7 @@ list(APPEND SOURCE dialog.c main.c + printing.c settings.c text.c notepad.h) diff --git a/base/applications/notepad/dialog.c b/base/applications/notepad/dialog.c index 3bd835a5011..5c78dadc39a 100644 --- a/base/applications/notepad/dialog.c +++ b/base/applications/notepad/dialog.c @@ -55,8 +55,6 @@ static UINT EncToStrId[] = { STRING_UTF8_BOM }; -static UINT_PTR CALLBACK DIALOG_PAGESETUP_Hook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); - VOID ShowLastError(VOID) { DWORD error = GetLastError(); @@ -209,17 +207,6 @@ static int AlertFileNotSaved(LPCTSTR szFileName) MB_ICONQUESTION | MB_YESNOCANCEL); } -static void AlertPrintError(void) -{ - TCHAR szUntitled[MAX_STRING_LEN]; - - LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, ARRAY_SIZE(szUntitled)); - - DIALOG_StringMsgBox(Globals.hMainWnd, STRING_PRINTERROR, - Globals.szFileName[0] ? Globals.szFileName : szUntitled, - MB_ICONEXCLAMATION | MB_OK); -} - /** * Returns: * TRUE - if file exists @@ -240,76 +227,6 @@ BOOL HasFileExtension(LPCTSTR szFilename) return _tcsrchr(szFilename, _T('.')) != NULL; } -int GetSelectionTextLength(HWND hWnd) -{ - DWORD dwStart = 0, dwEnd = 0; - SendMessage(hWnd, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd); - return dwEnd - dwStart; -} - -int GetSelectionText(HWND hWnd, LPTSTR lpString, int nMaxCount) -{ - DWORD dwStart = 0, dwEnd = 0; - INT cchText = GetWindowTextLength(hWnd); - LPTSTR pszText; - HLOCAL hLocal; - HRESULT hr; - - SendMessage(hWnd, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd); - if (!lpString || dwStart == dwEnd || cchText == 0) - return 0; - - hLocal = (HLOCAL)SendMessage(hWnd, EM_GETHANDLE, 0, 0); - pszText = (LPTSTR)LocalLock(hLocal); - if (!pszText) - return 0; - - hr = StringCchCopyN(lpString, nMaxCount, pszText + dwStart, dwEnd - dwStart); - LocalUnlock(hLocal); - - switch (hr) - { - case S_OK: - return dwEnd - dwStart; - - case STRSAFE_E_INSUFFICIENT_BUFFER: - return nMaxCount - 1; - - default: - return 0; - } -} - -static RECT -GetPrintingRect(IN HDC hdc, IN LPCRECT pMargins) -{ - INT iLogPixelsX = GetDeviceCaps(hdc, LOGPIXELSX); - INT iLogPixelsY = GetDeviceCaps(hdc, LOGPIXELSY); - INT iHorzRes = GetDeviceCaps(hdc, HORZRES); /* in pixels */ - INT iVertRes = GetDeviceCaps(hdc, VERTRES); /* in pixels */ - RECT rcPrintRect, rcPhysical; - -#define CONVERT_X(x) MulDiv((x), iLogPixelsX, 2540) /* 100th millimeters to pixels */ -#define CONVERT_Y(y) MulDiv((y), iLogPixelsY, 2540) /* 100th millimeters to pixels */ - SetRect(&rcPrintRect, - CONVERT_X(pMargins->left), CONVERT_Y(pMargins->top), - iHorzRes - CONVERT_X(pMargins->right), - iVertRes - CONVERT_Y(pMargins->bottom)); - - rcPhysical.left = GetDeviceCaps(hdc, PHYSICALOFFSETX); - rcPhysical.right = rcPhysical.left + GetDeviceCaps(hdc, PHYSICALWIDTH); - rcPhysical.top = GetDeviceCaps(hdc, PHYSICALOFFSETY); - rcPhysical.bottom = rcPhysical.top + GetDeviceCaps(hdc, PHYSICALHEIGHT); - - /* Adjust the margin */ - rcPrintRect.left = max(rcPrintRect.left, rcPhysical.left); - rcPrintRect.top = max(rcPrintRect.top, rcPhysical.top); - rcPrintRect.right = min(rcPrintRect.right, rcPhysical.right); - rcPrintRect.bottom = min(rcPrintRect.bottom, rcPhysical.bottom); - - return rcPrintRect; -} - static BOOL DoSaveFile(VOID) { BOOL bRet = FALSE; @@ -619,527 +536,6 @@ BOOL DIALOG_FileSaveAs(VOID) } } -/* Convert the points into pixels */ -#define X_POINTS_TO_PIXELS(hDC, points) MulDiv((points), GetDeviceCaps((hDC), LOGPIXELSX), 72) -#define Y_POINTS_TO_PIXELS(hDC, points) MulDiv((points), GetDeviceCaps((hDC), LOGPIXELSY), 72) - -/* - * See also: - *
https://support.microsoft.com/en-us/windows/changing-header-and-footer-comm…
- */ -static VOID -DrawHeaderOrFooter(HDC hDC, LPRECT pRect, LPCTSTR pszFormat, INT nPageNo, const SYSTEMTIME *pstNow) -{ - TCHAR szText[256], szField[128]; - const TCHAR *pchFormat; - UINT uAlign = DT_CENTER, uFlags = DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX; - HGDIOBJ hOldPen, hOldBrush; - - /* Draw a rectangle */ - hOldPen = SelectObject(hDC, GetStockObject(BLACK_PEN)); - hOldBrush = SelectObject(hDC, GetStockObject(NULL_BRUSH)); - Rectangle(hDC, pRect->left, pRect->top, pRect->right, pRect->bottom); - SelectObject(hDC, hOldBrush); - SelectObject(hDC, hOldPen); - - InflateRect(pRect, -X_POINTS_TO_PIXELS(hDC, 3), 0); /* Shrink 3pt */ - - szText[0] = 0; - - for (pchFormat = pszFormat; *pchFormat; ++pchFormat) - { - if (*pchFormat != _T('&')) - { - StringCchCatN(szText, ARRAY_SIZE(szText), pchFormat, 1); - continue; - } - - ++pchFormat; - if (*pchFormat == 0) - break; - - switch (_totupper(*pchFormat)) /* Make it uppercase */ - { - case _T('&'): /* Found double ampersand */ - StringCchCat(szText, ARRAY_SIZE(szText), TEXT("&")); - break; - - case _T('L'): /* Left */ - DrawText(hDC, szText, -1, pRect, uAlign | uFlags); - szText[0] = 0; - uAlign = DT_LEFT; - break; - - case _T('C'): /* Center */ - DrawText(hDC, szText, -1, pRect, uAlign | uFlags); - szText[0] = 0; - uAlign = DT_CENTER; - break; - - case _T('R'): /* Right */ - DrawText(hDC, szText, -1, pRect, uAlign | uFlags); - szText[0] = 0; - uAlign = DT_RIGHT; - break; - - case _T('D'): /* Date */ - GetDateFormat(LOCALE_USER_DEFAULT, 0, pstNow, NULL, - szField, (INT)ARRAY_SIZE(szField)); - StringCchCat(szText, ARRAY_SIZE(szText), szField); - break; - - case _T('T'): /* Time */ - GetTimeFormat(LOCALE_USER_DEFAULT, 0, pstNow, NULL, - szField, (INT)ARRAY_SIZE(szField)); - StringCchCat(szText, ARRAY_SIZE(szText), szField); - break; - - case _T('F'): /* Filename */ - StringCchCat(szText, ARRAY_SIZE(szText), Globals.szFileTitle); - break; - - case _T('P'): /* Page number */ - StringCchPrintf(szField, ARRAY_SIZE(szField), TEXT("%u"), nPageNo); - StringCchCat(szText, ARRAY_SIZE(szText), szField); - break; - - default: /* Otherwise */ - szField[0] = _T('&'); - szField[1] = *pchFormat; - szField[2] = 0; - StringCchCat(szText, ARRAY_SIZE(szText), szField); - break; - } - } - - DrawText(hDC, szText, -1, pRect, uAlign | uFlags); -} - -typedef struct -{ - PRINTDLG printer; - HWND hwndDlg; - INT status; - INT currentPage; - RECT printRect; - SYSTEMTIME stNow; - HFONT hHeaderFont; - HFONT hBodyFont; - LPTSTR pszText; - DWORD ich; - DWORD cchText; - INT cyHeader; - INT cySpacing; - INT cyFooter; -} PRINT_DATA, *PPRINT_DATA; - -static BOOL DoPrintBody(PPRINT_DATA pData, DWORD PageCount, BOOL bSkipPage) -{ - LPPRINTDLG pPrinter = &pData->printer; - RECT printRect = pData->printRect; - INT xLeft = printRect.left, yTop = printRect.top + pData->cyHeader + pData->cySpacing; - INT xStart, tabWidth; - DWORD ichStart; - SIZE charMetrics; - TEXTMETRIC tmText; - - /* Calculate a tab width */ -#define TAB_STOP 8 - GetTextMetrics(pPrinter->hDC, &tmText); - tabWidth = TAB_STOP * tmText.tmAveCharWidth; - -#define DO_FLUSH() do { \ - if (ichStart < pData->ich && !bSkipPage) { \ - TextOut(pPrinter->hDC, xStart, yTop, &pData->pszText[ichStart], pData->ich - ichStart); \ - } \ - ichStart = pData->ich; \ - xStart = xLeft; \ - if (pData->status == STRING_PRINTCANCELING) return FALSE; \ -} while (0) - - /* The drawing-body loop */ - for (ichStart = pData->ich, xStart = xLeft; pData->ich < pData->cchText; ) - { - TCHAR ch = pData->pszText[pData->ich]; - - if (ch == _T('\r')) - { - DO_FLUSH(); - - pData->ich++; /* Next char */ - ichStart = pData->ich; - continue; - } - - if (ch == _T('\n')) - { - DO_FLUSH(); - - /* Next line */ - yTop += tmText.tmHeight; - xLeft = xStart = printRect.left; - } - else - { - if (ch == _T('\t')) - { - INT nStepWidth = tabWidth - ((xLeft - printRect.left) % tabWidth); - - DO_FLUSH(); - - /* Go to the next tab stop */ - xLeft += nStepWidth; - xStart = xLeft; - } - else /* Normal char */ - { - GetTextExtentPoint32(pPrinter->hDC, &ch, 1, &charMetrics); - xLeft += charMetrics.cx; - } - - /* Insert a line break if the next position reached the right edge */ - if (xLeft + charMetrics.cx >= printRect.right) - { - if (ch != _T('\t')) - DO_FLUSH(); - - /* Next line */ - yTop += tmText.tmHeight; - xLeft = xStart = printRect.left; - } - } - - pData->ich++; /* Next char */ - if (ch == _T('\t') || ch == _T('\n')) - ichStart = pData->ich; - - if (yTop + tmText.tmHeight >= printRect.bottom - pData->cyFooter) - break; /* The next line reached the body bottom */ - } - - DO_FLUSH(); - return TRUE; -} - -static BOOL DoPrintPage(PPRINT_DATA pData, DWORD PageCount) -{ - LPPRINTDLG pPrinter = &pData->printer; - BOOL bSkipPage, ret; - HFONT hOldFont; - - /* Should we skip this page? */ - bSkipPage = !(pPrinter->Flags & PD_SELECTION) && - (pPrinter->Flags & PD_PAGENUMS) && - !(pPrinter->nFromPage <= PageCount && PageCount <= pPrinter->nToPage); - - /* The prologue of a page */ - if (!bSkipPage) - { - if (StartPage(pPrinter->hDC) <= 0) - { - pData->status = STRING_PRINTFAILED; - return FALSE; - } - - if (pData->cyHeader > 0) - { - /* Draw the page header */ - RECT rc = pData->printRect; - rc.bottom = rc.top + pData->cyHeader; - - hOldFont = SelectObject(pPrinter->hDC, pData->hHeaderFont); - DrawHeaderOrFooter(pPrinter->hDC, &rc, Globals.szHeader, PageCount, &pData->stNow); - SelectObject(pPrinter->hDC, hOldFont); /* De-select the font */ - } - } - - hOldFont = SelectObject(pPrinter->hDC, pData->hBodyFont); - ret = DoPrintBody(pData, PageCount, bSkipPage); - SelectObject(pPrinter->hDC, hOldFont); - if (!ret) - return FALSE; /* Canceled */ - - /* The epilogue of a page */ - if (!bSkipPage) - { - if (pData->cyFooter > 0) - { - /* Draw the page footer */ - RECT rc = pData->printRect; - rc.top = rc.bottom - pData->cyFooter; - - hOldFont = SelectObject(pPrinter->hDC, pData->hHeaderFont); - DrawHeaderOrFooter(pPrinter->hDC, &rc, Globals.szFooter, PageCount, &pData->stNow); - SelectObject(pPrinter->hDC, hOldFont); - } - - if (EndPage(pPrinter->hDC) <= 0) - { - pData->status = STRING_PRINTFAILED; - return FALSE; - } - } - - return TRUE; -} - -#define BODY_FONT_SIZE 10 /* 10pt */ -#define HEADER_FONT_SIZE 9 /* 9pt */ -#define SPACING_HEIGHT 4 /* 4pt */ -#define PRINTING_MESSAGE (WM_USER + 100) - -static BOOL DoCreatePrintFonts(LPPRINTDLG pPrinter, PPRINT_DATA pPrintData) -{ - LOGFONT lfBody, lfHeader; - - /* Create the main text font for printing */ - lfBody = Globals.lfFont; - lfBody.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, BODY_FONT_SIZE); - pPrintData->hBodyFont = CreateFontIndirect(&lfBody); - if (pPrintData->hBodyFont == NULL) - return FALSE; - - /* Create the header/footer font */ - lfHeader = Globals.lfFont; - lfHeader.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, HEADER_FONT_SIZE); - lfHeader.lfWeight = FW_BOLD; - pPrintData->hHeaderFont = CreateFontIndirect(&lfHeader); - if (pPrintData->hHeaderFont == NULL) - return FALSE; - - return TRUE; -} - -static BOOL DoPrintDocument(PPRINT_DATA printData) -{ - DOCINFO docInfo; - LPPRINTDLG pPrinter = &printData->printer; - DWORD CopyCount, PageCount; - TEXTMETRIC tmHeader; - BOOL ret = FALSE; - HFONT hOldFont; - - GetLocalTime(&printData->stNow); - - printData->printRect = GetPrintingRect(pPrinter->hDC, &Globals.lMargins); - - if (!DoCreatePrintFonts(pPrinter, printData)) - { - printData->status = STRING_PRINTFAILED; - goto Quit; - } - - if (pPrinter->Flags & PD_SELECTION) - printData->cchText = GetSelectionTextLength(Globals.hEdit); - else - printData->cchText = GetWindowTextLength(Globals.hEdit); - - /* Allocate a buffer for the text */ - printData->pszText = HeapAlloc(GetProcessHeap(), 0, (printData->cchText + 1) * sizeof(TCHAR)); - if (!printData->pszText) - { - printData->status = STRING_PRINTFAILED; - goto Quit; - } - - if (pPrinter->Flags & PD_SELECTION) - GetSelectionText(Globals.hEdit, printData->pszText, printData->cchText + 1); - else - GetWindowText(Globals.hEdit, printData->pszText, printData->cchText + 1); - - /* Start a document */ - ZeroMemory(&docInfo, sizeof(docInfo)); - docInfo.cbSize = sizeof(DOCINFO); - docInfo.lpszDocName = Globals.szFileTitle; - if (StartDoc(pPrinter->hDC, &docInfo) <= 0) - { - printData->status = STRING_PRINTFAILED; - goto Quit; - } - - /* Calculate the header and footer heights */ - hOldFont = SelectObject(pPrinter->hDC, printData->hHeaderFont); - GetTextMetrics(pPrinter->hDC, &tmHeader); - printData->cyHeader = printData->cyFooter = 2 * tmHeader.tmHeight; - printData->cySpacing = Y_POINTS_TO_PIXELS(pPrinter->hDC, SPACING_HEIGHT); - SelectObject(pPrinter->hDC, hOldFont); /* De-select the font */ - if (!Globals.szHeader[0]) - printData->cyHeader = printData->cySpacing = 0; - if (!Globals.szFooter[0]) - printData->cyFooter = 0; - - /* The printing-copies loop */ - for (CopyCount = 1; CopyCount <= pPrinter->nCopies; ++CopyCount) - { - /* The printing-pages loop */ - for (PageCount = 1, printData->ich = 0; printData->ich < printData->cchText; ++PageCount) - { - printData->currentPage = PageCount; - PostMessage(printData->hwndDlg, PRINTING_MESSAGE, 0, 0); - - if (!DoPrintPage(printData, PageCount)) - { - AbortDoc(pPrinter->hDC); /* Cancel printing */ - goto Quit; - } - } - } - - if (EndDoc(pPrinter->hDC) <= 0) - { - printData->status = STRING_PRINTFAILED; - goto Quit; - } - - ret = TRUE; - printData->status = STRING_PRINTCOMPLETE; - -Quit: - DeleteObject(printData->hHeaderFont); - DeleteObject(printData->hBodyFont); - if (printData->pszText) - HeapFree(GetProcessHeap(), 0, printData->pszText); - if (printData->status == STRING_PRINTCANCELING) - printData->status = STRING_PRINTCANCELED; - PostMessage(printData->hwndDlg, PRINTING_MESSAGE, 0, 0); - return ret; -} - -static DWORD WINAPI PrintThreadFunc(LPVOID arg) -{ - PPRINT_DATA pData = arg; - pData->currentPage = 1; - pData->status = STRING_NOWPRINTING; - PostMessage(pData->hwndDlg, PRINTING_MESSAGE, 0, 0); - return DoPrintDocument(pData); -} - -static INT_PTR CALLBACK -DIALOG_Printing_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - TCHAR szText[MAX_STRING_LEN]; - static TCHAR s_szPage[64]; - static PPRINT_DATA s_pData = NULL; - static HANDLE s_hThread = NULL; - - switch (uMsg) - { - case WM_INITDIALOG: - s_pData = (PPRINT_DATA)lParam; - s_pData->hwndDlg = hwnd; - SetDlgItemText(hwnd, IDC_PRINTING_FILENAME, Globals.szFileTitle); - GetDlgItemText(hwnd, IDC_PRINTING_PAGE, s_szPage, ARRAY_SIZE(s_szPage)); - SetDlgItemText(hwnd, IDC_PRINTING_PAGE, NULL); - - s_hThread = CreateThread(NULL, 0, PrintThreadFunc, s_pData, 0, NULL); - if (!s_hThread) - { - s_pData->status = STRING_PRINTFAILED; - EndDialog(hwnd, IDABORT); - } - return TRUE; - - case PRINTING_MESSAGE: - switch (s_pData->status) - { - case STRING_NOWPRINTING: - case STRING_PRINTCANCELING: - StringCchPrintf(szText, ARRAY_SIZE(szText), s_szPage, s_pData->currentPage); - SetDlgItemText(hwnd, IDC_PRINTING_PAGE, szText); - - LoadString(Globals.hInstance, s_pData->status, szText, ARRAY_SIZE(szText)); - SetDlgItemText(hwnd, IDC_PRINTING_STATUS, szText); - break; - - case STRING_PRINTCOMPLETE: - case STRING_PRINTCANCELED: - case STRING_PRINTFAILED: - LoadString(Globals.hInstance, s_pData->status, szText, ARRAY_SIZE(szText)); - SetDlgItemText(hwnd, IDC_PRINTING_STATUS, szText); - - if (s_pData->status == STRING_PRINTCOMPLETE) - EndDialog(hwnd, IDOK); - else if (s_pData->status == STRING_PRINTFAILED) - EndDialog(hwnd, IDABORT); - else - EndDialog(hwnd, IDCANCEL); - break; - } - break; - - case WM_COMMAND: - if (LOWORD(wParam) == IDCANCEL && s_pData->status == STRING_NOWPRINTING) - { - EnableWindow(GetDlgItem(hwnd, IDCANCEL), FALSE); - s_pData->status = STRING_PRINTCANCELING; - PostMessage(hwnd, PRINTING_MESSAGE, 0, 0); - } - break; - - case WM_DESTROY: - if (s_hThread) - CloseHandle(s_hThread); - DeleteDC(s_pData->printer.hDC); - s_pData = LocalFree(s_pData); - break; - } - - return 0; -} - -VOID DIALOG_FilePrint(VOID) -{ - BOOL ret; - LPPRINTDLG printer; - PPRINT_DATA printData = LocalAlloc(LPTR, sizeof(PRINT_DATA)); - if (!printData) - { - ShowLastError(); - return; - } - - printer = &printData->printer; - printer->lStructSize = sizeof(PRINTDLG); - printer->hwndOwner = Globals.hMainWnd; - printer->Flags = PD_RETURNDC | PD_SELECTION; - - /* Disable the selection radio button if there is no text selected */ - if (!GetSelectionTextLength(Globals.hEdit)) - printer->Flags |= PD_NOSELECTION; - - printer->nFromPage = 1; - printer->nToPage = MAXWORD; - printer->nMinPage = 1; - printer->nMaxPage = MAXWORD; - - printer->hDevMode = Globals.hDevMode; - printer->hDevNames = Globals.hDevNames; - - ret = PrintDlg(printer); - /* NOTE: Even if PrintDlg returns FALSE, hDevMode and hDevNames may have changed. */ - Globals.hDevMode = printer->hDevMode; - Globals.hDevNames = printer->hDevNames; - - if (!ret) - { - LocalFree(printData); - return; /* The user canceled printing */ - } - assert(printer->hDC != NULL); - - /* Ensure that each logical unit maps to one pixel */ - SetMapMode(printer->hDC, MM_TEXT); - - if (DialogBoxParam(Globals.hInstance, - MAKEINTRESOURCE(DIALOG_PRINTING), - Globals.hMainWnd, - DIALOG_Printing_DialogProc, - (LPARAM)printer) == IDABORT) - { - AlertPrintError(); - } -} - VOID DIALOG_FileExit(VOID) { PostMessage(Globals.hMainWnd, WM_CLOSE, 0, 0); @@ -1525,76 +921,3 @@ VOID DIALOG_HelpAboutNotepad(VOID) ShellAbout(Globals.hMainWnd, szNotepad, szNotepadAuthors, notepadIcon); DestroyIcon(notepadIcon); } - -/*********************************************************************** - * DIALOG_FilePageSetup - */ -VOID DIALOG_FilePageSetup(void) -{ - PAGESETUPDLG page; - - ZeroMemory(&page, sizeof(page)); - page.lStructSize = sizeof(page); - page.hwndOwner = Globals.hMainWnd; - page.Flags = PSD_ENABLEPAGESETUPTEMPLATE | PSD_ENABLEPAGESETUPHOOK | PSD_MARGINS; - page.hInstance = Globals.hInstance; - page.rtMargin = Globals.lMargins; - page.hDevMode = Globals.hDevMode; - page.hDevNames = Globals.hDevNames; - page.lpPageSetupTemplateName = MAKEINTRESOURCE(DIALOG_PAGESETUP); - page.lpfnPageSetupHook = DIALOG_PAGESETUP_Hook; - - PageSetupDlg(&page); - - /* NOTE: Even if PageSetupDlg returns FALSE, the following members may have changed */ - Globals.hDevMode = page.hDevMode; - Globals.hDevNames = page.hDevNames; - Globals.lMargins = page.rtMargin; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * DIALOG_PAGESETUP_Hook - */ -static UINT_PTR CALLBACK DIALOG_PAGESETUP_Hook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_COMMAND: - if (HIWORD(wParam) == BN_CLICKED) - { - switch (LOWORD(wParam)) - { - case IDOK: - /* save user input and close dialog */ - GetDlgItemText(hDlg, 0x141, Globals.szHeader, ARRAY_SIZE(Globals.szHeader)); - GetDlgItemText(hDlg, 0x143, Globals.szFooter, ARRAY_SIZE(Globals.szFooter)); - return FALSE; - - case IDCANCEL: - /* discard user input and close dialog */ - return FALSE; - - case IDHELP: - { - /* FIXME: Bring this to work */ - static const TCHAR sorry[] = _T("Sorry, no help available"); - static const TCHAR help[] = _T("Help"); - MessageBox(Globals.hMainWnd, sorry, help, MB_ICONEXCLAMATION); - return TRUE; - } - - default: - break; - } - } - break; - - case WM_INITDIALOG: - /* fetch last user input prior to display dialog */ - SetDlgItemText(hDlg, 0x141, Globals.szHeader); - SetDlgItemText(hDlg, 0x143, Globals.szFooter); - break; - } - - return FALSE; -} diff --git a/base/applications/notepad/printing.c b/base/applications/notepad/printing.c new file mode 100644 index 00000000000..7040ec3498f --- /dev/null +++ b/base/applications/notepad/printing.c @@ -0,0 +1,688 @@ +/* + * PROJECT: ReactOS Notepad + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Providing a Windows-compatible simple text editor for ReactOS + * COPYRIGHT: Copyright 2020-2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> + */ + +#include "notepad.h" + +#include <strsafe.h> +#include <assert.h> + +static VOID AlertPrintError(VOID) +{ + TCHAR szUntitled[MAX_STRING_LEN]; + + LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, ARRAY_SIZE(szUntitled)); + + DIALOG_StringMsgBox(Globals.hMainWnd, STRING_PRINTERROR, + Globals.szFileName[0] ? Globals.szFileName : szUntitled, + MB_ICONEXCLAMATION | MB_OK); +} + +static RECT +GetPrintingRect(IN HDC hdc, IN LPCRECT pMargins) +{ + INT iLogPixelsX = GetDeviceCaps(hdc, LOGPIXELSX); + INT iLogPixelsY = GetDeviceCaps(hdc, LOGPIXELSY); + INT iHorzRes = GetDeviceCaps(hdc, HORZRES); /* in pixels */ + INT iVertRes = GetDeviceCaps(hdc, VERTRES); /* in pixels */ + RECT rcPrintRect, rcPhysical; + +#define CONVERT_X(x) MulDiv((x), iLogPixelsX, 2540) /* 100th millimeters to pixels */ +#define CONVERT_Y(y) MulDiv((y), iLogPixelsY, 2540) /* 100th millimeters to pixels */ + SetRect(&rcPrintRect, + CONVERT_X(pMargins->left), CONVERT_Y(pMargins->top), + iHorzRes - CONVERT_X(pMargins->right), + iVertRes - CONVERT_Y(pMargins->bottom)); + + rcPhysical.left = GetDeviceCaps(hdc, PHYSICALOFFSETX); + rcPhysical.right = rcPhysical.left + GetDeviceCaps(hdc, PHYSICALWIDTH); + rcPhysical.top = GetDeviceCaps(hdc, PHYSICALOFFSETY); + rcPhysical.bottom = rcPhysical.top + GetDeviceCaps(hdc, PHYSICALHEIGHT); + + /* Adjust the margin */ + rcPrintRect.left = max(rcPrintRect.left, rcPhysical.left); + rcPrintRect.top = max(rcPrintRect.top, rcPhysical.top); + rcPrintRect.right = min(rcPrintRect.right, rcPhysical.right); + rcPrintRect.bottom = min(rcPrintRect.bottom, rcPhysical.bottom); + + return rcPrintRect; +} + +static INT GetSelectionTextLength(HWND hWnd) +{ + DWORD dwStart = 0, dwEnd = 0; + SendMessage(hWnd, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd); + return dwEnd - dwStart; +} + +static INT GetSelectionText(HWND hWnd, LPTSTR lpString, INT nMaxCount) +{ + DWORD dwStart = 0, dwEnd = 0; + INT cchText = GetWindowTextLength(hWnd); + LPTSTR pszText; + HLOCAL hLocal; + HRESULT hr; + + SendMessage(hWnd, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd); + if (!lpString || dwStart == dwEnd || cchText == 0) + return 0; + + hLocal = (HLOCAL)SendMessage(hWnd, EM_GETHANDLE, 0, 0); + pszText = (LPTSTR)LocalLock(hLocal); + if (!pszText) + return 0; + + hr = StringCchCopyN(lpString, nMaxCount, pszText + dwStart, dwEnd - dwStart); + LocalUnlock(hLocal); + + switch (hr) + { + case S_OK: + return dwEnd - dwStart; + + case STRSAFE_E_INSUFFICIENT_BUFFER: + return nMaxCount - 1; + + default: + return 0; + } +} + +typedef struct +{ + PRINTDLG printer; + HWND hwndDlg; + INT status; + INT currentPage; + RECT printRect; + SYSTEMTIME stNow; + HFONT hHeaderFont; + HFONT hBodyFont; + LPTSTR pszText; + DWORD ich; + DWORD cchText; + INT cyHeader; + INT cySpacing; + INT cyFooter; +} PRINT_DATA, *PPRINT_DATA; + +/* Convert the points into pixels */ +#define X_POINTS_TO_PIXELS(hDC, points) MulDiv((points), GetDeviceCaps((hDC), LOGPIXELSX), 72) +#define Y_POINTS_TO_PIXELS(hDC, points) MulDiv((points), GetDeviceCaps((hDC), LOGPIXELSY), 72) + +/* + * See also: + *
https://support.microsoft.com/en-us/windows/changing-header-and-footer-comm…
+ */ +static VOID +DrawHeaderOrFooter(HDC hDC, LPRECT pRect, LPCTSTR pszFormat, INT nPageNo, const SYSTEMTIME *pstNow) +{ + TCHAR szText[256], szField[128]; + const TCHAR *pchFormat; + UINT uAlign = DT_CENTER, uFlags = DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX; + HGDIOBJ hOldPen, hOldBrush; + + /* Draw a rectangle */ + hOldPen = SelectObject(hDC, GetStockObject(BLACK_PEN)); + hOldBrush = SelectObject(hDC, GetStockObject(NULL_BRUSH)); + Rectangle(hDC, pRect->left, pRect->top, pRect->right, pRect->bottom); + SelectObject(hDC, hOldBrush); + SelectObject(hDC, hOldPen); + + InflateRect(pRect, -X_POINTS_TO_PIXELS(hDC, 3), 0); /* Shrink 3pt */ + + szText[0] = 0; + + for (pchFormat = pszFormat; *pchFormat; ++pchFormat) + { + if (*pchFormat != _T('&')) + { + StringCchCatN(szText, ARRAY_SIZE(szText), pchFormat, 1); + continue; + } + + ++pchFormat; + if (*pchFormat == 0) + break; + + switch (_totupper(*pchFormat)) /* Make it uppercase */ + { + case _T('&'): /* Found double ampersand */ + StringCchCat(szText, ARRAY_SIZE(szText), TEXT("&")); + break; + + case _T('L'): /* Left */ + DrawText(hDC, szText, -1, pRect, uAlign | uFlags); + szText[0] = 0; + uAlign = DT_LEFT; + break; + + case _T('C'): /* Center */ + DrawText(hDC, szText, -1, pRect, uAlign | uFlags); + szText[0] = 0; + uAlign = DT_CENTER; + break; + + case _T('R'): /* Right */ + DrawText(hDC, szText, -1, pRect, uAlign | uFlags); + szText[0] = 0; + uAlign = DT_RIGHT; + break; + + case _T('D'): /* Date */ + GetDateFormat(LOCALE_USER_DEFAULT, 0, pstNow, NULL, + szField, (INT)ARRAY_SIZE(szField)); + StringCchCat(szText, ARRAY_SIZE(szText), szField); + break; + + case _T('T'): /* Time */ + GetTimeFormat(LOCALE_USER_DEFAULT, 0, pstNow, NULL, + szField, (INT)ARRAY_SIZE(szField)); + StringCchCat(szText, ARRAY_SIZE(szText), szField); + break; + + case _T('F'): /* Filename */ + StringCchCat(szText, ARRAY_SIZE(szText), Globals.szFileTitle); + break; + + case _T('P'): /* Page number */ + StringCchPrintf(szField, ARRAY_SIZE(szField), TEXT("%u"), nPageNo); + StringCchCat(szText, ARRAY_SIZE(szText), szField); + break; + + default: /* Otherwise */ + szField[0] = _T('&'); + szField[1] = *pchFormat; + szField[2] = 0; + StringCchCat(szText, ARRAY_SIZE(szText), szField); + break; + } + } + + DrawText(hDC, szText, -1, pRect, uAlign | uFlags); +} + +static BOOL DoPrintBody(PPRINT_DATA pData, DWORD PageCount, BOOL bSkipPage) +{ + LPPRINTDLG pPrinter = &pData->printer; + RECT printRect = pData->printRect; + INT xLeft = printRect.left, yTop = printRect.top + pData->cyHeader + pData->cySpacing; + INT xStart, tabWidth; + DWORD ichStart; + SIZE charMetrics; + TEXTMETRIC tmText; + + /* Calculate a tab width */ +#define TAB_STOP 8 + GetTextMetrics(pPrinter->hDC, &tmText); + tabWidth = TAB_STOP * tmText.tmAveCharWidth; + +#define DO_FLUSH() do { \ + if (ichStart < pData->ich && !bSkipPage) { \ + TextOut(pPrinter->hDC, xStart, yTop, &pData->pszText[ichStart], pData->ich - ichStart); \ + } \ + ichStart = pData->ich; \ + xStart = xLeft; \ + if (pData->status == STRING_PRINTCANCELING) return FALSE; \ +} while (0) + + /* The drawing-body loop */ + for (ichStart = pData->ich, xStart = xLeft; pData->ich < pData->cchText; ) + { + TCHAR ch = pData->pszText[pData->ich]; + + if (ch == _T('\r')) + { + DO_FLUSH(); + + pData->ich++; /* Next char */ + ichStart = pData->ich; + continue; + } + + if (ch == _T('\n')) + { + DO_FLUSH(); + + /* Next line */ + yTop += tmText.tmHeight; + xLeft = xStart = printRect.left; + } + else + { + if (ch == _T('\t')) + { + INT nStepWidth = tabWidth - ((xLeft - printRect.left) % tabWidth); + + DO_FLUSH(); + + /* Go to the next tab stop */ + xLeft += nStepWidth; + xStart = xLeft; + } + else /* Normal char */ + { + GetTextExtentPoint32(pPrinter->hDC, &ch, 1, &charMetrics); + xLeft += charMetrics.cx; + } + + /* Insert a line break if the next position reached the right edge */ + if (xLeft + charMetrics.cx >= printRect.right) + { + if (ch != _T('\t')) + DO_FLUSH(); + + /* Next line */ + yTop += tmText.tmHeight; + xLeft = xStart = printRect.left; + } + } + + pData->ich++; /* Next char */ + if (ch == _T('\t') || ch == _T('\n')) + ichStart = pData->ich; + + if (yTop + tmText.tmHeight >= printRect.bottom - pData->cyFooter) + break; /* The next line reached the body bottom */ + } + + DO_FLUSH(); + return TRUE; +} + +static BOOL DoPrintPage(PPRINT_DATA pData, DWORD PageCount) +{ + LPPRINTDLG pPrinter = &pData->printer; + BOOL bSkipPage, ret; + HFONT hOldFont; + + /* Should we skip this page? */ + bSkipPage = !(pPrinter->Flags & PD_SELECTION) && + (pPrinter->Flags & PD_PAGENUMS) && + !(pPrinter->nFromPage <= PageCount && PageCount <= pPrinter->nToPage); + + /* The prologue of a page */ + if (!bSkipPage) + { + if (StartPage(pPrinter->hDC) <= 0) + { + pData->status = STRING_PRINTFAILED; + return FALSE; + } + + if (pData->cyHeader > 0) + { + /* Draw the page header */ + RECT rc = pData->printRect; + rc.bottom = rc.top + pData->cyHeader; + + hOldFont = SelectObject(pPrinter->hDC, pData->hHeaderFont); + DrawHeaderOrFooter(pPrinter->hDC, &rc, Globals.szHeader, PageCount, &pData->stNow); + SelectObject(pPrinter->hDC, hOldFont); /* De-select the font */ + } + } + + hOldFont = SelectObject(pPrinter->hDC, pData->hBodyFont); + ret = DoPrintBody(pData, PageCount, bSkipPage); + SelectObject(pPrinter->hDC, hOldFont); + if (!ret) + return FALSE; /* Canceled */ + + /* The epilogue of a page */ + if (!bSkipPage) + { + if (pData->cyFooter > 0) + { + /* Draw the page footer */ + RECT rc = pData->printRect; + rc.top = rc.bottom - pData->cyFooter; + + hOldFont = SelectObject(pPrinter->hDC, pData->hHeaderFont); + DrawHeaderOrFooter(pPrinter->hDC, &rc, Globals.szFooter, PageCount, &pData->stNow); + SelectObject(pPrinter->hDC, hOldFont); + } + + if (EndPage(pPrinter->hDC) <= 0) + { + pData->status = STRING_PRINTFAILED; + return FALSE; + } + } + + return TRUE; +} + +#define BODY_FONT_SIZE 10 /* 10pt */ +#define HEADER_FONT_SIZE 9 /* 9pt */ +#define SPACING_HEIGHT 4 /* 4pt */ +#define PRINTING_MESSAGE (WM_USER + 100) + +static BOOL DoCreatePrintFonts(LPPRINTDLG pPrinter, PPRINT_DATA pPrintData) +{ + LOGFONT lfBody, lfHeader; + + /* Create the main text font for printing */ + lfBody = Globals.lfFont; + lfBody.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, BODY_FONT_SIZE); + pPrintData->hBodyFont = CreateFontIndirect(&lfBody); + if (pPrintData->hBodyFont == NULL) + return FALSE; + + /* Create the header/footer font */ + lfHeader = Globals.lfFont; + lfHeader.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, HEADER_FONT_SIZE); + lfHeader.lfWeight = FW_BOLD; + pPrintData->hHeaderFont = CreateFontIndirect(&lfHeader); + if (pPrintData->hHeaderFont == NULL) + return FALSE; + + return TRUE; +} + +static BOOL DoPrintDocument(PPRINT_DATA printData) +{ + DOCINFO docInfo; + LPPRINTDLG pPrinter = &printData->printer; + DWORD CopyCount, PageCount; + TEXTMETRIC tmHeader; + BOOL ret = FALSE; + HFONT hOldFont; + + GetLocalTime(&printData->stNow); + + printData->printRect = GetPrintingRect(pPrinter->hDC, &Globals.lMargins); + + if (!DoCreatePrintFonts(pPrinter, printData)) + { + printData->status = STRING_PRINTFAILED; + goto Quit; + } + + if (pPrinter->Flags & PD_SELECTION) + printData->cchText = GetSelectionTextLength(Globals.hEdit); + else + printData->cchText = GetWindowTextLength(Globals.hEdit); + + /* Allocate a buffer for the text */ + printData->pszText = HeapAlloc(GetProcessHeap(), 0, (printData->cchText + 1) * sizeof(TCHAR)); + if (!printData->pszText) + { + printData->status = STRING_PRINTFAILED; + goto Quit; + } + + if (pPrinter->Flags & PD_SELECTION) + GetSelectionText(Globals.hEdit, printData->pszText, printData->cchText + 1); + else + GetWindowText(Globals.hEdit, printData->pszText, printData->cchText + 1); + + /* Start a document */ + ZeroMemory(&docInfo, sizeof(docInfo)); + docInfo.cbSize = sizeof(DOCINFO); + docInfo.lpszDocName = Globals.szFileTitle; + if (StartDoc(pPrinter->hDC, &docInfo) <= 0) + { + printData->status = STRING_PRINTFAILED; + goto Quit; + } + + /* Calculate the header and footer heights */ + hOldFont = SelectObject(pPrinter->hDC, printData->hHeaderFont); + GetTextMetrics(pPrinter->hDC, &tmHeader); + printData->cyHeader = printData->cyFooter = 2 * tmHeader.tmHeight; + printData->cySpacing = Y_POINTS_TO_PIXELS(pPrinter->hDC, SPACING_HEIGHT); + SelectObject(pPrinter->hDC, hOldFont); /* De-select the font */ + if (!Globals.szHeader[0]) + printData->cyHeader = printData->cySpacing = 0; + if (!Globals.szFooter[0]) + printData->cyFooter = 0; + + /* The printing-copies loop */ + for (CopyCount = 1; CopyCount <= pPrinter->nCopies; ++CopyCount) + { + /* The printing-pages loop */ + for (PageCount = 1, printData->ich = 0; printData->ich < printData->cchText; ++PageCount) + { + printData->currentPage = PageCount; + PostMessage(printData->hwndDlg, PRINTING_MESSAGE, 0, 0); + + if (!DoPrintPage(printData, PageCount)) + { + AbortDoc(pPrinter->hDC); /* Cancel printing */ + goto Quit; + } + } + } + + if (EndDoc(pPrinter->hDC) <= 0) + { + printData->status = STRING_PRINTFAILED; + goto Quit; + } + + ret = TRUE; + printData->status = STRING_PRINTCOMPLETE; + +Quit: + DeleteObject(printData->hHeaderFont); + DeleteObject(printData->hBodyFont); + if (printData->pszText) + HeapFree(GetProcessHeap(), 0, printData->pszText); + if (printData->status == STRING_PRINTCANCELING) + printData->status = STRING_PRINTCANCELED; + PostMessage(printData->hwndDlg, PRINTING_MESSAGE, 0, 0); + return ret; +} + +static DWORD WINAPI PrintThreadFunc(LPVOID arg) +{ + PPRINT_DATA pData = arg; + pData->currentPage = 1; + pData->status = STRING_NOWPRINTING; + PostMessage(pData->hwndDlg, PRINTING_MESSAGE, 0, 0); + return DoPrintDocument(pData); +} + +static INT_PTR CALLBACK +DIALOG_Printing_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TCHAR szText[MAX_STRING_LEN]; + static TCHAR s_szPage[64]; + static PPRINT_DATA s_pData = NULL; + static HANDLE s_hThread = NULL; + + switch (uMsg) + { + case WM_INITDIALOG: + s_pData = (PPRINT_DATA)lParam; + s_pData->hwndDlg = hwnd; + SetDlgItemText(hwnd, IDC_PRINTING_FILENAME, Globals.szFileTitle); + GetDlgItemText(hwnd, IDC_PRINTING_PAGE, s_szPage, ARRAY_SIZE(s_szPage)); + SetDlgItemText(hwnd, IDC_PRINTING_PAGE, NULL); + + s_hThread = CreateThread(NULL, 0, PrintThreadFunc, s_pData, 0, NULL); + if (!s_hThread) + { + s_pData->status = STRING_PRINTFAILED; + EndDialog(hwnd, IDABORT); + } + return TRUE; + + case PRINTING_MESSAGE: + switch (s_pData->status) + { + case STRING_NOWPRINTING: + case STRING_PRINTCANCELING: + StringCchPrintf(szText, ARRAY_SIZE(szText), s_szPage, s_pData->currentPage); + SetDlgItemText(hwnd, IDC_PRINTING_PAGE, szText); + + LoadString(Globals.hInstance, s_pData->status, szText, ARRAY_SIZE(szText)); + SetDlgItemText(hwnd, IDC_PRINTING_STATUS, szText); + break; + + case STRING_PRINTCOMPLETE: + case STRING_PRINTCANCELED: + case STRING_PRINTFAILED: + LoadString(Globals.hInstance, s_pData->status, szText, ARRAY_SIZE(szText)); + SetDlgItemText(hwnd, IDC_PRINTING_STATUS, szText); + + if (s_pData->status == STRING_PRINTCOMPLETE) + EndDialog(hwnd, IDOK); + else if (s_pData->status == STRING_PRINTFAILED) + EndDialog(hwnd, IDABORT); + else + EndDialog(hwnd, IDCANCEL); + break; + } + break; + + case WM_COMMAND: + if (LOWORD(wParam) == IDCANCEL && s_pData->status == STRING_NOWPRINTING) + { + EnableWindow(GetDlgItem(hwnd, IDCANCEL), FALSE); + s_pData->status = STRING_PRINTCANCELING; + PostMessage(hwnd, PRINTING_MESSAGE, 0, 0); + } + break; + + case WM_DESTROY: + if (s_hThread) + CloseHandle(s_hThread); + DeleteDC(s_pData->printer.hDC); + s_pData = LocalFree(s_pData); + break; + } + + return 0; +} + +VOID DIALOG_FilePrint(VOID) +{ + BOOL ret; + LPPRINTDLG printer; + PPRINT_DATA printData = LocalAlloc(LPTR, sizeof(PRINT_DATA)); + if (!printData) + { + ShowLastError(); + return; + } + + printer = &printData->printer; + printer->lStructSize = sizeof(PRINTDLG); + printer->hwndOwner = Globals.hMainWnd; + printer->Flags = PD_RETURNDC | PD_SELECTION; + + /* Disable the selection radio button if there is no text selected */ + if (!GetSelectionTextLength(Globals.hEdit)) + printer->Flags |= PD_NOSELECTION; + + printer->nFromPage = 1; + printer->nToPage = MAXWORD; + printer->nMinPage = 1; + printer->nMaxPage = MAXWORD; + + printer->hDevMode = Globals.hDevMode; + printer->hDevNames = Globals.hDevNames; + + ret = PrintDlg(printer); + /* NOTE: Even if PrintDlg returns FALSE, hDevMode and hDevNames may have changed. */ + Globals.hDevMode = printer->hDevMode; + Globals.hDevNames = printer->hDevNames; + + if (!ret) + { + LocalFree(printData); + return; /* The user canceled printing */ + } + assert(printer->hDC != NULL); + + /* Ensure that each logical unit maps to one pixel */ + SetMapMode(printer->hDC, MM_TEXT); + + if (DialogBoxParam(Globals.hInstance, + MAKEINTRESOURCE(DIALOG_PRINTING), + Globals.hMainWnd, + DIALOG_Printing_DialogProc, + (LPARAM)printer) == IDABORT) + { + AlertPrintError(); + } +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * DIALOG_PAGESETUP_Hook + */ +static UINT_PTR CALLBACK DIALOG_PAGESETUP_Hook(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_INITDIALOG: + /* fetch last user input prior to display dialog */ + SetDlgItemText(hDlg, 0x141, Globals.szHeader); + SetDlgItemText(hDlg, 0x143, Globals.szFooter); + break; + + case WM_COMMAND: + { + if (HIWORD(wParam) == BN_CLICKED) + { + switch (LOWORD(wParam)) + { + case IDOK: + /* save user input and close dialog */ + GetDlgItemText(hDlg, 0x141, Globals.szHeader, ARRAY_SIZE(Globals.szHeader)); + GetDlgItemText(hDlg, 0x143, Globals.szFooter, ARRAY_SIZE(Globals.szFooter)); + return FALSE; + + case IDCANCEL: + /* discard user input and close dialog */ + return FALSE; + + case IDHELP: + { + /* FIXME: Bring this to work */ + static const TCHAR sorry[] = _T("Sorry, no help available"); + static const TCHAR help[] = _T("Help"); + MessageBox(Globals.hMainWnd, sorry, help, MB_ICONEXCLAMATION); + return TRUE; + } + + default: + break; + } + } + break; + } + } + + return FALSE; +} + +/*********************************************************************** + * DIALOG_FilePageSetup + */ +VOID DIALOG_FilePageSetup(VOID) +{ + PAGESETUPDLG page; + + ZeroMemory(&page, sizeof(page)); + page.lStructSize = sizeof(page); + page.hwndOwner = Globals.hMainWnd; + page.Flags = PSD_ENABLEPAGESETUPTEMPLATE | PSD_ENABLEPAGESETUPHOOK | PSD_MARGINS; + page.hInstance = Globals.hInstance; + page.rtMargin = Globals.lMargins; + page.hDevMode = Globals.hDevMode; + page.hDevNames = Globals.hDevNames; + page.lpPageSetupTemplateName = MAKEINTRESOURCE(DIALOG_PAGESETUP); + page.lpfnPageSetupHook = DIALOG_PAGESETUP_Hook; + + PageSetupDlg(&page); + + /* NOTE: Even if PageSetupDlg returns FALSE, the following members may have changed */ + Globals.hDevMode = page.hDevMode; + Globals.hDevNames = page.hDevNames; + Globals.lMargins = page.rtMargin; +}
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NOTEPAD] Add 'Now-printing' dialog (#5127)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=072503c1fc133f48c4d71…
commit 072503c1fc133f48c4d710362b42b4cc4fb7f192 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Mar 11 22:23:14 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Mar 11 22:23:14 2023 +0900 [NOTEPAD] Add 'Now-printing' dialog (#5127) Allow the user to cancel the print job. - Add DIALOG_PRINTING dialog. - Make the print job another thread. - Let the thread communicate with the dialog box by PRINTING_MESSAGE. - Add some resource strings. CORE-18837 --- base/applications/notepad/dialog.c | 247 +++++++++++++++++++++++--------- base/applications/notepad/lang/bg-BG.rc | 16 +++ base/applications/notepad/lang/cs-CZ.rc | 16 +++ base/applications/notepad/lang/da-DK.rc | 16 +++ base/applications/notepad/lang/de-DE.rc | 16 +++ base/applications/notepad/lang/el-GR.rc | 16 +++ base/applications/notepad/lang/en-US.rc | 16 +++ base/applications/notepad/lang/es-ES.rc | 16 +++ base/applications/notepad/lang/et-EE.rc | 16 +++ base/applications/notepad/lang/eu-ES.rc | 16 +++ base/applications/notepad/lang/fi-FI.rc | 16 +++ base/applications/notepad/lang/fr-FR.rc | 16 +++ base/applications/notepad/lang/he-IL.rc | 16 +++ base/applications/notepad/lang/hi-IN.rc | 16 +++ base/applications/notepad/lang/hr-HR.rc | 16 +++ base/applications/notepad/lang/hu-HU.rc | 16 +++ base/applications/notepad/lang/hy-AM.rc | 16 +++ base/applications/notepad/lang/id-ID.rc | 16 +++ base/applications/notepad/lang/it-IT.rc | 16 +++ base/applications/notepad/lang/ja-JP.rc | 16 +++ base/applications/notepad/lang/lt-LT.rc | 16 +++ base/applications/notepad/lang/ms-MY.rc | 16 +++ base/applications/notepad/lang/nl-NL.rc | 16 +++ base/applications/notepad/lang/no-NO.rc | 16 +++ base/applications/notepad/lang/pl-PL.rc | 16 +++ base/applications/notepad/lang/pt-BR.rc | 16 +++ base/applications/notepad/lang/pt-PT.rc | 16 +++ base/applications/notepad/lang/ro-RO.rc | 16 +++ base/applications/notepad/lang/ru-RU.rc | 16 +++ base/applications/notepad/lang/sk-SK.rc | 16 +++ base/applications/notepad/lang/sl-SI.rc | 16 +++ base/applications/notepad/lang/sq-AL.rc | 16 +++ base/applications/notepad/lang/sv-SE.rc | 16 +++ base/applications/notepad/lang/th-TH.rc | 16 +++ base/applications/notepad/lang/tr-TR.rc | 16 +++ base/applications/notepad/lang/uk-UA.rc | 16 +++ base/applications/notepad/lang/uz-UZ.rc | 16 +++ base/applications/notepad/lang/zh-CN.rc | 16 +++ base/applications/notepad/lang/zh-HK.rc | 16 +++ base/applications/notepad/lang/zh-TW.rc | 16 +++ base/applications/notepad/notepad_res.h | 9 ++ 41 files changed, 812 insertions(+), 68 deletions(-) diff --git a/base/applications/notepad/dialog.c b/base/applications/notepad/dialog.c index e31d8d6f038..3bd835a5011 100644 --- a/base/applications/notepad/dialog.c +++ b/base/applications/notepad/dialog.c @@ -717,7 +717,10 @@ DrawHeaderOrFooter(HDC hDC, LPRECT pRect, LPCTSTR pszFormat, INT nPageNo, const typedef struct { - LPPRINTDLG pPrinter; + PRINTDLG printer; + HWND hwndDlg; + INT status; + INT currentPage; RECT printRect; SYSTEMTIME stNow; HFONT hHeaderFont; @@ -732,7 +735,7 @@ typedef struct static BOOL DoPrintBody(PPRINT_DATA pData, DWORD PageCount, BOOL bSkipPage) { - LPPRINTDLG pPrinter = pData->pPrinter; + LPPRINTDLG pPrinter = &pData->printer; RECT printRect = pData->printRect; INT xLeft = printRect.left, yTop = printRect.top + pData->cyHeader + pData->cySpacing; INT xStart, tabWidth; @@ -751,6 +754,7 @@ static BOOL DoPrintBody(PPRINT_DATA pData, DWORD PageCount, BOOL bSkipPage) } \ ichStart = pData->ich; \ xStart = xLeft; \ + if (pData->status == STRING_PRINTCANCELING) return FALSE; \ } while (0) /* The drawing-body loop */ @@ -819,8 +823,8 @@ static BOOL DoPrintBody(PPRINT_DATA pData, DWORD PageCount, BOOL bSkipPage) static BOOL DoPrintPage(PPRINT_DATA pData, DWORD PageCount) { - LPPRINTDLG pPrinter = pData->pPrinter; - BOOL bSkipPage; + LPPRINTDLG pPrinter = &pData->printer; + BOOL bSkipPage, ret; HFONT hOldFont; /* Should we skip this page? */ @@ -833,7 +837,7 @@ static BOOL DoPrintPage(PPRINT_DATA pData, DWORD PageCount) { if (StartPage(pPrinter->hDC) <= 0) { - AlertPrintError(); + pData->status = STRING_PRINTFAILED; return FALSE; } @@ -850,8 +854,10 @@ static BOOL DoPrintPage(PPRINT_DATA pData, DWORD PageCount) } hOldFont = SelectObject(pPrinter->hDC, pData->hBodyFont); - DoPrintBody(pData, PageCount, bSkipPage); + ret = DoPrintBody(pData, PageCount, bSkipPage); SelectObject(pPrinter->hDC, hOldFont); + if (!ret) + return FALSE; /* Canceled */ /* The epilogue of a page */ if (!bSkipPage) @@ -869,7 +875,7 @@ static BOOL DoPrintPage(PPRINT_DATA pData, DWORD PageCount) if (EndPage(pPrinter->hDC) <= 0) { - AlertPrintError(); + pData->status = STRING_PRINTFAILED; return FALSE; } } @@ -877,9 +883,10 @@ static BOOL DoPrintPage(PPRINT_DATA pData, DWORD PageCount) return TRUE; } -#define HEADER_FONT_SIZE 11 /* 11pt */ -#define BODY_FONT_SIZE 9 /* 9pt */ +#define BODY_FONT_SIZE 10 /* 10pt */ +#define HEADER_FONT_SIZE 9 /* 9pt */ #define SPACING_HEIGHT 4 /* 4pt */ +#define PRINTING_MESSAGE (WM_USER + 100) static BOOL DoCreatePrintFonts(LPPRINTDLG pPrinter, PPRINT_DATA pPrintData) { @@ -887,17 +894,15 @@ static BOOL DoCreatePrintFonts(LPPRINTDLG pPrinter, PPRINT_DATA pPrintData) /* Create the main text font for printing */ lfBody = Globals.lfFont; - lfBody.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, HEADER_FONT_SIZE); + lfBody.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, BODY_FONT_SIZE); pPrintData->hBodyFont = CreateFontIndirect(&lfBody); if (pPrintData->hBodyFont == NULL) return FALSE; /* Create the header/footer font */ - ZeroMemory(&lfHeader, sizeof(lfHeader)); - lfHeader.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, BODY_FONT_SIZE); + lfHeader = Globals.lfFont; + lfHeader.lfHeight = -Y_POINTS_TO_PIXELS(pPrinter->hDC, HEADER_FONT_SIZE); lfHeader.lfWeight = FW_BOLD; - lfHeader.lfCharSet = DEFAULT_CHARSET; - StringCchCopy(lfHeader.lfFaceName, ARRAY_SIZE(lfHeader.lfFaceName), lfBody.lfFaceName); pPrintData->hHeaderFont = CreateFontIndirect(&lfHeader); if (pPrintData->hHeaderFont == NULL) return FALSE; @@ -905,42 +910,42 @@ static BOOL DoCreatePrintFonts(LPPRINTDLG pPrinter, PPRINT_DATA pPrintData) return TRUE; } -static BOOL DoPrintDocument(LPPRINTDLG pPrinter) +static BOOL DoPrintDocument(PPRINT_DATA printData) { DOCINFO docInfo; - PRINT_DATA printData = { pPrinter }; + LPPRINTDLG pPrinter = &printData->printer; DWORD CopyCount, PageCount; TEXTMETRIC tmHeader; BOOL ret = FALSE; HFONT hOldFont; - GetLocalTime(&printData.stNow); + GetLocalTime(&printData->stNow); - printData.printRect = GetPrintingRect(pPrinter->hDC, &Globals.lMargins); + printData->printRect = GetPrintingRect(pPrinter->hDC, &Globals.lMargins); - if (!DoCreatePrintFonts(pPrinter, &printData)) + if (!DoCreatePrintFonts(pPrinter, printData)) { - ShowLastError(); + printData->status = STRING_PRINTFAILED; goto Quit; } if (pPrinter->Flags & PD_SELECTION) - printData.cchText = GetSelectionTextLength(Globals.hEdit); + printData->cchText = GetSelectionTextLength(Globals.hEdit); else - printData.cchText = GetWindowTextLength(Globals.hEdit); + printData->cchText = GetWindowTextLength(Globals.hEdit); /* Allocate a buffer for the text */ - printData.pszText = HeapAlloc(GetProcessHeap(), 0, (printData.cchText + 1) * sizeof(TCHAR)); - if (!printData.pszText) + printData->pszText = HeapAlloc(GetProcessHeap(), 0, (printData->cchText + 1) * sizeof(TCHAR)); + if (!printData->pszText) { - ShowLastError(); + printData->status = STRING_PRINTFAILED; goto Quit; } if (pPrinter->Flags & PD_SELECTION) - GetSelectionText(Globals.hEdit, printData.pszText, printData.cchText + 1); + GetSelectionText(Globals.hEdit, printData->pszText, printData->cchText + 1); else - GetWindowText(Globals.hEdit, printData.pszText, printData.cchText + 1); + GetWindowText(Globals.hEdit, printData->pszText, printData->cchText + 1); /* Start a document */ ZeroMemory(&docInfo, sizeof(docInfo)); @@ -948,28 +953,31 @@ static BOOL DoPrintDocument(LPPRINTDLG pPrinter) docInfo.lpszDocName = Globals.szFileTitle; if (StartDoc(pPrinter->hDC, &docInfo) <= 0) { - AlertPrintError(); + printData->status = STRING_PRINTFAILED; goto Quit; } /* Calculate the header and footer heights */ - hOldFont = SelectObject(pPrinter->hDC, printData.hHeaderFont); + hOldFont = SelectObject(pPrinter->hDC, printData->hHeaderFont); GetTextMetrics(pPrinter->hDC, &tmHeader); - printData.cyHeader = printData.cyFooter = 2 * tmHeader.tmHeight; - printData.cySpacing = Y_POINTS_TO_PIXELS(pPrinter->hDC, SPACING_HEIGHT); + printData->cyHeader = printData->cyFooter = 2 * tmHeader.tmHeight; + printData->cySpacing = Y_POINTS_TO_PIXELS(pPrinter->hDC, SPACING_HEIGHT); SelectObject(pPrinter->hDC, hOldFont); /* De-select the font */ if (!Globals.szHeader[0]) - printData.cyHeader = printData.cySpacing = 0; + printData->cyHeader = printData->cySpacing = 0; if (!Globals.szFooter[0]) - printData.cyFooter = 0; + printData->cyFooter = 0; /* The printing-copies loop */ for (CopyCount = 1; CopyCount <= pPrinter->nCopies; ++CopyCount) { /* The printing-pages loop */ - for (PageCount = 1, printData.ich = 0; printData.ich < printData.cchText; ++PageCount) + for (PageCount = 1, printData->ich = 0; printData->ich < printData->cchText; ++PageCount) { - if (!DoPrintPage(&printData, PageCount)) + printData->currentPage = PageCount; + PostMessage(printData->hwndDlg, PRINTING_MESSAGE, 0, 0); + + if (!DoPrintPage(printData, PageCount)) { AbortDoc(pPrinter->hDC); /* Cancel printing */ goto Quit; @@ -978,56 +986,158 @@ static BOOL DoPrintDocument(LPPRINTDLG pPrinter) } if (EndDoc(pPrinter->hDC) <= 0) - AlertPrintError(); - else - ret = TRUE; + { + printData->status = STRING_PRINTFAILED; + goto Quit; + } -Quit: /* Clean up */ - DeleteObject(printData.hHeaderFont); - DeleteObject(printData.hBodyFont); - if (printData.pszText) - HeapFree(GetProcessHeap(), 0, printData.pszText); + ret = TRUE; + printData->status = STRING_PRINTCOMPLETE; + +Quit: + DeleteObject(printData->hHeaderFont); + DeleteObject(printData->hBodyFont); + if (printData->pszText) + HeapFree(GetProcessHeap(), 0, printData->pszText); + if (printData->status == STRING_PRINTCANCELING) + printData->status = STRING_PRINTCANCELED; + PostMessage(printData->hwndDlg, PRINTING_MESSAGE, 0, 0); return ret; } -VOID DIALOG_FilePrint(VOID) +static DWORD WINAPI PrintThreadFunc(LPVOID arg) { - PRINTDLG printer; + PPRINT_DATA pData = arg; + pData->currentPage = 1; + pData->status = STRING_NOWPRINTING; + PostMessage(pData->hwndDlg, PRINTING_MESSAGE, 0, 0); + return DoPrintDocument(pData); +} - /* Get Current Settings */ - ZeroMemory(&printer, sizeof(printer)); - printer.lStructSize = sizeof(printer); - printer.hwndOwner = Globals.hMainWnd; - printer.hInstance = Globals.hInstance; +static INT_PTR CALLBACK +DIALOG_Printing_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TCHAR szText[MAX_STRING_LEN]; + static TCHAR s_szPage[64]; + static PPRINT_DATA s_pData = NULL; + static HANDLE s_hThread = NULL; - /* Set some default flags */ - printer.Flags = PD_RETURNDC | PD_SELECTION; + switch (uMsg) + { + case WM_INITDIALOG: + s_pData = (PPRINT_DATA)lParam; + s_pData->hwndDlg = hwnd; + SetDlgItemText(hwnd, IDC_PRINTING_FILENAME, Globals.szFileTitle); + GetDlgItemText(hwnd, IDC_PRINTING_PAGE, s_szPage, ARRAY_SIZE(s_szPage)); + SetDlgItemText(hwnd, IDC_PRINTING_PAGE, NULL); + + s_hThread = CreateThread(NULL, 0, PrintThreadFunc, s_pData, 0, NULL); + if (!s_hThread) + { + s_pData->status = STRING_PRINTFAILED; + EndDialog(hwnd, IDABORT); + } + return TRUE; + + case PRINTING_MESSAGE: + switch (s_pData->status) + { + case STRING_NOWPRINTING: + case STRING_PRINTCANCELING: + StringCchPrintf(szText, ARRAY_SIZE(szText), s_szPage, s_pData->currentPage); + SetDlgItemText(hwnd, IDC_PRINTING_PAGE, szText); + + LoadString(Globals.hInstance, s_pData->status, szText, ARRAY_SIZE(szText)); + SetDlgItemText(hwnd, IDC_PRINTING_STATUS, szText); + break; + + case STRING_PRINTCOMPLETE: + case STRING_PRINTCANCELED: + case STRING_PRINTFAILED: + LoadString(Globals.hInstance, s_pData->status, szText, ARRAY_SIZE(szText)); + SetDlgItemText(hwnd, IDC_PRINTING_STATUS, szText); + + if (s_pData->status == STRING_PRINTCOMPLETE) + EndDialog(hwnd, IDOK); + else if (s_pData->status == STRING_PRINTFAILED) + EndDialog(hwnd, IDABORT); + else + EndDialog(hwnd, IDCANCEL); + break; + } + break; + + case WM_COMMAND: + if (LOWORD(wParam) == IDCANCEL && s_pData->status == STRING_NOWPRINTING) + { + EnableWindow(GetDlgItem(hwnd, IDCANCEL), FALSE); + s_pData->status = STRING_PRINTCANCELING; + PostMessage(hwnd, PRINTING_MESSAGE, 0, 0); + } + break; + + case WM_DESTROY: + if (s_hThread) + CloseHandle(s_hThread); + DeleteDC(s_pData->printer.hDC); + s_pData = LocalFree(s_pData); + break; + } + + return 0; +} + +VOID DIALOG_FilePrint(VOID) +{ + BOOL ret; + LPPRINTDLG printer; + PPRINT_DATA printData = LocalAlloc(LPTR, sizeof(PRINT_DATA)); + if (!printData) + { + ShowLastError(); + return; + } + + printer = &printData->printer; + printer->lStructSize = sizeof(PRINTDLG); + printer->hwndOwner = Globals.hMainWnd; + printer->Flags = PD_RETURNDC | PD_SELECTION; /* Disable the selection radio button if there is no text selected */ if (!GetSelectionTextLength(Globals.hEdit)) - printer.Flags |= PD_NOSELECTION; + printer->Flags |= PD_NOSELECTION; - printer.nFromPage = 1; - printer.nToPage = MAXWORD; - printer.nMinPage = 1; - printer.nMaxPage = MAXWORD; + printer->nFromPage = 1; + printer->nToPage = MAXWORD; + printer->nMinPage = 1; + printer->nMaxPage = MAXWORD; - printer.hDevMode = Globals.hDevMode; - printer.hDevNames = Globals.hDevNames; + printer->hDevMode = Globals.hDevMode; + printer->hDevNames = Globals.hDevNames; - if (!PrintDlg(&printer)) - return; /* The user canceled printing */ + ret = PrintDlg(printer); + /* NOTE: Even if PrintDlg returns FALSE, hDevMode and hDevNames may have changed. */ + Globals.hDevMode = printer->hDevMode; + Globals.hDevNames = printer->hDevNames; - assert(printer.hDC != NULL); - Globals.hDevMode = printer.hDevMode; - Globals.hDevNames = printer.hDevNames; + if (!ret) + { + LocalFree(printData); + return; /* The user canceled printing */ + } + assert(printer->hDC != NULL); /* Ensure that each logical unit maps to one pixel */ - SetMapMode(printer.hDC, MM_TEXT); - - DoPrintDocument(&printer); + SetMapMode(printer->hDC, MM_TEXT); - DeleteDC(printer.hDC); + if (DialogBoxParam(Globals.hInstance, + MAKEINTRESOURCE(DIALOG_PRINTING), + Globals.hMainWnd, + DIALOG_Printing_DialogProc, + (LPARAM)printer) == IDABORT) + { + AlertPrintError(); + } } VOID DIALOG_FileExit(VOID) @@ -1436,6 +1546,7 @@ VOID DIALOG_FilePageSetup(void) PageSetupDlg(&page); + /* NOTE: Even if PageSetupDlg returns FALSE, the following members may have changed */ Globals.hDevMode = page.hDevMode; Globals.hDevNames = page.hDevNames; Globals.lMargins = page.rtMargin; diff --git a/base/applications/notepad/lang/bg-BG.rc b/base/applications/notepad/lang/bg-BG.rc index ffc30a206db..9d45a9f5d1d 100644 --- a/base/applications/notepad/lang/bg-BG.rc +++ b/base/applications/notepad/lang/bg-BG.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Отказ", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Страница %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ BEGIN STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Възпроизводствено право 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/cs-CZ.rc b/base/applications/notepad/lang/cs-CZ.rc index 71c65359bdb..874854b9cf4 100644 --- a/base/applications/notepad/lang/cs-CZ.rc +++ b/base/applications/notepad/lang/cs-CZ.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Storno", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Strana %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ paměti." STRING_PRINTERROR "Soubor '%s' nebylo možné vytisknout.\n\nZkontrolujte, zda je tiskárna zapnutá a správně nastavená." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Textový dokument" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/da-DK.rc b/base/applications/notepad/lang/da-DK.rc index e44e6089e75..dc637207806 100644 --- a/base/applications/notepad/lang/da-DK.rc +++ b/base/applications/notepad/lang/da-DK.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Side %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ hukommelse, og prøv så igen." STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/de-DE.rc b/base/applications/notepad/lang/de-DE.rc index 86219a879f4..8220a475df4 100644 --- a/base/applications/notepad/lang/de-DE.rc +++ b/base/applications/notepad/lang/de-DE.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Abbrechen", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Seite %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Abbrechen", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -167,6 +178,11 @@ um diese Funktion\nabzuschließen. Beenden Sie eine oder mehrere \ STRING_PRINTERROR "Die Datei '%s' kann nicht gedruckt werden.\n\nStellen Sie sicher, dass der Drucker angeschlossen und richtig konfiguriert ist." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Textdokument" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/el-GR.rc b/base/applications/notepad/lang/el-GR.rc index 3cef55cd8db..4d8cb846c65 100644 --- a/base/applications/notepad/lang/el-GR.rc +++ b/base/applications/notepad/lang/el-GR.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Ακύρωση", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Σελίδα %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Ακύρωση", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ BEGIN STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/en-US.rc b/base/applications/notepad/lang/en-US.rc index 1aaf9c43a33..a3444ea81b6 100644 --- a/base/applications/notepad/lang/en-US.rc +++ b/base/applications/notepad/lang/en-US.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Page %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ task.\nClose one or more applications to increase the amount of\nfree memory." STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/es-ES.rc b/base/applications/notepad/lang/es-ES.rc index 46abc699626..541fdfbad63 100644 --- a/base/applications/notepad/lang/es-ES.rc +++ b/base/applications/notepad/lang/es-ES.rc @@ -132,6 +132,17 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Página %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancelar", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -168,6 +179,11 @@ aumentar la cantidad\nde memoria libre." STRING_PRINTERROR "No se puede imprimir el archivo '%s'.\n\nAsegúrese de que la impresora esté encendida y configurada correctamente." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Documento de texto" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/et-EE.rc b/base/applications/notepad/lang/et-EE.rc index 55583c79f11..8b1171328fa 100644 --- a/base/applications/notepad/lang/et-EE.rc +++ b/base/applications/notepad/lang/et-EE.rc @@ -138,6 +138,17 @@ BEGIN PUSHBUTTON "Loobu", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Lk %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Loobu", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -173,6 +184,11 @@ käsu lõpetamiseks.\nSulge üks või enam rakendust, et suurendada\nvaba mälu STRING_PRINTERROR "Ei suuda printida faili '%s'.\n\nVeendu et printer on sisse lülitatud ja korralikult sättestatud." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Tekstidokument" STRING_NOTEPAD_AUTHORS "Autoriõigus 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/eu-ES.rc b/base/applications/notepad/lang/eu-ES.rc index 074f3e280a0..c9719f4fbc6 100644 --- a/base/applications/notepad/lang/eu-ES.rc +++ b/base/applications/notepad/lang/eu-ES.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Utzi", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Orriak %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Utzi", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ memoria librearen\nkopurua handitzeko." STRING_PRINTERROR "'%s' fitxategia inprimatu ez ahal du.\n\nZihurtatu behar duzu inmprimagailua pistuta eta ongi konfiguratuta dago." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/fi-FI.rc b/base/applications/notepad/lang/fi-FI.rc index 112b1a909aa..6cc2f9a1a0c 100644 --- a/base/applications/notepad/lang/fi-FI.rc +++ b/base/applications/notepad/lang/fi-FI.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Sivu %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ muistia." STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/fr-FR.rc b/base/applications/notepad/lang/fr-FR.rc index 407deb3feab..6216cd8804b 100644 --- a/base/applications/notepad/lang/fr-FR.rc +++ b/base/applications/notepad/lang/fr-FR.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Annuler", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Page %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Annuler", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ de la mémoire." STRING_PRINTERROR "Impossible d'imprimer le fichier '%s'.\n\nVérifiez que l'imprimante est allumée et correctement configurée." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Document Texte" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/he-IL.rc b/base/applications/notepad/lang/he-IL.rc index 0ccac31217c..afcdd1a9e81 100644 --- a/base/applications/notepad/lang/he-IL.rc +++ b/base/applications/notepad/lang/he-IL.rc @@ -133,6 +133,17 @@ BEGIN PUSHBUTTON "ביטול", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "עמוד %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "ביטול", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -168,6 +179,11 @@ task.\nClose one or more applications to increase the amount of\nfree memory." STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/hi-IN.rc b/base/applications/notepad/lang/hi-IN.rc index f66e29898fd..5c568dc677e 100644 --- a/base/applications/notepad/lang/hi-IN.rc +++ b/base/applications/notepad/lang/hi-IN.rc @@ -137,6 +137,17 @@ BEGIN PUSHBUTTON "रद्द करें", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Page %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "रद्द करें", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -172,6 +183,11 @@ BEGIN STRING_PRINTERROR "फ़ाइल '%s' मुद्रित नहीं कर सकता।\n\n सुनिश्चित करें कि प्रिंटर चालू है और ठीक से कॉन्फ़िगर किया गया है।" STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "टेक्स्ट डॉक्यूमॅन्ट" STRING_NOTEPAD_AUTHORS "कॉपीराइट 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/hr-HR.rc b/base/applications/notepad/lang/hr-HR.rc index 8d69778a17d..dea66511d0a 100644 --- a/base/applications/notepad/lang/hr-HR.rc +++ b/base/applications/notepad/lang/hr-HR.rc @@ -137,6 +137,17 @@ BEGIN PUSHBUTTON "Odustani", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Stranica %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Odustani", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -172,6 +183,11 @@ zadatak.\nZatvorite jednu ili više aplikacija da povećate\nslobodnu memoriju." STRING_PRINTERROR "Ne mogu ispisati datoteku '%s'.\n\nProvjerite je li pisač uključen i je li pravilno konfiguiran." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Tekstni dokument" STRING_NOTEPAD_AUTHORS "Copyright 1997, 98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/hu-HU.rc b/base/applications/notepad/lang/hu-HU.rc index 4fb13be84ee..18e368941c7 100644 --- a/base/applications/notepad/lang/hu-HU.rc +++ b/base/applications/notepad/lang/hu-HU.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Mégse", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Oldalszám: %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Mégse", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ Szeretné menteni a változásokat?" STRING_PRINTERROR "Nem sikerült kinyomtatni a következő fájlt: '%s'.\n\nEllenőrizze hogy a nyomtató be van-e kapcsolva és megfelelően van-e konfigurálva." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Szöveges dokumentum" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/hy-AM.rc b/base/applications/notepad/lang/hy-AM.rc index b570d30e510..c1b866313b4 100644 --- a/base/applications/notepad/lang/hy-AM.rc +++ b/base/applications/notepad/lang/hy-AM.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Չնդունել", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Էջ %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Չնդունել", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ Would you like to save the changes ?" STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/id-ID.rc b/base/applications/notepad/lang/id-ID.rc index 1bf3230f469..8405f0f0abf 100644 --- a/base/applications/notepad/lang/id-ID.rc +++ b/base/applications/notepad/lang/id-ID.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Batal", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Halaman %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Batal", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ bebas." STRING_PRINTERROR "Tidak bisa mencetak '%s'.\n\nPastikan pencetak telah menyala dan bisa digunakan dengan benar." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Teks Dokumen" STRING_NOTEPAD_AUTHORS "Hak Cipta 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/it-IT.rc b/base/applications/notepad/lang/it-IT.rc index 4cba0c5eb0a..a22a1586762 100644 --- a/base/applications/notepad/lang/it-IT.rc +++ b/base/applications/notepad/lang/it-IT.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Annulla", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Pagina %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Annulla", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ di memoria libera." STRING_PRINTERROR "Impossibile stampare il file '%s'.\n\nControllare che la stampante sia accesa e impostata correttamente." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Documento di testo" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/ja-JP.rc b/base/applications/notepad/lang/ja-JP.rc index bc50047fac0..e9df825c3ac 100644 --- a/base/applications/notepad/lang/ja-JP.rc +++ b/base/applications/notepad/lang/ja-JP.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "キャンセル", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "印刷中" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 9, "MS UI Gothic" +BEGIN + CTEXT "印刷ジョブを開始中...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(ファイル名)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "ページ %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "キャンセル", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ BEGIN STRING_PRINTERROR "ファイル '%s'を印刷できません。\n\nプリンタがオンになっていて、正しく設定されているか確認して下さい。" STRING_DEFAULTFONT "MS ゴシック" /* MS Gothic */ STRING_LINE_NUMBER_OUT_OF_RANGE "指定された行番号は範囲外です。" + STRING_NOWPRINTING "印刷中..." + STRING_PRINTCANCELING "印刷ジョブをキャンセル中..." + STRING_PRINTCOMPLETE "印刷が完了しました。" + STRING_PRINTCANCELED "印刷がキャンセルされました。" + STRING_PRINTFAILED "印刷が失敗しました。" STRING_TEXT_DOCUMENT "テキスト文書" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/lt-LT.rc b/base/applications/notepad/lang/lt-LT.rc index 1cd4f99306c..3e474ed0041 100644 --- a/base/applications/notepad/lang/lt-LT.rc +++ b/base/applications/notepad/lang/lt-LT.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Atsisakyti", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Puslapis %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Atsisakyti", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ Ar norite išsaugoti pakeitimus?" STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "(C) 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/ms-MY.rc b/base/applications/notepad/lang/ms-MY.rc index 2c08f7fc548..b20afcc378f 100644 --- a/base/applications/notepad/lang/ms-MY.rc +++ b/base/applications/notepad/lang/ms-MY.rc @@ -132,6 +132,17 @@ BEGIN PUSHBUTTON "Batal", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Page %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Batal", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -167,6 +178,11 @@ tugas ini.\nTutup satu atau lebih aplikasi untuk menambah jumlah\ningatan kosong STRING_PRINTERROR "Tidak boleh mencetak fail '%s'.\n\nPastikan pencetak dihidupkan dan dikonfigurasikan dengan betul." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/nl-NL.rc b/base/applications/notepad/lang/nl-NL.rc index dce7657c783..f3ec9a79fb1 100644 --- a/base/applications/notepad/lang/nl-NL.rc +++ b/base/applications/notepad/lang/nl-NL.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Pagina %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ Wilt u de wijzigingen opslaan?" STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/no-NO.rc b/base/applications/notepad/lang/no-NO.rc index 4cb8c26aed4..8df8d4c00b2 100644 --- a/base/applications/notepad/lang/no-NO.rc +++ b/base/applications/notepad/lang/no-NO.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Avbryt", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Side %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Avbryt", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -166,6 +177,11 @@ minne." STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Enerett 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/pl-PL.rc b/base/applications/notepad/lang/pl-PL.rc index ba60d5ec329..97874362419 100644 --- a/base/applications/notepad/lang/pl-PL.rc +++ b/base/applications/notepad/lang/pl-PL.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Anuluj", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Strona %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Anuluj", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -160,6 +171,11 @@ BEGIN STRING_PRINTERROR "Nie można wydrukować pliku '%s'.\n\nUpewnij się, że drukarka jest włączona i poprawnie skonfigurowana." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Dokument tekstowy" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/pt-BR.rc b/base/applications/notepad/lang/pt-BR.rc index 912a37a4f68..c3e8d86ed08 100644 --- a/base/applications/notepad/lang/pt-BR.rc +++ b/base/applications/notepad/lang/pt-BR.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Página %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancelar", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ tarefa.\nFeche uma ou mais aplicações para aumentar a quantidade de memória l STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/pt-PT.rc b/base/applications/notepad/lang/pt-PT.rc index 3b5e2de940b..13f0c79f1f5 100644 --- a/base/applications/notepad/lang/pt-PT.rc +++ b/base/applications/notepad/lang/pt-PT.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Página %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancelar", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ tarefa.\nFeche uma ou mais aplicações para aumentar a quantidade de memória l STRING_PRINTERROR "Impossível imprimir o ficheiro '%s'.\n\nCertifique-se de que a impressora está ligada e correctamente configurada." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Documento de texto" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/ro-RO.rc b/base/applications/notepad/lang/ro-RO.rc index d1354a2db43..5b95ee1fac3 100644 --- a/base/applications/notepad/lang/ro-RO.rc +++ b/base/applications/notepad/lang/ro-RO.rc @@ -135,6 +135,17 @@ BEGIN PUSHBUTTON "A&nulează", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Pagină %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "A&nulează", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -170,6 +181,11 @@ Păstrați modificările aduse?" STRING_PRINTERROR "Fișierul „%s” nu a putut fi imprimat.\n\nAsigurați-vă că imprimanta este pornită și configurată corespunzător." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Document text" STRING_NOTEPAD_AUTHORS "Drept de autor 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/ru-RU.rc b/base/applications/notepad/lang/ru-RU.rc index 71b0c70e06a..a3ffa8bdc6a 100644 --- a/base/applications/notepad/lang/ru-RU.rc +++ b/base/applications/notepad/lang/ru-RU.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Отмена", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Страница %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Отмена", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ BEGIN STRING_PRINTERROR "Невозможно распечатать файл '%s'.\n\nПроверьте, включен ли принтер, и настроен ли он правильно." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Текстовый документ" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/sk-SK.rc b/base/applications/notepad/lang/sk-SK.rc index 87334cd527a..cead9a46f5e 100644 --- a/base/applications/notepad/lang/sk-SK.rc +++ b/base/applications/notepad/lang/sk-SK.rc @@ -138,6 +138,17 @@ BEGIN PUSHBUTTON "Zrušiť", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Strana %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Zrušiť", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -173,6 +184,11 @@ alebo viac aplikácií, aby sa uvoľnila pamäť a skúste to znova." STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/sl-SI.rc b/base/applications/notepad/lang/sl-SI.rc index 55af9a7dd65..0031fd14997 100644 --- a/base/applications/notepad/lang/sl-SI.rc +++ b/base/applications/notepad/lang/sl-SI.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Stran %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ operacijo.\nÈe ga želite sprostiti, konèajte enega ali veè programov in posk STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/sq-AL.rc b/base/applications/notepad/lang/sq-AL.rc index cdf0a08b135..60d5a04da2e 100644 --- a/base/applications/notepad/lang/sq-AL.rc +++ b/base/applications/notepad/lang/sq-AL.rc @@ -134,6 +134,17 @@ BEGIN PUSHBUTTON "Anulo", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Faqe %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Anulo", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -169,6 +180,11 @@ detyrë.\nMbyll nje ose me shume programe te rrisesh shumën e\nmemories." STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/sv-SE.rc b/base/applications/notepad/lang/sv-SE.rc index a256eff432b..70b3e3a2baa 100644 --- a/base/applications/notepad/lang/sv-SE.rc +++ b/base/applications/notepad/lang/sv-SE.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Avbryt", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Sida %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Avbryt", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ den här åtgärden.\nAvsluta ett eller flera program för att frigöra mer minn STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/th-TH.rc b/base/applications/notepad/lang/th-TH.rc index 471d0d73a8f..11fe1192792 100644 --- a/base/applications/notepad/lang/th-TH.rc +++ b/base/applications/notepad/lang/th-TH.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "หน้า %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -160,6 +171,11 @@ BEGIN STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/tr-TR.rc b/base/applications/notepad/lang/tr-TR.rc index 26a7ef1f87e..1f37825511e 100644 --- a/base/applications/notepad/lang/tr-TR.rc +++ b/base/applications/notepad/lang/tr-TR.rc @@ -133,6 +133,17 @@ BEGIN PUSHBUTTON "İptal", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Sayfa %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "İptal", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -163,6 +174,11 @@ BEGIN STRING_PRINTERROR """%s"" dosyası yazdırılamıyor.\n\nYazıcının açık olduğundan ve doğru yapılandırıldığından emin olunuz." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Metin Belgesi" STRING_NOTEPAD_AUTHORS "Telif Hakları: 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/uk-UA.rc b/base/applications/notepad/lang/uk-UA.rc index 23f6b27ba74..a914503457a 100644 --- a/base/applications/notepad/lang/uk-UA.rc +++ b/base/applications/notepad/lang/uk-UA.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Скасувати", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Сторінка %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Скасувати", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ BEGIN STRING_PRINTERROR "Неможливо розпечатати файл '%s'.\n\nПереконайтесь, що принтер ввімкнено, та налаштовано." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Текстовий документ" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/uz-UZ.rc b/base/applications/notepad/lang/uz-UZ.rc index 586905aeeab..4ea02231662 100644 --- a/base/applications/notepad/lang/uz-UZ.rc +++ b/base/applications/notepad/lang/uz-UZ.rc @@ -130,6 +130,17 @@ BEGIN PUSHBUTTON "Bekor qilmoq", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "Sahifa %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "Cancel", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -165,6 +176,11 @@ O‘zgarishlarni saqlashni istaysizmi?" STRING_PRINTERROR "Cannot print the file '%s'.\n\nMake sure that the printer is turned on and is configured properly." STRING_DEFAULTFONT "Lucida Console" STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/zh-CN.rc b/base/applications/notepad/lang/zh-CN.rc index bacc7722019..12879a31dd8 100644 --- a/base/applications/notepad/lang/zh-CN.rc +++ b/base/applications/notepad/lang/zh-CN.rc @@ -138,6 +138,17 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 9, "宋体" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "页面 %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "取消", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -173,6 +184,11 @@ BEGIN STRING_PRINTERROR "无法打印文件“%s”。\n\n请确保打印机已打开,并且已正确配置。" STRING_DEFAULTFONT "宋体" /* SimSun */ STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "文本文档" STRING_NOTEPAD_AUTHORS "版权所有 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/zh-HK.rc b/base/applications/notepad/lang/zh-HK.rc index 24fa27a6e36..7a2c9f23331 100644 --- a/base/applications/notepad/lang/zh-HK.rc +++ b/base/applications/notepad/lang/zh-HK.rc @@ -138,6 +138,17 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 9, "新細明體" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "第 %u 頁", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "取消", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -174,6 +185,11 @@ BEGIN 請檢查印表機是否已經開機及正確設定。" STRING_DEFAULTFONT "新細明體" /* PMingLiU */ STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "純文字檔案" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/lang/zh-TW.rc b/base/applications/notepad/lang/zh-TW.rc index 871a000a7bc..4d64ad1ea94 100644 --- a/base/applications/notepad/lang/zh-TW.rc +++ b/base/applications/notepad/lang/zh-TW.rc @@ -138,6 +138,17 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 120, 30, 40, 15 END +DIALOG_PRINTING DIALOG 0, 0, 160, 100 +CAPTION "Now printing" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 9, "新細明體" +BEGIN + CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "第 %u 頁", IDC_PRINTING_PAGE, 5, 55, 150, 15 + PUSHBUTTON "取消", IDCANCEL, 50, 75, 60, 20 +END + STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE "&f" @@ -173,6 +184,11 @@ BEGIN STRING_PRINTERROR "檔案「%s」列印失敗。\n\n請檢查印表機是否已經開機和正確設定。" STRING_DEFAULTFONT "新細明體" /* PMingLiU */ STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." + STRING_NOWPRINTING "Now printing page..." + STRING_PRINTCANCELING "The print job is being canceled..." + STRING_PRINTCOMPLETE "Printing is successfully done." + STRING_PRINTCANCELED "Printing has been canceled." + STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "純文字檔案" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/notepad_res.h b/base/applications/notepad/notepad_res.h index 870db3f7687..153590f67b8 100644 --- a/base/applications/notepad/notepad_res.h +++ b/base/applications/notepad/notepad_res.h @@ -31,6 +31,10 @@ #define ID_LINENUMBER 0x208 #define IDI_NPICON 0x209 #define IDC_LICENSE 0x20A +#define DIALOG_PRINTING 0x20B +#define IDC_PRINTING_STATUS 0x20C +#define IDC_PRINTING_FILENAME 0x20D +#define IDC_PRINTING_PAGE 0x20E /* Commands */ #define CMD_NEW 0x100 @@ -99,6 +103,11 @@ #define STRING_PRINTERROR 0x189 #define STRING_DEFAULTFONT 0x18A #define STRING_LINE_NUMBER_OUT_OF_RANGE 0x18B +#define STRING_NOWPRINTING 0x18C +#define STRING_PRINTCANCELING 0x18D +#define STRING_PRINTCOMPLETE 0x18E +#define STRING_PRINTCANCELED 0x18F +#define STRING_PRINTFAILED 0x190 #define STRING_TEXT_DOCUMENT 0x200
1 year, 9 months
1
0
0
0
[reactos] 01/01: [MSPAINT] Delete unused HWND hToolBtn[16] global variable
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b49b47fc84ddb4352811b…
commit b49b47fc84ddb4352811ba0424ee036297611cff Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Mar 11 14:19:12 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sat Mar 11 14:19:12 2023 +0900 [MSPAINT] Delete unused HWND hToolBtn[16] global variable CORE-18867 --- base/applications/mspaint/globalvar.h | 2 -- base/applications/mspaint/main.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/base/applications/mspaint/globalvar.h b/base/applications/mspaint/globalvar.h index 071baecb4dc..87f903438ba 100644 --- a/base/applications/mspaint/globalvar.h +++ b/base/applications/mspaint/globalvar.h @@ -47,8 +47,6 @@ extern HCURSOR hCurZoom; extern HCURSOR hCurPen; extern HCURSOR hCurAirbrush; -extern HWND hToolBtn[16]; - extern HINSTANCE hProgInstance; extern TCHAR filepathname[1000]; diff --git a/base/applications/mspaint/main.cpp b/base/applications/mspaint/main.cpp index 4b8ed0c5fbe..23c8f7a02b8 100644 --- a/base/applications/mspaint/main.cpp +++ b/base/applications/mspaint/main.cpp @@ -45,8 +45,6 @@ HCURSOR hCurZoom; HCURSOR hCurPen; HCURSOR hCurAirbrush; -HWND hToolBtn[16]; - HINSTANCE hProgInstance; TCHAR filepathname[1000];
1 year, 9 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
14
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Results per page:
10
25
50
100
200