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
July 2015
----- 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
13 participants
257 discussions
Start a n
N
ew thread
[tfaber] 68574: [KMTESTS:RTL] - Fix build CORE-9947
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Jul 26 08:05:07 2015 New Revision: 68574 URL:
http://svn.reactos.org/svn/reactos?rev=68574&view=rev
Log: [KMTESTS:RTL] - Fix build CORE-9947 Modified: trunk/rostests/kmtests/rtl/RtlIntSafe.c Modified: trunk/rostests/kmtests/rtl/RtlIntSafe.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlIntSafe.c?…
============================================================================== --- trunk/rostests/kmtests/rtl/RtlIntSafe.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/rtl/RtlIntSafe.c [iso-8859-1] Sun Jul 26 08:05:07 2015 @@ -7,6 +7,7 @@ #define KMT_EMULATE_KERNEL #include <kmt_test.h> +#define ENABLE_INTSAFE_SIGNED_FUNCTIONS #include <ntintsafe.h> START_TEST(RtlIntSafe) @@ -18,6 +19,7 @@ UINT UIntResult; USHORT UShortResult; SHORT ShortResult; + LONGLONG LongLongResult; #define TEST_CONVERSION(FromName, FromType, ToName, ToType, Print, Value, Expected, ExpectedStatus) \ do \
9 years, 5 months
1
0
0
0
[tfaber] 68573: [PSDK] - Add support for intsafe signed Add functions - Guard signed math in ENABLE_INTSAFE_SIGNED_FUNCTIONS CORE-9947 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Jul 26 08:03:02 2015 New Revision: 68573 URL:
http://svn.reactos.org/svn/reactos?rev=68573&view=rev
Log: [PSDK] - Add support for intsafe signed Add functions - Guard signed math in ENABLE_INTSAFE_SIGNED_FUNCTIONS CORE-9947 #resolve Modified: trunk/reactos/include/psdk/intsafe.h trunk/rostests/kmtests/rtl/RtlIntSafe.c Modified: trunk/reactos/include/psdk/intsafe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intsafe.h?rev…
============================================================================== --- trunk/reactos/include/psdk/intsafe.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/intsafe.h [iso-8859-1] Sun Jul 26 08:03:02 2015 @@ -433,6 +433,7 @@ DEFINE_SAFE_CONVERT_STOS(LongPtrToInt, LONG_PTR, INT) DEFINE_SAFE_CONVERT_STOS(LongPtrToLong, LONG_PTR, LONG) DEFINE_SAFE_CONVERT_STOS(LongPtrToIntPtr, LONG_PTR, INT_PTR) +DEFINE_SAFE_CONVERT_STOS(LongLongToInt, LONGLONG, INT) DEFINE_SAFE_CONVERT_STOS(LongLongToLong, LONGLONG, LONG) DEFINE_SAFE_CONVERT_STOS(LongLongToIntPtr, LONGLONG, INT_PTR) DEFINE_SAFE_CONVERT_STOS(LongLongToLongPtr, LONGLONG, LONG_PTR) @@ -582,6 +583,55 @@ DEFINE_SAFE_SUB(SIZETSub, SIZE_T) DEFINE_SAFE_SUB(ULongLongSub, ULONGLONG) +#ifdef ENABLE_INTSAFE_SIGNED_FUNCTIONS +_Must_inspect_result_ +__forceinline +INTSAFE_RESULT +INTSAFE_NAME(LongLongAdd)( + _In_ LONGLONG Augend, + _In_ LONGLONG Addend, + _Out_ _Deref_out_range_(==, Augend + Addend) LONGLONG* pResult) +{ + LONGLONG Result = Augend + Addend; + + /* The only way the result can overflow, is when the sign of the augend + and the addend are the same. In that case the result is expected to + have the same sign as the two, otherwise it overflowed. + Sign equality is checked with a binary xor operation. */ + if ( ((Augend ^ Addend) >= 0) && ((Augend ^ Result) < 0) ) + { + *pResult = LONGLONG_ERROR; + return INTSAFE_E_ARITHMETIC_OVERFLOW; + } + else + { + *pResult = Result; + return INTSAFE_SUCCESS; + } +} + + +#define DEFINE_SAFE_ADD_S(_Name, _Type1, _Type2, _Convert) \ +C_ASSERT(sizeof(_Type2) > sizeof(_Type1)); \ +_Must_inspect_result_ \ +__forceinline \ +INTSAFE_RESULT \ +INTSAFE_NAME(_Name)( \ + _In_ _Type1 Augend, \ + _In_ _Type1 Addend, \ + _Out_ _Deref_out_range_(==, Augend + Addend) _Type1* pOutput) \ +{ \ + return INTSAFE_NAME(_Convert)(((_Type2)Augend) + ((_Type2)Addend), pOutput); \ +} + +DEFINE_SAFE_ADD_S(Int8Add, INT8, SHORT, ShortToInt8) +DEFINE_SAFE_ADD_S(ShortAdd, SHORT, INT, IntToShort) +DEFINE_SAFE_ADD_S(IntAdd, INT, LONGLONG, LongLongToInt) +DEFINE_SAFE_ADD_S(LongAdd, LONG, LONGLONG, LongLongToLong) +#ifndef _WIN64 +DEFINE_SAFE_ADD_S(IntPtrAdd, INT_PTR, LONGLONG, LongLongToIntPtr) +DEFINE_SAFE_ADD_S(LongPtrAdd, LONG_PTR, LONGLONG, LongLongToLongPtr) +#endif _Must_inspect_result_ __forceinline @@ -611,6 +661,7 @@ #define DEFINE_SAFE_SUB_S(_Name, _Type1, _Type2, _Convert) \ +C_ASSERT(sizeof(_Type2) > sizeof(_Type1)); \ _Must_inspect_result_ \ __forceinline \ INTSAFE_RESULT \ @@ -628,6 +679,7 @@ DEFINE_SAFE_SUB_S(LongPtrSub, LONG_PTR, LONGLONG, LongLongToLongPtr) #endif +#endif /* ENABLE_INTSAFE_SIGNED_FUNCTIONS */ _Must_inspect_result_ __forceinline @@ -741,6 +793,8 @@ #define RtlUInt16Mult RtlUShortMult #define RtlWordMult RtlUShortMult #ifdef _WIN64 +#define RtlIntPtrAdd RtlLongLongAdd +#define RtlLongPtrAdd RtlLongLongAdd #define RtlIntPtrSub RtlLongLongSub #define RtlLongPtrSub RtlLongLongSub #define RtlSizeTMult RtlULongLongMult @@ -769,6 +823,8 @@ #define UInt16Mult UShortMult #define WordMult UShortMult #ifdef _WIN64 +#define IntPtrAdd LongLongAdd +#define LongPtrAdd LongLongAdd #define IntPtrSub LongLongSub #define LongPtrSub LongLongSub #define SizeTMult ULongLongMult Modified: trunk/rostests/kmtests/rtl/RtlIntSafe.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlIntSafe.c?…
============================================================================== --- trunk/rostests/kmtests/rtl/RtlIntSafe.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/rtl/RtlIntSafe.c [iso-8859-1] Sun Jul 26 08:03:02 2015 @@ -111,4 +111,36 @@ TEST_ADD(UInt8, UINT8, uint, UINT8_MAX - 1, 1, UINT8_MAX, STATUS_SUCCESS); TEST_ADD(UInt8, UINT8, uint, UINT8_MAX, 1, (UINT8)-1, STATUS_INTEGER_OVERFLOW); TEST_ADD(UInt8, UINT8, uint, UINT8_MAX, UINT8_MAX, (UINT8)-1, STATUS_INTEGER_OVERFLOW); + + TEST_ADD(Int8, INT8, int, 0, 0, 0, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, 5, 5, 10, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, 0, INT8_MAX, INT8_MAX, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, INT8_MAX, 0, INT8_MAX, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, INT8_MAX - 1, 1, INT8_MAX, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, INT8_MAX, 1, (INT8)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(Int8, INT8, int, INT8_MAX, INT8_MAX, (INT8)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(Int8, INT8, int, 0, -1, -1, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, -1, 0, -1, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, 0, INT8_MIN, INT8_MIN, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, INT8_MIN, 0, INT8_MIN, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, INT8_MAX, INT8_MIN, (INT8)-1, STATUS_SUCCESS); + TEST_ADD(Int8, INT8, int, INT8_MIN, -1, (INT8)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(Int8, INT8, int, INT8_MIN, INT8_MIN, (INT8)-1, STATUS_INTEGER_OVERFLOW); + + TEST_ADD(LongLong, LONGLONG, longlong, 0, 0, 0, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, 5, 5, 10, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, 0, LONGLONG_MAX, LONGLONG_MAX, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, 0, LONGLONG_MAX, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX - 1, 1, LONGLONG_MAX, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, 1, (LONGLONG)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, INT8_MAX, (LONGLONG)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(LongLong, LONGLONG, longlong, 0, -1, -1, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, -1, 0, -1, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, 0, LONGLONG_MIN, LONGLONG_MIN, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MIN, 0, LONGLONG_MIN, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, LONGLONG_MIN, (LONGLONG)-1, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MIN, -1, (LONGLONG)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MIN, LONGLONG_MIN, (LONGLONG)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(LongLong, LONGLONG, longlong, ULONG_MAX, 1, 0x100000000LL, STATUS_SUCCESS); + TEST_ADD(LongLong, LONGLONG, longlong, ULONG_MAX, ULONG_MAX, 0x1fffffffeLL, STATUS_SUCCESS); }
9 years, 5 months
1
0
0
0
[tfaber] 68572: [PSDK] - intsafe: use the correct type to check overflow in DEFINE_SAFE_ADD CORE-9946 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Jul 26 07:48:24 2015 New Revision: 68572 URL:
http://svn.reactos.org/svn/reactos?rev=68572&view=rev
Log: [PSDK] - intsafe: use the correct type to check overflow in DEFINE_SAFE_ADD CORE-9946 #resolve Modified: trunk/reactos/include/psdk/intsafe.h trunk/rostests/kmtests/rtl/RtlIntSafe.c Modified: trunk/reactos/include/psdk/intsafe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intsafe.h?rev…
============================================================================== --- trunk/reactos/include/psdk/intsafe.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/intsafe.h [iso-8859-1] Sun Jul 26 07:48:24 2015 @@ -526,7 +526,7 @@ _In_ _Type Addend, \ _Out_ _Deref_out_range_(==, Augend + Addend) _Type *pOutput) \ { \ - if ((Augend + Addend) >= Augend) \ + if ((_Type)(Augend + Addend) >= Augend) \ { \ *pOutput = Augend + Addend; \ return INTSAFE_SUCCESS; \ Modified: trunk/rostests/kmtests/rtl/RtlIntSafe.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlIntSafe.c?…
============================================================================== --- trunk/rostests/kmtests/rtl/RtlIntSafe.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/rtl/RtlIntSafe.c [iso-8859-1] Sun Jul 26 07:48:24 2015 @@ -95,4 +95,20 @@ TEST_CONVERSION(Int, INT, Short, SHORT, int, SHORT_MIN, SHORT_MIN, STATUS_SUCCESS); TEST_CONVERSION(Int, INT, Short, SHORT, int, SHORT_MIN - 1, (SHORT)-1, STATUS_INTEGER_OVERFLOW); TEST_CONVERSION(Int, INT, Short, SHORT, int, INT_MIN, (SHORT)-1, STATUS_INTEGER_OVERFLOW); + +#define TEST_ADD(_Name, _Type, _Print, _Value1, _Value2, _Expected, _Status) do \ + { \ + _Name ## Result = (_Type)0xfedcba9876543210; \ + Status = Rtl ## _Name ## Add(_Value1, _Value2, & _Name ## Result); \ + ok_eq_hex(Status, _Status); \ + ok_eq_ ## _Print(_Name ## Result, _Expected); \ + } while (0) + + TEST_ADD(UInt8, UINT8, uint, 0, 0, 0, STATUS_SUCCESS); + TEST_ADD(UInt8, UINT8, uint, 5, 5, 10, STATUS_SUCCESS); + TEST_ADD(UInt8, UINT8, uint, 0, UINT8_MAX, UINT8_MAX, STATUS_SUCCESS); + TEST_ADD(UInt8, UINT8, uint, UINT8_MAX, 0, UINT8_MAX, STATUS_SUCCESS); + TEST_ADD(UInt8, UINT8, uint, UINT8_MAX - 1, 1, UINT8_MAX, STATUS_SUCCESS); + TEST_ADD(UInt8, UINT8, uint, UINT8_MAX, 1, (UINT8)-1, STATUS_INTEGER_OVERFLOW); + TEST_ADD(UInt8, UINT8, uint, UINT8_MAX, UINT8_MAX, (UINT8)-1, STATUS_INTEGER_OVERFLOW); }
9 years, 5 months
1
0
0
0
[ekohl] 68571: [NTOSKRNL] NtQuerySystemInformation: - Windows Vista and later: Check the information class before probing the buffer. - Pre-Vista Windows: Check the information class after probing ...
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jul 25 11:53:16 2015 New Revision: 68571 URL:
http://svn.reactos.org/svn/reactos?rev=68571&view=rev
Log: [NTOSKRNL] NtQuerySystemInformation: - Windows Vista and later: Check the information class before probing the buffer. - Pre-Vista Windows: Check the information class after probing the buffer. - Pre-Vista Windows: Fixed the aligment check for invalid information classes. - Pre-Vista Windows: The SystemFlagsInformation and SystemKernelDebuggerInformation classes return no required length in case of an error. This fixes all ntdll_apitest:NtSystemInformation fails. Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Sat Jul 25 11:53:16 2015 @@ -1065,12 +1065,20 @@ /* Class 9 - Flags Information */ QSI_DEF(SystemFlagsInformation) { +#if (NTDDI_VERSION >= NTDDI_VISTA) + *ReqSize = sizeof(SYSTEM_FLAGS_INFORMATION); +#endif + if (sizeof(SYSTEM_FLAGS_INFORMATION) != Size) { - *ReqSize = sizeof(SYSTEM_FLAGS_INFORMATION); - return (STATUS_INFO_LENGTH_MISMATCH); - } + return STATUS_INFO_LENGTH_MISMATCH; + } + ((PSYSTEM_FLAGS_INFORMATION) Buffer)->Flags = NtGlobalFlag; +#if (NTDDI_VERSION < NTDDI_VISTA) + *ReqSize = sizeof(SYSTEM_FLAGS_INFORMATION); +#endif + return STATUS_SUCCESS; } @@ -1631,7 +1639,10 @@ { PSYSTEM_KERNEL_DEBUGGER_INFORMATION skdi = (PSYSTEM_KERNEL_DEBUGGER_INFORMATION) Buffer; +#if (NTDDI_VERSION >= NTDDI_VISTA) *ReqSize = sizeof(SYSTEM_KERNEL_DEBUGGER_INFORMATION); +#endif + if (Size < sizeof(SYSTEM_KERNEL_DEBUGGER_INFORMATION)) { return STATUS_INFO_LENGTH_MISMATCH; @@ -1639,6 +1650,10 @@ skdi->KernelDebuggerEnabled = KD_DEBUGGER_ENABLED; skdi->KernelDebuggerNotPresent = KD_DEBUGGER_NOT_PRESENT; + +#if (NTDDI_VERSION < NTDDI_VISTA) + *ReqSize = sizeof(SYSTEM_KERNEL_DEBUGGER_INFORMATION); +#endif return STATUS_SUCCESS; } @@ -2308,7 +2323,6 @@ { NTSTATUS (* Query) (PVOID,ULONG,PULONG); NTSTATUS (* Set) (PVOID,ULONG); - ULONG Alignment; } QSSI_CALLS; // QS Query & Set @@ -2316,12 +2330,9 @@ // XS Set // XX unknown behaviour // -#define SI_QS(n) {QSI_USE(n),SSI_USE(n),TYPE_ALIGNMENT(ULONG)} -#define SI_QX(n) {QSI_USE(n),NULL,TYPE_ALIGNMENT(ULONG)} -#define SI_XS(n) {NULL,SSI_USE(n),TYPE_ALIGNMENT(ULONG)} -#define SI_QS_ALIGN(n,a) {QSI_USE(n),SSI_USE(n),a} -#define SI_QX_ALIGN(n,a) {QSI_USE(n),NULL,a} -#define SI_XS_ALIGN(n,a) {NULL,SSI_USE(n),a} +#define SI_QS(n) {QSI_USE(n),SSI_USE(n)} +#define SI_QX(n) {QSI_USE(n),NULL} +#define SI_XS(n) {NULL,SSI_USE(n)} #define SI_XX(n) {NULL,NULL} static @@ -2363,7 +2374,7 @@ SI_QX(SystemCrashDumpInformation), SI_QX(SystemExceptionInformation), SI_QX(SystemCrashDumpStateInformation), - SI_QX_ALIGN(SystemKernelDebuggerInformation, TYPE_ALIGNMENT(BOOLEAN)), + SI_QX(SystemKernelDebuggerInformation), SI_QX(SystemContextSwitchInformation), SI_QS(SystemRegistryQuotaInformation), SI_XS(SystemExtendServiceTableInformation), @@ -2406,6 +2417,7 @@ { KPROCESSOR_MODE PreviousMode; ULONG ResultLength = 0; + ULONG Alignment = TYPE_ALIGNMENT(ULONG); NTSTATUS FStatus = STATUS_NOT_IMPLEMENTED; PAGED_CODE(); @@ -2414,6 +2426,7 @@ _SEH2_TRY { +#if (NTDDI_VERSION >= NTDDI_VISTA) /* * Check if the request is valid. */ @@ -2421,17 +2434,31 @@ { _SEH2_YIELD(return STATUS_INVALID_INFO_CLASS); } +#endif if (PreviousMode != KernelMode) { /* SystemKernelDebuggerInformation needs only BOOLEAN alignment */ - ProbeForWrite(SystemInformation, Length, CallQS[SystemInformationClass].Alignment); + if (SystemInformationClass == SystemKernelDebuggerInformation) + Alignment = TYPE_ALIGNMENT(BOOLEAN); + + ProbeForWrite(SystemInformation, Length, Alignment); if (UnsafeResultLength != NULL) ProbeForWriteUlong(UnsafeResultLength); } if (UnsafeResultLength) *UnsafeResultLength = 0; + +#if (NTDDI_VERSION < NTDDI_VISTA) + /* + * Check if the request is valid. + */ + if (SystemInformationClass >= MAX_SYSTEM_INFO_CLASS) + { + _SEH2_YIELD(return STATUS_INVALID_INFO_CLASS); + } +#endif if (NULL != CallQS [SystemInformationClass].Query) {
9 years, 5 months
1
0
0
0
[ekohl] 68570: [NTOSKRNL] Revert r68346. CORE-9933 #resolve
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jul 25 10:21:18 2015 New Revision: 68570 URL:
http://svn.reactos.org/svn/reactos?rev=68570&view=rev
Log: [NTOSKRNL] Revert r68346. CORE-9933 #resolve Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Sat Jul 25 10:21:18 2015 @@ -2443,7 +2443,7 @@ &ResultLength); /* Save the result length to the caller */ - if (NT_SUCCESS(FStatus) && UnsafeResultLength) + if (UnsafeResultLength) *UnsafeResultLength = ResultLength; } }
9 years, 5 months
1
0
0
0
[ekohl] 68569: [DIKPART] Implement the RESCAN command.
by ekohl@svn.reactos.org
Author: ekohl Date: Fri Jul 24 20:02:56 2015 New Revision: 68569 URL:
http://svn.reactos.org/svn/reactos?rev=68569&view=rev
Log: [DIKPART] Implement the RESCAN command. Modified: trunk/reactos/base/system/diskpart/lang/en-US.rc trunk/reactos/base/system/diskpart/lang/ro-RO.rc trunk/reactos/base/system/diskpart/lang/ru-RU.rc trunk/reactos/base/system/diskpart/lang/sq-AL.rc trunk/reactos/base/system/diskpart/lang/tr-TR.rc trunk/reactos/base/system/diskpart/partlist.c trunk/reactos/base/system/diskpart/rescan.c trunk/reactos/base/system/diskpart/resource.h Modified: trunk/reactos/base/system/diskpart/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
============================================================================== --- trunk/reactos/base/system/diskpart/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/en-US.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -43,8 +43,15 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD " Volume ### Ltr Label\n" +END + +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" END /* Select command strings */ Modified: trunk/reactos/base/system/diskpart/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
============================================================================== --- trunk/reactos/base/system/diskpart/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/ro-RO.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -44,11 +44,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Volum ###\tLtr\tEtichetÄ\n" END -/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n" Modified: trunk/reactos/base/system/diskpart/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
============================================================================== --- trunk/reactos/base/system/diskpart/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/ru-RU.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -45,11 +45,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Том ###\tÐмÑ\tÐеÑка\n" END -/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n" Modified: trunk/reactos/base/system/diskpart/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
============================================================================== --- trunk/reactos/base/system/diskpart/lang/sq-AL.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/sq-AL.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -47,11 +47,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE "%c ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT " Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Volume ###\tLtr\tLabel\n" END -/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n" Modified: trunk/reactos/base/system/diskpart/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
============================================================================== --- trunk/reactos/base/system/diskpart/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/tr-TR.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -45,11 +45,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Birim ###\tHarf\tEtiket\n" END -/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n" Modified: trunk/reactos/base/system/diskpart/partlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/partl…
============================================================================== --- trunk/reactos/base/system/diskpart/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/partlist.c [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -1137,6 +1137,9 @@ PPARTENTRY PartEntry; PLIST_ENTRY Entry; + CurrentDisk = NULL; + CurrentPartition = NULL; + /* Release disk and partition info */ while (!IsListEmpty(&DiskListHead)) { Modified: trunk/reactos/base/system/diskpart/rescan.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/resca…
============================================================================== --- trunk/reactos/base/system/diskpart/rescan.c [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/rescan.c [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -2,8 +2,7 @@ * PROJECT: ReactOS DiskPart * LICENSE: GPL - See COPYING in the top level directory * FILE: base/system/diskpart/rescan.c - * PURPOSE: Manages all the partitions of the OS in - * an interactive way + * PURPOSE: Manages all the partitions of the OS in an interactive way * PROGRAMMERS: Lee Schroeder */ @@ -11,5 +10,10 @@ BOOL rescan_main(INT argc, LPWSTR *argv) { + PrintResourceString(IDS_RESCAN_START); + DestroyPartitionList(); + CreatePartitionList(); + PrintResourceString(IDS_RESCAN_END); + return TRUE; } Modified: trunk/reactos/base/system/diskpart/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/resou…
============================================================================== --- trunk/reactos/base/system/diskpart/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/resource.h [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -40,6 +40,9 @@ #define IDS_LIST_PARTITION_FORMAT 3305 #define IDS_LIST_PARTITION_NO_DISK 3306 #define IDS_LIST_VOLUME_HEAD 3307 + +#define IDS_RESCAN_START 4100 +#define IDS_RESCAN_END 4101 #define IDS_SELECT_NO_DISK 4400 #define IDS_SELECT_DISK 4401
9 years, 5 months
1
0
0
0
[jimtabor] 68568: [User32] - Fix check menu item and preserve the calling ID. See CORE-9884.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Jul 24 10:16:53 2015 New Revision: 68568 URL:
http://svn.reactos.org/svn/reactos?rev=68568&view=rev
Log: [User32] - Fix check menu item and preserve the calling ID. See CORE-9884. Modified: trunk/reactos/win32ss/user/user32/windows/menu.c Modified: trunk/reactos/win32ss/user/user32/windows/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] Fri Jul 24 10:16:53 2015 @@ -4600,11 +4600,12 @@ { PITEM item; DWORD Ret; + UINT uID = uIDCheckItem; if (!ValidateHandle(hmenu, TYPE_MENU)) return -1; - if (!(item = MENU_FindItem( &hmenu, &uIDCheckItem, uCheck ))) return -1; + if (!(item = MENU_FindItem( &hmenu, &uID, uCheck ))) return -1; Ret = item->fState & MFS_CHECKED; if ( Ret == (uCheck & MFS_CHECKED)) return Ret; // Already Checked...
9 years, 5 months
1
0
0
0
[cfinck] 68567: [WINSPOOL_PRINT] Make winspool_print print a file to the "Dummy Printer On LPT1". We're now able to print RAW data through the native Win32 Spooler APIs. https://youtu.be/cNzePucTOLY
by cfinck@svn.reactos.org
Author: cfinck Date: Thu Jul 23 17:48:17 2015 New Revision: 68567 URL:
http://svn.reactos.org/svn/reactos?rev=68567&view=rev
Log: [WINSPOOL_PRINT] Make winspool_print print a file to the "Dummy Printer On LPT1". We're now able to print RAW data through the native Win32 Spooler APIs.
https://youtu.be/cNzePucTOLY
Modified: branches/colins-printing-for-freedom/reactos/temp/winspool_print/CMakeLists.txt branches/colins-printing-for-freedom/reactos/temp/winspool_print/main.c Modified: branches/colins-printing-for-freedom/reactos/temp/winspool_print/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
============================================================================== --- branches/colins-printing-for-freedom/reactos/temp/winspool_print/CMakeLists.txt [iso-8859-1] (original) +++ branches/colins-printing-for-freedom/reactos/temp/winspool_print/CMakeLists.txt [iso-8859-1] Thu Jul 23 17:48:17 2015 @@ -1,4 +1,4 @@ add_executable(winspool_print main.c) set_module_type(winspool_print win32cui) -add_importlibs(winspool_print kernel32 msvcrt winspool) +add_importlibs(winspool_print winspool msvcrt kernel32) add_cd_file(TARGET winspool_print DESTINATION reactos/system32 FOR all) Modified: branches/colins-printing-for-freedom/reactos/temp/winspool_print/main.c URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
============================================================================== --- branches/colins-printing-for-freedom/reactos/temp/winspool_print/main.c [iso-8859-1] (original) +++ branches/colins-printing-for-freedom/reactos/temp/winspool_print/main.c [iso-8859-1] Thu Jul 23 17:48:17 2015 @@ -4,14 +4,29 @@ int main() { int ReturnValue = 1; + DWORD dwRead; DWORD dwWritten; + HANDLE hFile = INVALID_HANDLE_VALUE; HANDLE hPrinter = NULL; DOC_INFO_1W docInfo; - char szString[] = "winspool_print Test\f"; + BYTE Buffer[20000]; - if (!OpenPrinterW(L"Generic / Text Only", &hPrinter, NULL)) + hFile = CreateFileW(L"testfile", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); + if (hFile == INVALID_HANDLE_VALUE) { - printf("OpenPrinterW failed\n"); + printf("CreateFileW failed, last error is %lu!\n", GetLastError()); + goto Cleanup; + } + + if (!ReadFile(hFile, Buffer, sizeof(Buffer), &dwRead, NULL)) + { + printf("ReadFile failed, last error is %lu!\n", GetLastError()); + goto Cleanup; + } + + if (!OpenPrinterW(L"Dummy Printer On LPT1", &hPrinter, NULL)) + { + printf("OpenPrinterW failed, last error is %lu!\n", GetLastError()); goto Cleanup; } @@ -20,37 +35,40 @@ if (!StartDocPrinterW(hPrinter, 1, (LPBYTE)&docInfo)) { - printf("StartDocPrinterW failed, last error is %u!\n", GetLastError()); + printf("StartDocPrinterW failed, last error is %lu!\n", GetLastError()); goto Cleanup; } if (!StartPagePrinter(hPrinter)) { - printf("StartPagePrinter failed, last error is %u!\n", GetLastError()); + printf("StartPagePrinter failed, last error is %lu!\n", GetLastError()); goto Cleanup; } - if (!WritePrinter(hPrinter, szString, strlen(szString), &dwWritten)) + if (!WritePrinter(hPrinter, Buffer, dwRead, &dwWritten)) { - printf("WritePrinter failed, last error is %u!\n", GetLastError()); + printf("WritePrinter failed, last error is %lu!\n", GetLastError()); goto Cleanup; } if (!EndPagePrinter(hPrinter)) { - printf("EndPagePrinter failed, last error is %u!\n", GetLastError()); + printf("EndPagePrinter failed, last error is %lu!\n", GetLastError()); goto Cleanup; } if (!EndDocPrinter(hPrinter)) { - printf("EndDocPrinter failed, last error is %u!\n", GetLastError()); + printf("EndDocPrinter failed, last error is %lu!\n", GetLastError()); goto Cleanup; } ReturnValue = 0; Cleanup: + if (hFile != INVALID_HANDLE_VALUE) + CloseHandle(hFile); + if (hPrinter) ClosePrinter(hPrinter);
9 years, 5 months
1
0
0
0
[bfreisen] 68566: [MSPAINT_NEW] move hDrawingDC and mirror/rotate stuff to ImageModel
by bfreisen@svn.reactos.org
Author: bfreisen Date: Thu Jul 23 13:52:02 2015 New Revision: 68566 URL:
http://svn.reactos.org/svn/reactos?rev=68566&view=rev
Log: [MSPAINT_NEW] move hDrawingDC and mirror/rotate stuff to ImageModel Modified: trunk/reactos/base/applications/mspaint_new/globalvar.h trunk/reactos/base/applications/mspaint_new/history.cpp trunk/reactos/base/applications/mspaint_new/history.h trunk/reactos/base/applications/mspaint_new/imgarea.cpp trunk/reactos/base/applications/mspaint_new/main.cpp trunk/reactos/base/applications/mspaint_new/miniature.cpp trunk/reactos/base/applications/mspaint_new/selection.cpp trunk/reactos/base/applications/mspaint_new/winproc.cpp Modified: trunk/reactos/base/applications/mspaint_new/globalvar.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/globalvar.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/globalvar.h [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -14,8 +14,6 @@ } STRETCHSKEW; /* VARIABLES declared in main.c *************************************/ - -extern HDC hDrawingDC; extern int widthSetInDlg; extern int heightSetInDlg; Modified: trunk/reactos/base/applications/mspaint_new/history.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/history.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/history.cpp [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -210,3 +210,35 @@ Rectangle(hDrawingDC, 0 - 1, 0 - 1, GetWidth() + 1, GetHeight() + 1); NotifyImageChanged(); } + +HDC ImageModel::GetDC() +{ + return hDrawingDC; +} + +void ImageModel::FlipHorizontally() +{ + CopyPrevious(); + StretchBlt(hDrawingDC, GetWidth() - 1, 0, -GetWidth(), GetHeight(), GetDC(), 0, 0, + GetWidth(), GetHeight(), SRCCOPY); + NotifyImageChanged(); +} + +void ImageModel::FlipVertically() +{ + CopyPrevious(); + StretchBlt(hDrawingDC, 0, GetHeight() - 1, GetWidth(), -GetHeight(), GetDC(), 0, 0, + GetWidth(), GetHeight(), SRCCOPY); + NotifyImageChanged(); +} + +void ImageModel::RotateNTimes90Degrees(int iN) +{ + if (iN == 2) + { + CopyPrevious(); + StretchBlt(hDrawingDC, GetWidth() - 1, GetHeight() - 1, -GetWidth(), -GetHeight(), GetDC(), + 0, 0, GetWidth(), GetHeight(), SRCCOPY); + } + NotifyImageChanged(); +} Modified: trunk/reactos/base/applications/mspaint_new/history.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/history.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/history.h [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -11,6 +11,7 @@ private: void NotifyDimensionsChanged(); void NotifyImageChanged(); + HDC hDrawingDC; public: HBITMAP hBms[HISTORYSIZE]; private: @@ -37,4 +38,8 @@ int GetHeight(); void InvertColors(); void Clear(COLORREF color = 0x00ffffff); + HDC GetDC(); + void FlipHorizontally(); + void FlipVertically(); + void RotateNTimes90Degrees(int iN); }; Modified: trunk/reactos/base/applications/mspaint_new/imgarea.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/imgarea.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/imgarea.cpp [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -99,7 +99,7 @@ HDC hdc = GetDC(); int imgXRes = imageModel.GetWidth(); int imgYRes = imageModel.GetHeight(); - StretchBlt(hdc, 0, 0, imgXRes * toolsModel.GetZoom() / 1000, imgYRes * toolsModel.GetZoom() / 1000, hDrawingDC, 0, 0, imgXRes, + StretchBlt(hdc, 0, 0, imgXRes * toolsModel.GetZoom() / 1000, imgYRes * toolsModel.GetZoom() / 1000, imageModel.GetDC(), 0, 0, imgXRes, imgYRes, SRCCOPY); if (showGrid && (toolsModel.GetZoom() >= 4000)) { @@ -154,7 +154,7 @@ { SetCapture(); drawing = TRUE; - startPaintingL(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), + startPaintingL(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); } else @@ -174,7 +174,7 @@ { SetCapture(); drawing = TRUE; - startPaintingR(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), + startPaintingR(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); } else @@ -194,13 +194,13 @@ { ReleaseCapture(); drawing = FALSE; - endPaintingL(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), paletteModel.GetFgColor(), + endPaintingL(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); Invalidate(FALSE); if (toolsModel.GetActiveTool() == TOOL_COLOR) { COLORREF tempColor = - GetPixel(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom()); + GetPixel(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom()); if (tempColor != CLR_INVALID) paletteModel.SetFgColor(tempColor); } @@ -215,13 +215,13 @@ { ReleaseCapture(); drawing = FALSE; - endPaintingR(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), paletteModel.GetFgColor(), + endPaintingR(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); Invalidate(FALSE); if (toolsModel.GetActiveTool() == TOOL_COLOR) { COLORREF tempColor = - GetPixel(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom()); + GetPixel(imageModel.GetDC(), GET_X_LPARAM(lParam) * 1000 / toolsModel.GetZoom(), GET_Y_LPARAM(lParam) * 1000 / toolsModel.GetZoom()); if (tempColor != CLR_INVALID) paletteModel.SetBgColor(tempColor); } @@ -300,7 +300,7 @@ } if ((wParam & MK_LBUTTON) != 0) { - whilePaintingL(hDrawingDC, xNow, yNow, paletteModel.GetFgColor(), paletteModel.GetBgColor()); + whilePaintingL(imageModel.GetDC(), xNow, yNow, paletteModel.GetFgColor(), paletteModel.GetBgColor()); Invalidate(FALSE); if ((toolsModel.GetActiveTool() >= TOOL_TEXT) || (toolsModel.GetActiveTool() == TOOL_RECTSEL) || (toolsModel.GetActiveTool() == TOOL_FREESEL)) { @@ -313,7 +313,7 @@ } if ((wParam & MK_RBUTTON) != 0) { - whilePaintingR(hDrawingDC, xNow, yNow, paletteModel.GetFgColor(), paletteModel.GetBgColor()); + whilePaintingR(imageModel.GetDC(), xNow, yNow, paletteModel.GetFgColor(), paletteModel.GetBgColor()); Invalidate(FALSE); if (toolsModel.GetActiveTool() >= TOOL_TEXT) { Modified: trunk/reactos/base/applications/mspaint_new/main.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/main.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/main.cpp [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -11,8 +11,6 @@ #include "precomp.h" /* FUNCTIONS ********************************************************/ - -HDC hDrawingDC; int widthSetInDlg; int heightSetInDlg; Modified: trunk/reactos/base/applications/mspaint_new/miniature.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/miniature.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/miniature.cpp [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -27,7 +27,7 @@ HDC hdc; miniature.GetClientRect(&mclient); hdc = miniature.GetDC(); - StretchBlt(hdc, 0, 0, mclient.right, mclient.bottom, hDrawingDC, 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY); + StretchBlt(hdc, 0, 0, mclient.right, mclient.bottom, imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY); miniature.ReleaseDC(hdc); return 0; } Modified: trunk/reactos/base/applications/mspaint_new/selection.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/selection.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/selection.cpp [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -178,14 +178,14 @@ if (toolsModel.GetActiveTool() == TOOL_TEXT) { - selectionModel.DrawTextToolText(hDrawingDC, paletteModel.GetFgColor(), paletteModel.GetBgColor(), toolsModel.IsBackgroundTransparent()); + selectionModel.DrawTextToolText(imageModel.GetDC(), paletteModel.GetFgColor(), paletteModel.GetBgColor(), toolsModel.IsBackgroundTransparent()); } else { if (m_iAction != ACTION_MOVE) - selectionModel.DrawSelectionStretched(hDrawingDC); + selectionModel.DrawSelectionStretched(imageModel.GetDC()); else - selectionModel.DrawSelection(hDrawingDC, paletteModel.GetBgColor(), toolsModel.IsBackgroundTransparent()); + selectionModel.DrawSelection(imageModel.GetDC(), paletteModel.GetBgColor(), toolsModel.IsBackgroundTransparent()); } imageArea.InvalidateRect(NULL, FALSE); imageArea.SendMessage(WM_PAINT, 0, 0); Modified: trunk/reactos/base/applications/mspaint_new/winproc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/winproc.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/winproc.cpp [iso-8859-1] Thu Jul 23 13:52:02 2015 @@ -306,9 +306,9 @@ /* Deselect */ if ((toolsModel.GetActiveTool() == TOOL_RECTSEL) || (toolsModel.GetActiveTool() == TOOL_FREESEL)) { - startPaintingL(hDrawingDC, 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); - whilePaintingL(hDrawingDC, 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); - endPaintingL(hDrawingDC, 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); + startPaintingL(imageModel.GetDC(), 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); + whilePaintingL(imageModel.GetDC(), 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); + endPaintingL(imageModel.GetDC(), 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); selectionWindow.ShowWindow(SW_HIDE); } } @@ -443,14 +443,14 @@ SendMessage(hToolbar, TB_CHECKBUTTON, ID_RECTSEL, MAKELPARAM(TRUE, 0)); toolBoxContainer.SendMessage(WM_COMMAND, ID_RECTSEL); //TODO: do this properly - startPaintingL(hDrawingDC, 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); - whilePaintingL(hDrawingDC, imageModel.GetWidth(), imageModel.GetHeight(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); - endPaintingL(hDrawingDC, imageModel.GetWidth(), imageModel.GetHeight(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); + startPaintingL(imageModel.GetDC(), 0, 0, paletteModel.GetFgColor(), paletteModel.GetBgColor()); + whilePaintingL(imageModel.GetDC(), imageModel.GetWidth(), imageModel.GetHeight(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); + endPaintingL(imageModel.GetDC(), imageModel.GetWidth(), imageModel.GetHeight(), paletteModel.GetFgColor(), paletteModel.GetBgColor()); break; } case IDM_EDITCOPYTO: if (GetSaveFileName(&ofn) != 0) - SaveDIBToFile(selectionModel.GetBitmap(), ofn.lpstrFile, hDrawingDC, NULL, NULL, fileHPPM, fileVPPM); + SaveDIBToFile(selectionModel.GetBitmap(), ofn.lpstrFile, imageModel.GetDC(), NULL, NULL, fileHPPM, fileVPPM); break; case IDM_EDITPASTEFROM: if (GetOpenFileName(&ofn) != 0) @@ -481,7 +481,7 @@ } case IDM_IMAGEDELETEIMAGE: imageModel.CopyPrevious(); - Rect(hDrawingDC, 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), paletteModel.GetBgColor(), paletteModel.GetBgColor(), 0, TRUE); + Rect(imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), paletteModel.GetBgColor(), paletteModel.GetBgColor(), 0, TRUE); imageArea.Invalidate(FALSE); break; case IDM_IMAGEROTATEMIRROR: @@ -491,23 +491,13 @@ if (selectionWindow.IsWindowVisible()) selectionModel.FlipHorizontally(); else - { - imageModel.CopyPrevious(); - StretchBlt(hDrawingDC, imageModel.GetWidth() - 1, 0, -imageModel.GetWidth(), imageModel.GetHeight(), hDrawingDC, 0, 0, - imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY); - imageArea.Invalidate(FALSE); - } + imageModel.FlipHorizontally(); break; case 2: /* flip vertically */ if (selectionWindow.IsWindowVisible()) selectionModel.FlipVertically(); else - { - imageModel.CopyPrevious(); - StretchBlt(hDrawingDC, 0, imageModel.GetHeight() - 1, imageModel.GetWidth(), -imageModel.GetHeight(), hDrawingDC, 0, 0, - imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY); - imageArea.Invalidate(FALSE); - } + imageModel.FlipVertically(); break; case 3: /* rotate 90 degrees */ break; @@ -515,12 +505,7 @@ if (selectionWindow.IsWindowVisible()) selectionModel.RotateNTimes90Degrees(2); else - { - imageModel.CopyPrevious(); - StretchBlt(hDrawingDC, imageModel.GetWidth() - 1, imageModel.GetHeight() - 1, -imageModel.GetWidth(), -imageModel.GetHeight(), hDrawingDC, - 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY); - imageArea.Invalidate(FALSE); - } + imageModel.RotateNTimes90Degrees(2); break; case 5: /* rotate 270 degrees */ break;
9 years, 5 months
1
0
0
0
[bfreisen] 68565: [MSPAINT_NEW] - move bitmap and DC initialization to ImageModel - remove unused global variables - remove copy-pasta bug from SelectionModel::DrawSelection
by bfreisen@svn.reactos.org
Author: bfreisen Date: Thu Jul 23 13:11:54 2015 New Revision: 68565 URL:
http://svn.reactos.org/svn/reactos?rev=68565&view=rev
Log: [MSPAINT_NEW] - move bitmap and DC initialization to ImageModel - remove unused global variables - remove copy-pasta bug from SelectionModel::DrawSelection Modified: trunk/reactos/base/applications/mspaint_new/globalvar.h trunk/reactos/base/applications/mspaint_new/history.cpp trunk/reactos/base/applications/mspaint_new/history.h trunk/reactos/base/applications/mspaint_new/main.cpp trunk/reactos/base/applications/mspaint_new/selectionmodel.cpp trunk/reactos/base/applications/mspaint_new/selectionmodel.h trunk/reactos/base/applications/mspaint_new/textedit.cpp Modified: trunk/reactos/base/applications/mspaint_new/globalvar.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/globalvar.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/globalvar.h [iso-8859-1] Thu Jul 23 13:11:54 2015 @@ -5,11 +5,6 @@ * PURPOSE: Declaring global variables for later initialization * PROGRAMMERS: Benedikt Freisen */ - -/* INCLUDES *********************************************************/ - -//#include <windows.h> -//#include "definitions.h" /* TYPES ************************************************************/ @@ -21,8 +16,6 @@ /* VARIABLES declared in main.c *************************************/ extern HDC hDrawingDC; -extern int *bmAddress; -extern BITMAPINFO bitmapinfo; extern int widthSetInDlg; extern int heightSetInDlg; @@ -42,7 +35,6 @@ class SelectionModel; extern SelectionModel selectionModel; -extern HWND hwndEditCtl; extern LOGFONT lfTextFont; extern HFONT hfontTextFont; extern LPTSTR textToolText; Modified: trunk/reactos/base/applications/mspaint_new/history.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/history.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/history.cpp [iso-8859-1] Thu Jul 23 13:11:54 2015 @@ -28,6 +28,18 @@ undoSteps = 0; redoSteps = 0; imageSaved = TRUE; + + // TODO: load dimensions from registry + int imgXRes = 400; + int imgYRes = 300; + + hDrawingDC = CreateCompatibleDC(NULL); + SelectObject(hDrawingDC, CreatePen(PS_SOLID, 0, paletteModel.GetFgColor())); + SelectObject(hDrawingDC, CreateSolidBrush(paletteModel.GetBgColor())); + + hBms[0] = CreateDIBWithProperties(imgXRes, imgYRes); + SelectObject(hDrawingDC, hBms[0]); + Rectangle(hDrawingDC, 0 - 1, 0 - 1, imgXRes + 1, imgYRes + 1); } void ImageModel::CopyPrevious() Modified: trunk/reactos/base/applications/mspaint_new/history.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/history.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/history.h [iso-8859-1] Thu Jul 23 13:11:54 2015 @@ -13,9 +13,11 @@ void NotifyImageChanged(); public: HBITMAP hBms[HISTORYSIZE]; +private: int currInd; int undoSteps; int redoSteps; +public: BOOL imageSaved; ImageModel(); Modified: trunk/reactos/base/applications/mspaint_new/main.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/main.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/main.cpp [iso-8859-1] Thu Jul 23 13:11:54 2015 @@ -13,18 +13,11 @@ /* FUNCTIONS ********************************************************/ HDC hDrawingDC; -int *bmAddress; -BITMAPINFO bitmapinfo; -int imgXRes = 400; -int imgYRes = 300; int widthSetInDlg; int heightSetInDlg; STRETCHSKEW stretchSkew; - -ImageModel imageModel; -BOOL askBeforeEnlarging = FALSE; // TODO: initialize from registry POINT start; POINT last; @@ -40,6 +33,9 @@ int textToolTextMaxLen = 0; PaletteModel paletteModel; + +ImageModel imageModel; +BOOL askBeforeEnlarging = FALSE; // TODO: initialize from registry HWND hStatusBar; CHOOSECOLOR choosecolor; @@ -100,7 +96,6 @@ TCHAR resstr[100]; HMENU menu; HANDLE haccel; - HDC hDC; TCHAR *c; TCHAR sfnFilename[1000]; @@ -198,20 +193,8 @@ selectionWindow.Create(scrlClientWindow.m_hWnd, selectionWindowPos, NULL, WS_CHILD | BS_OWNERDRAW); /* creating the window inside the scroll box, on which the image in hDrawingDC's bitmap is drawn */ - RECT imageAreaPos = {3, 3, 3 + imgXRes, 3 + imgYRes}; + RECT imageAreaPos = {3, 3, 3 + imageModel.GetWidth(), 3 + imageModel.GetHeight()}; imageArea.Create(scrlClientWindow.m_hWnd, imageAreaPos, NULL, WS_CHILD | WS_VISIBLE); - - hDC = imageArea.GetDC(); - hDrawingDC = CreateCompatibleDC(hDC); - selectionModel.SetDC(CreateCompatibleDC(hDC)); - imageArea.ReleaseDC(hDC); - SelectObject(hDrawingDC, CreatePen(PS_SOLID, 0, paletteModel.GetFgColor())); - SelectObject(hDrawingDC, CreateSolidBrush(paletteModel.GetBgColor())); - - //TODO: move to ImageModel - imageModel.hBms[0] = CreateDIBWithProperties(imgXRes, imgYRes); - SelectObject(hDrawingDC, imageModel.hBms[0]); - Rectangle(hDrawingDC, 0 - 1, 0 - 1, imgXRes + 1, imgYRes + 1); if (lpszArgument[0] != 0) { Modified: trunk/reactos/base/applications/mspaint_new/selectionmodel.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/selectionmodel.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/selectionmodel.cpp [iso-8859-1] Thu Jul 23 13:11:54 2015 @@ -16,11 +16,8 @@ { m_ptStack = NULL; m_iPtSP = 0; -} - -void SelectionModel::SetDC(HDC hDC) -{ - m_hDC = hDC; + + m_hDC = CreateCompatibleDC(NULL); } void SelectionModel::ResetPtStack() @@ -106,7 +103,7 @@ void SelectionModel::DrawBackgroundRect(HDC hDCImage, COLORREF crBg) { - Rect(hDCImage, m_rcSrc.left, m_rcSrc.top, m_rcSrc.right, m_rcSrc.bottom, crBg, crBg, 0, TRUE); + Rect(hDCImage, m_rcSrc.left, m_rcSrc.top, m_rcSrc.right, m_rcSrc.bottom, crBg, crBg, 0, 1); } extern BOOL @@ -114,8 +111,6 @@ void SelectionModel::DrawSelection(HDC hDCImage, COLORREF crBg, BOOL bBgTransparent) { - MaskBlt(hDCImage, m_rcSrc.left, m_rcSrc.top, RECT_WIDTH(m_rcSrc), RECT_HEIGHT(m_rcSrc), m_hDC, 0, - 0, m_hMask, 0, 0, MAKEROP4(SRCCOPY, SRCAND)); if (!bBgTransparent) MaskBlt(hDCImage, m_rcDest.left, m_rcDest.top, RECT_WIDTH(m_rcDest), RECT_HEIGHT(m_rcDest), m_hDC, 0, 0, m_hMask, 0, 0, MAKEROP4(SRCCOPY, SRCAND)); Modified: trunk/reactos/base/applications/mspaint_new/selectionmodel.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/selectionmodel.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/selectionmodel.h [iso-8859-1] Thu Jul 23 13:11:54 2015 @@ -37,7 +37,6 @@ public: SelectionModel(); - void SetDC(HDC hDC); void ResetPtStack(); void PushToPtStack(LONG x, LONG y); void CalculateBoundingBoxAndContents(HDC hDCImage); Modified: trunk/reactos/base/applications/mspaint_new/textedit.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/textedit.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/textedit.cpp [iso-8859-1] Thu Jul 23 13:11:54 2015 @@ -15,9 +15,9 @@ { /* creating the edit control within the editor window */ RECT editControlPos = {0, 0, 0 + 100, 0 + 100}; - hwndEditCtl = editControl.Create(_T("EDIT"), m_hWnd, editControlPos, NULL, - WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, - WS_EX_CLIENTEDGE); + editControl.Create(_T("EDIT"), m_hWnd, editControlPos, NULL, + WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, + WS_EX_CLIENTEDGE); return 0; }
9 years, 5 months
1
0
0
0
← Newer
1
2
3
4
5
...
26
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Results per page:
10
25
50
100
200