Commit graph

84454 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 0bfa0cd0d2
[NTGDI] Fix PatBlt with negative values (#6038)
When I am implementing the IME soft keyboard (#6021 and #6036),
I noticed an issue with PatBlt function.

- Fix the rectangle coordinates when the value was
  negative in NtGdiPatBlt function.
- Fix NC_DrawFrame function.
- Fix UserDrawWindowFrame function.

CORE-19334
2023-11-26 11:46:42 +09:00
Katayama Hirofumi MZ 90e17817fe [IMM32] Implement CtfImmTIMCreateInputContext
CORE-19268
2023-11-26 09:20:07 +09:00
Katayama Hirofumi MZ 9d0b6f3185 [IMM32][SDK] Implement CtfImmSetCiceroStartInThread
- Add CtfImmSetCiceroStartInThread function.
- Add its prototype to <imm32_undoc.h>
- Modify imm32.spec.

CORE-19268
2023-11-26 08:58:59 +09:00
Katayama Hirofumi MZ d74d4e0395
[NETCFGX] Fix TCP/IP alternate radiobutton behaviour (#6039)
Based on KRosUser's netaltconf_fix.patch.
CORE-19336
2023-11-25 22:47:46 +09:00
Katayama Hirofumi MZ 3b2fdc56bd
[IMM32][SDK][NTUSER][IMM32_WINETEST] Add CtfImmGenerateMessage (#6037)
Implementing advanced text service...

- Add CtfImmGenerateMessage function.
- Modify imm32.spec.
- Move TRANSMSG, TRANSMSGLIST etc. in
  win32ss/include/ntuser.h to <immdev.h>.
- Move win32ss/include/imetable.h to
  sdk/include/reactos/imetable.h.
- Move dll/win32/imm32/CtfImeTable.h to
  sdk/include/reactos/CtfImeTable.h.
- Fix build failure of imm32_winetest due
  to TRANSMSG redefinition.

CORE-19268
2023-11-25 22:46:00 +09:00
Katayama Hirofumi MZ 6783061894
[IMM32] Implement Soft Keyboard Type C1 (#6036)
Follow-up to #6021. This PR will finish ImmCreateSoftKeyboard implementation.

- Add c1key.h to define C1 internal codes.
- The tests are done, using FreeCJ2004 on Chinese/Taiwanese system.

FreeCJ2004: https://web.archive.org/web/20061208204431/http://input.foruto.com/download/Forum/freecj2004.exe

CORE-19268
2023-11-25 18:56:33 +09:00
Katayama Hirofumi MZ 3799d37a48 [MSPAINT] mouse.cpp: Renaming some items for human readability
CORE-19094
2023-11-25 14:14:14 +09:00
Katayama Hirofumi MZ fd38a6f788 [MSPAINT] mouse.cpp: Erase type warnings of SIZE_T vs. INT
CORE-19094
2023-11-25 14:09:20 +09:00
Katayama Hirofumi MZ b8598e095d
[MSPAINT] Improve Undo/Redo handling of selection (#6035)
Consistent behavior of the application.
- Add ShiftPtStack and BuildMaskFromPtStack
  helper functions.
- Move some codes of selectionModel to
  mouse.cpp.
CORE-19226
2023-11-25 13:44:31 +09:00
Thamatip Chitpong ab0119c61f
[SETUPAPI] cfgmgr.c: Minor debug strings fix 2023-11-25 07:50:23 +07:00
Katayama Hirofumi MZ bd06299059
[IMM32][SDK] Implement IME Soft Keyboard Type T1 (#6021)
- Rename version.rc as imm32.rc.
- Add resource.h and t1keys.h.
- Add some resource bitmaps.
- Modify <immdev.h>.

Test:
Press Ctrl+Alt+comma on FreeCJ2004.

NOTE: There's a visual bug in PatBlt with negative values.
CORE-19268
2023-11-24 23:02:19 +09:00
Katayama Hirofumi MZ f710e5a260
[MSPAINT] Define SelectionBaseTool and use it (#6034)
Refactoring and arrangement for selection handling.
- Move some selection-related codes in canvas.cpp to mouse.cpp.
- Add SelectionBaseTool structure for FreeSelTool and RectSelTool.
CORE-19094
2023-11-24 15:44:16 +09:00
Katayama Hirofumi MZ 898fb5f414 [MSPAINT] Move CHECKED_IF and ENABLED_IF macros and improve
Refactoring. CORE-19094
2023-11-24 10:39:16 +09:00
Katayama Hirofumi MZ e52379a61c [MSPAINT] Delete redundant comments
Refactoring. CORE-19094
2023-11-24 10:34:39 +09:00
Katayama Hirofumi MZ 2d5bb5ffbf [MSPAINT] Delete common.h and move code to precomp.h
Refactoring. CORE-19094
2023-11-24 10:25:47 +09:00
Katayama Hirofumi MZ 470d86f1e5 [MSPAINT] Delete globalvar.h and move code to precomp.h
Refactoring. CORE-19094
2023-11-24 10:12:37 +09:00
Thamatip Chitpong 40bc5bf489
[SETUPAPI] CM_Request_Device_Eject_ExW: Allow ulNameLength to be zero when pszVetoName is not NULL (#6031)
Addendum to 7f346b1aa (#5943)
2023-11-24 07:47:01 +07:00
Hermès Bélusca-Maïto c77a5ff99b
Revert my last commits that break build.
Revert "[PSDK][AFD][VGADDI] Further build and MS PSDK compatibility fixes."
This reverts commit 99efc2ae50.

Revert "[PSDK] Sync winresrc.h with wine-8.20"
This reverts commit 3e83562aa7.

Revert "[OSK][PROGMAN] Fix resource file build."
This reverts commit 84e4ad0a82.

Revert "[PSDK] Use the new .rh files in winresrc.h"
This reverts commit f6fb7c48c9.
2023-11-23 17:20:47 +01:00
Hermès Bélusca-Maïto 99efc2ae50
[PSDK][AFD][VGADDI] Further build and MS PSDK compatibility fixes.
- windows.h:
  * should define _WINDOWS_ and _INC_WINDOWS instead of _WINDOWS_H
  * include winresrc.h if RC_INVOKED and not NOWINRES (Wine also agrees
    with that)
  * also, some .h included from there should _not_ be included if their
    respective NO*** flags are defined.

- batclass.h: Use correct _WINDOWS_ guard.

- winsnmp.h:
  * should define _INC_WINSNMP instead of _WINSNMP_H
  * use _INC_WINDOWS instead of _WINDOWS_H

- afd.h, vgaddi.h: Use the correct guards.

- winnt.rh: Define the (SUB)LANG_* exactly as they are in the winnt.h,
  otherwise we get macro redefinition compile errors.

NOTE: Ideally these .rh files should be auto-generated from their
corresponding .h files.

- afxres.h: Do not include the whole windows.h, but instead, only
  the winres.h file, and only if RC_INVOKED is defined.

NOTE: Both afxres.h and winres.h do not really belong to the PSDK,
but belong instead to MFC. The reason why we have them here is twofold:

1. Wine used to have also winres.h (from where we got ours). This is
   because the .rc resource files of some non-MFC modules were generated
   with Visual Studio, which always includes afxres.h for these, and the
   solution was to use a slightly less MFC-specific header: winres.h
   (Wine commit cb08c82244673f26842e7a0766de90f091b5a493).
   However, this winres.h has been since removed from Wine tree
   (Wine commit 197f4059ab2af5f13f9c56faa26e3b4af902f869).

2. Few of our modules either use afxres.h or winres.h in their resource
   files, and we still want to be able to compile them.
2023-11-23 16:26:30 +01:00
Hermès Bélusca-Maïto 3e83562aa7
[PSDK] Sync winresrc.h with wine-8.20
It is also compatible with MS PSDK file.

NOTE: I have observed that at least one .rh file (commctrl.rh) we have
from Wine, is not yet fully compatible with its MS PSDK counterpart
(for example it misses the TBSTYLE_* defines).
2023-11-23 16:25:35 +01:00
Hermès Bélusca-Maïto 84e4ad0a82
[OSK][PROGMAN] Fix resource file build. 2023-11-23 16:25:33 +01:00
Hermès Bélusca-Maïto f6fb7c48c9
[PSDK] Use the new .rh files in winresrc.h 2023-11-23 13:04:32 +01:00
Hermès Bélusca-Maïto 9384e742eb
[PSDK] Import commctrl.rh, dde.rh, winnt.rh from wine-8.20 2023-11-23 12:45:55 +01:00
Hermès Bélusca-Maïto 1a3c479b62
[PSDK] Make winuser.rh more compatible with the one from MS PSDK
Note that this file is already in sync with wine-8.20

NOWINMESSAGES, NOWINSTYLES, NOCLIPBOARD, NOMENUS, NOSYSCOMMANDS,
OEMRESOURCE and NOICONS #ifndef guards should not be present in the
.rh file, contrary to the .h file.

However, #ifndef NONCMESSAGES guard should be present.

Finally, remove the useless SC_SIZE redefinition
("At least HP-UX defines it in /usr/include/sys/signal.h" -- like,
what the hell, we are developing ReactOS...)
2023-11-23 12:44:50 +01:00
Hermès Bélusca-Maïto 0c2827a3f3
[USER32] Fix OEM resources compilation due to missing OBM_, OIC_, OCR_ defines...
... addendum to commits 072965eb0 and 6cdaad13b.

Due to the wrapping of these defines within an #ifdef OEMRESOURCE block
in winuser.h (for MS PSDK compatibility), these defines became unavailable
in user32.rc resource file. Thus, during user32 resources compilation,
the resource compiler fell back to the behaviour of considering these
resource IDs as literal string IDs (not numerical ones).

Thus, whenever code was trying to refer to these resources via their
numerical IDs, these resources could not be found now, rendering ReactOS
unusuable.
2023-11-23 11:39:57 +01:00
Katayama Hirofumi MZ bf13ebda44 [MSPAINT] Delete winproc.cpp and move code to main.cpp
Refactoring. This will reduce build time a little.
CORE-19094
2023-11-23 17:14:32 +09:00
Katayama Hirofumi MZ af4a3fac7d [MSPAINT] Rename winproc.h as main.h
Refactoring. CORE-19094
2023-11-23 17:06:32 +09:00
Katayama Hirofumi MZ c20b4ca29e [MSPAINT] Simplify mouse.cpp with deleting ctors
Refactoring. CORE-19094
2023-11-23 16:46:40 +09:00
Katayama Hirofumi MZ 96e48dcd01 [MSPAINT] ToolBase::m_tool is not used. Delete it
Refactoring. CORE-19094
2023-11-23 16:37:13 +09:00
Katayama Hirofumi MZ 1aeebfdacb [MSPAINT] Simplify RECT/CRect handling
Refactoring. CORE-19094
2023-11-23 15:19:50 +09:00
Katayama Hirofumi MZ f935132fbe [MSPAINT] Add selectionModel.moveSelection and use it
Refactoring. CORE-19094
2023-11-23 14:44:27 +09:00
Katayama Hirofumi MZ 58c26d3fe6 [MSPAINT] Simplify CanvasToImage
Refactoring. CORE-19094
2023-11-23 14:22:40 +09:00
Katayama Hirofumi MZ 4a52a4b04c [MSPAINT] Add selectionModel.drawFrameOnCanvas and use it
Refactoring. CORE-19094
2023-11-23 11:03:10 +09:00
Katayama Hirofumi MZ c2bb5aa01d [MSPAINT] Add selectionModel.hitTest and use it
Refactoring. CORE-19094
2023-11-23 10:31:24 +09:00
Katayama Hirofumi MZ df54fb01fd [VGAFONTEDIT] Fix exception on New
Based on KRosUser's vgafont.patch. CORE-19192
2023-11-23 08:34:56 +09:00
Katayama Hirofumi MZ e579220098
[MSPAINT] Introduce partial image history, Part 2 (#6005)
Follow-up to #5994. Reduce the lag and the
cost of drawing on large image.
- Introduce partial image history on
  SmoothDrawTool and ShapeTool.
- We can draw with pen smoothly even
  when the image is huge (10000x10000).
CORE-19237
2023-11-23 07:14:57 +09:00
Serge Gautherie 5b5aaf6687
[SETUPAPI] cfgmgr.c: Do not debugstr_*(pszVetoName) (#6027)
which is an _Out_ parameter. Fixes "uninitialized" data read.
2023-11-22 22:35:00 +01:00
Hermès Bélusca-Maïto 6cdaad13bd
Add missing OEMRESOURCE for using the OBM_, OIC_, OCR_ defines from winuser.h
Fix build by commit 072965eb0 for modules:
EXPLORER, COMCTL32, IERNONCE, URLMON, USER32_(API|WINE)TESTS

Note that some of these modules (from Wine) already have the OEMRESOURCE
defined; however, only in one of their files. But we have added
precompiled headers for them where we have included either windows.h
or winuser.h in them, without OEMRESOURCE. The result is, that when
compiling these modules with PCH support, the OEMRESOURCE define was
_not_ satisfied and thus, compile errors arose.

Fix this by adding #define OEMRESOURCE before the windows headers also
in the precompiled headers we have added for these modules.
2023-11-22 17:02:45 +01:00
Hermès Bélusca-Maïto 072965eb0a
[PSDK] winuser.h: Enclose the OBM/OCR/OIC defines in OEMRESOURCE guard (see also winuser.rh) 2023-11-22 15:46:19 +01:00
Hermès Bélusca-Maïto 0e88f0485c
[PSDK][WIN32SS] Fix WINNT in ddraw.h; remove NT_BUILD_ENVIRONMENT usage
Keep compatibility with MS PSDK ddraw.h file by using WINNT instead of
_WINNT_ in the preprocessor conditional test.
Incidentally this allows also removing those #define NT_BUILD_ENVIRONMENT
in the win32ss modules.

See commit 5fcfaf2e1 (r42346).
2023-11-22 15:46:06 +01:00
Hermès Bélusca-Maïto f5563ad22c
[WIN32SS:REACTX] Remove INTERNAL_CALL, deprecated since commit 24abf1b22 (r53467) 2023-11-22 15:46:05 +01:00
Hermès Bélusca-Maïto 6ddfe7e5dd
[WIN32K] Re-order some of the includes in pch.h
First the C headers, then the DDK followed by the Win32 PSDK ones,
only then the NDK headers, and finally the rest.
2023-11-22 15:46:00 +01:00
Thamatip Chitpong 7f346b1aa3
[SETUPAPI] CM_Request_Device_Eject_ExA/W: Fix pszVetoName buffer size validation (#5943)
- Return CR_INVALID_POINTER if pszVetoName is NULL and ulNameLength is not zero
- CM_Request_Device_Eject_ExA: Allow ulNameLength to be zero when pszVetoName is not NULL

Verified with Windows 2003 SP2.
2023-11-22 08:58:27 +07:00
Hermès Bélusca-Maïto 9578bae858
[PSDK] Minor cleanup and fixes in headers
- Remove nonsensical XFree86 stuff;
- Add missing #ifndef NORESOURCE around RT_* defines.
2023-11-21 22:23:55 +01:00
Hermès Bélusca-Maïto 16b4c9ff3c
[NTDLL] Fix long vs. ptr in some Ldr* exports 2023-11-21 22:23:54 +01:00
Katayama Hirofumi MZ 60c770db67 [SHELL32] Improve Japanese (ja-JP) translation
Just fix IDS_ANY_FILE. CORE-18706
2023-11-21 10:46:57 +09:00
Katayama Hirofumi MZ a95863b132
[NETCFGX] Half-implement TCP/IP alternate configuration (#6009)
Based on KRosUser's netcfx_alt.patch.
- Remove WS_GROUP flag of IDC_NODHCP control.
- Fix the extent of a groupbox.
- Half-implement TcpipAltConfDlg function.
CORE-19331
2023-11-21 06:16:39 +09:00
Whindmar Saksit 51a89791c1 [RAPPS] Validate DisplayIcon value and support icon index (#5664)
- If the DisplayIcon value points to an invalid path, ExtractIconW()
  can return 1! ExtractIconExW() does not have this problem nor the -1 issue.
  Reference: https://devblogs.microsoft.com/oldnewthing/20050526-07/?p=35533
- Use the icon index from PathParseIconLocationW().

Addendum to c6c7fc1. CORE-19317

Test to reproduce:

```
@echo off
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex1 /v DisplayName /d "Ex1 Normal" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex1 /v DisplayIcon /d "%windir%\explorer.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex1 /v UninstallString /d "calc.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex2 /v DisplayName /d "Ex2 Bad icon path" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex2 /v DisplayIcon /d "%windir%\DoesNotExist.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex2 /v UninstallString /d "calc.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex3 /v DisplayName /d "Ex3 Resource index" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex3 /v DisplayIcon /d "%windir%\explorer.exe,4" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex3 /v UninstallString /d "calc.exe" /f
start appwiz.cpl
```
2023-11-20 20:50:42 +03:00
Stanislav Motylkov 4add3fd482 [REACTOS] Revert commit 32bdd85b7f (incorrectly formatted) 2023-11-20 20:50:06 +03:00
Whindmar Saksit 32bdd85b7f
DisplayIcon needs to validate the result and support icon index (#5664)
Test:

@echo off
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex1 /v DisplayName /d "Ex1 Normal" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex1 /v DisplayIcon /d "%windir%\explorer.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex1 /v UnstallString /d "calc.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex2 /v DisplayName /d "Ex2 Bad icon path" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex2 /v DisplayIcon /d "%windir%\DoesNotExist.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex2 /v UnstallString /d "calc.exe" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex3 /v DisplayName /d "Ex3 Resource index" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex3 /v DisplayIcon /d "%windir%\explorer.exe,4" /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ex3 /v UnstallString /d "calc.exe" /f
start appwiz.cpl
2023-11-20 16:41:31 +00:00