Compare commits

...

957 Commits

Author SHA1 Message Date
Timo Kreuzer
08161566d1 [RTL/x64] Handle STATUS_UNWIND_CONSOLIDATE in RtlRestoreContext
It's not entirely correct yet and will probably fail on recursive c++ exceptions, but it fixes basic c++ exception handling.
2024-02-19 16:55:31 +02:00
Timo Kreuzer
426e402c54 [CRT] Rewrite floating point handling for streamout
Fixes some crashes and tests.
2024-02-19 16:55:30 +02:00
Timo Kreuzer
2436f57fd5 hack comdlg32/filedlg.c 2024-02-19 16:55:30 +02:00
Timo Kreuzer
68ab372241 [WS2_32_WINETEST] Prevent test from hanging on reactos 2024-02-19 16:55:29 +02:00
Timo Kreuzer
29b42d0d1f EXP [NTOS] Fix flags stuff in ObpCreateUnnamedHandle 2024-02-19 16:55:29 +02:00
Timo Kreuzer
d1517f9df3 EXP [NTOS] Try to improve the situation about KiServiceExit things
Do not convert back from CONTEXT after DbgkForwardException, because that resets the breakpoint address in the trap frame to AT the int 3, which will cause an infinite loop of break points to happen (e.g. in ntdll_winetest info)
2024-02-19 16:55:29 +02:00
Timo Kreuzer
048db88043 WIP [NTOS] Fix handling of non-volatiles in trap vs exception frame 2024-02-19 16:55:28 +02:00
Timo Kreuzer
7f2ed4d02f [NTOS] Fix x64 definition of MMPFN
Adjust the definition of COLORED_LIST_HEAD to always match the new MI_PFN_BITS define.
2024-02-19 16:55:28 +02:00
Hermès Bélusca-Maïto
b02dd8eb22 [SETUPLIB] Make the settings' Process* functions take an actual value instead of a GENERIC_LIST
The reason is to avoid enforcing the usage of a specific list
container by the users of the setup library. This is a departure
of what I originally thought would be the best, in commits
92692eae3 (r74553), 8f2c4f7a6 (r75700)

This should actually make some parts of the GUI setup code simpler
(e.g. using the win32 comboboxes to store the list contents).
2024-02-18 16:30:46 +01:00
Katayama Hirofumi MZ
fc3eeb61f3 [SDK:LIB] Introduce Cicero static library (#6492)
Refactoring and reduce binary size.
JIRA issue: CORE-19268
- Add cicero static library in sdk/lib/cicero folder.
- Delete sdk/include/reactos/cicero folder.
- Adapt the dependencies to these changes.
- Make ctfmon, msutb, and msctf modules UNICODE.
2024-02-17 09:53:50 +09:00
Oleg Dubinskiy
21e139d1d1 [UXTHEME] Add Ukrainian (uk-UA) translation (#6502)
Addendum to d11582f0e. CORE-5991
2024-02-16 22:50:13 +03:00
Stanislav Motylkov
d8adb84641 [UXTHEME] Add Russian (ru-RU) translation
Addendum to d11582f0e. CORE-5991
2024-02-16 21:10:32 +03:00
Stanislav Motylkov
d11582f0e2 [UXTHEME] Localize string resources
- Adapt SetWindowResourceText() function from
  `msconfig_new/utils.c` LoadResourceStringEx() function.
- Drop `version.rc` in favor of `uxtheme.rc` since we have forked uxtheme.

Addendum to 118869f69. CORE-5991
2024-02-16 21:10:21 +03:00
Dmitry Borisov
e6cd9de3f1 [DC21X4] Recognize all ports emulated by VPC 2007 (#6501) 2024-02-16 16:56:07 +01:00
Adam Słaboń
20efea8fa4 [USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH (#6413)
Serial number on some USB devices might exceed the number of 100 characters
(e.g. 120 characters on "SanDisk Ultra 3.2Gen1" pendrive) and cause buffer
overflow, resulting in usbstor.sys crash.

- Use pool allocation for instance ID generation.
  Fixes stack overflow on USB storage devices with large serial number.
- Print the LUN number as a hexadecimal, not as a character.
- Verify the serial number descriptor before using it.
- Increase the max descriptor size for serial number to
  MAXIMUM_USB_STRING_LENGTH. This fixes serial number string truncation.

Based on suggestions by disean and ThFabba.

CORE-17625
2024-02-16 18:48:33 +03:00
Katayama Hirofumi MZ
398201dca4 [NTUSER] Relax condition for IntImmProcessKey (#6500)
* [NTUSER] Loose condition for IntImmProcessKey

* key up

* improve

* improve 2

* improve 3
2024-02-16 21:31:13 +09:00
Katayama Hirofumi MZ
e0b67a2990 [MSVIDC32] Keep using CRAM_MAGIC for info structure validation (#6498)
CRAM_MAGIC is being used to validate the info context structure contents
when the driver routines are being called, so partially revert 8be912147.

Just report "MSVC" as the main FourCC handler in CRAM_GetInfo() instead.

CORE-19453 CORE-15382
2024-02-15 17:08:47 +04:00
Stanislav Motylkov
fa29a61271 [UXTHEME] nonclient.c: Formatting only 2024-02-15 14:22:02 +03:00
Ethan Rodensky
118869f69c [UXTHEME] Implement the rest of DrawNCPreview 2024-02-13 21:20:49 +01:00
Katayama Hirofumi MZ
8ea93d2ab2 [REACTOS] Standardize <imm.h> and <immdev.h> (#6493)
Improve header compatibility and
code quality.
JIRA issue: CORE-19268
- Improve <imm.h> and <immdev.h>
  compatibility by correctly choosing
  the items.
- Use <immdev.h> instead of
  <ddk/immdev.h>.
- Move INPUTCONTEXTDX, IMEINFOEX,
  IMEDPI, and CLIENTIMC into
  <imm32_undoc.h>.
- Adapt to these changes.
2024-02-13 20:33:14 +09:00
Andrei Miloiu
bdcfc6bc8e [CRYPTUI] Update Romanian (ro-RO) translation (#6487) 2024-02-12 18:10:25 +01:00
Andrei Miloiu
d8d4d8fa4e [CMD] Update Romanian (ro-RO) translation (#6488) 2024-02-12 17:59:02 +01:00
Andrei Miloiu
16c6f9ecb9 [RAPPS] Improve Romanian (ro-RO) translation (#6489) 2024-02-12 17:58:43 +01:00
Andrei Miloiu
64f0423904 [RASDLG] Update Romanian (ro-RO) translation (#6483) 2024-02-12 17:58:22 +01:00
Andrei Miloiu
61abe81c2e [FC] Update Romanian translation (#6491) 2024-02-12 17:56:09 +01:00
Katayama Hirofumi MZ
0ac79d7c45 [MSUTB] Improve English (#6473)
Follow-up to #6472. Improve UI/UX.
JIRA issue: CORE-19363
- Improve English text in resource.
- Reduce earth.ico icon file size.
2024-02-12 17:40:57 +09:00
Katayama Hirofumi MZ
019872dd12 [SDK] cicuif.h: Implement CUIFMenuItemSeparator::OnPaintO10 (#6490)
Supporting the Language bar...
JIRA issue: CORE-19363
- Implement CUIFMenuItemSeparator::OnPaintO10
  method.
- Implement CUIFSchemeDef::GetCtrlFaceOffset
  method.
- Implement CUIFWindow::PaintObject method.
- Implement cicDrawMaskBmpOnDC function.
2024-02-12 17:40:09 +09:00
Andrei Miloiu
a7ef18303a [COMDLG32] Update Romanian (ro-RO) translation (#6485) 2024-02-11 23:30:42 +01:00
Andrei Miloiu
e7ac792b11 [EXPLORER_OLD] Update Romanian (ro-RO) translation (#6482) 2024-02-11 23:25:55 +01:00
Andrei Miloiu
179c29dc08 [FLTMC] Update Romanian (ro-RO) translation (#6481) 2024-02-11 23:22:06 +01:00
Andrei Miloiu
b4217c1db4 [BROWSEUI] Update Romanian (ro-RO) translation (#6480) 2024-02-11 23:20:29 +01:00
Andrei Miloiu
7d7ea3d43c [REACTOS] Update Romanian (ro-RO) translation (#6479) 2024-02-11 23:16:51 +01:00
Andrei Miloiu
0a4ed87751 [SYSSETUP] Update Romanian (ro-RO) translation (#6475) 2024-02-11 23:15:44 +01:00
Andrei Miloiu
8ceb3e6d33 [USETUP] Update Romanian (ro-RO) translation (#6474) 2024-02-11 23:14:33 +01:00
Andrei Miloiu
0e933b7e71 [SYSTEMINFO] Update Romanian (ro-RO) translation (#6460) 2024-02-11 23:14:11 +01:00
Andrei Miloiu
c8fbd6d303 [SHUTDOWN] Update Romanian (ro-RO) translation (#6459) 2024-02-11 23:13:27 +01:00
Andrei Miloiu
cb3b5272a0 [CACLS] Update Romanian (ro-RO) translation (#6458) 2024-02-11 23:13:10 +01:00
Andrei Miloiu
07ec501d69 [NEWDEV] Update Romanian (ro-RO) translation (#6457) 2024-02-11 23:12:49 +01:00
Andrei Miloiu
2f1c6c02c1 [INTL] Update Romanian (ro-RO) translation (#6455) 2024-02-11 23:12:31 +01:00
Andrei Miloiu
9caa57b81c [MAIN] Update Romanian (ro-RO) translation (#6454) 2024-02-11 23:12:02 +01:00
Andrei Miloiu
f65bb1fbf2 [ZIPFLDR] Update Romanian (ro-RO) translation (#6453) 2024-02-11 23:11:26 +01:00
Andrei Miloiu
753f812477 [MYDOCS] Update Romanian (ro-RO) translation (#6442) 2024-02-11 23:10:23 +01:00
Andrei Miloiu
feabd323a2 [SHELL32] Update Romanian (ro-RO) translation (#6441) 2024-02-11 23:09:32 +01:00
Andrei Miloiu
027bd7a0e3 [EXPLORER] Update Romanian (ro-RO) translation (#6440) 2024-02-11 23:08:58 +01:00
Andrei Miloiu
0dedd17da0 [TASKMGR] Update Romanian (ro-RO) translation (#6439) 2024-02-11 23:08:23 +01:00
Andrei Miloiu
ac72fa9d0d [OLEACC] Update Romanian (ro-RO) translation (#6438) 2024-02-11 22:59:02 +01:00
Andrei Miloiu
c33cbb2d51 [CONSOLE] Update Romanian (ro-RO) translation (#6437) 2024-02-11 22:57:49 +01:00
Andrei Miloiu
17a7e8bb7c [DISKPART] Update Romanian (ro-RO) translation (#6436) 2024-02-11 22:56:56 +01:00
Andrei Miloiu
8ad62af971 [SNDREC32] Update Romanian (ro-RO) translation (#6435) 2024-02-11 22:56:35 +01:00
Andrei Miloiu
3fa8e4ca82 [SNDVOL32] Update Romanian (ro-RO) translation (#6434) 2024-02-11 22:54:59 +01:00
Andrei Miloiu
8f0657a33b [OSK] Update Romanian (ro-RO) translation (#6433) 2024-02-11 22:54:41 +01:00
Andrei Miloiu
21587a0e32 [INF] Update Romanian (ro-RO) translation (#6432) 2024-02-11 22:53:47 +01:00
Andrei Miloiu
1ea13606c4 [FRAGINATOR] Update Romanian (ro-RO) translation (#6431) 2024-02-11 22:53:04 +01:00
Andrei Miloiu
3ed8b90e47 [VDCCONTROLTOOL] Update Romanian (ro-RO) translation (#6430) 2024-02-11 22:52:17 +01:00
Joachim Henze
874b5a4e00 [NETSHELL] Trivial tweaks (#6484)
Some trivial tweaks that I saw while backporting other stuff:
- es-ES.rc/pt-PT.rc: undesired spaces at the end of groupboxes, which were used as a historic workaround ~ 10 years ago
- zh-TW.rc: wrong indentation (tabs instead of spaces)
- shfldr_netconnect.cpp: superfluous GPL duplication, unneeded exclamation-marks in dbg-prints, undesired double-space formatting

saves a few bytes
2024-02-11 22:51:54 +01:00
Andrei Miloiu
edf3cc7a7a [MSI] Update Romanian (ro-RO) translation (#6429) 2024-02-11 22:51:15 +01:00
Andrei Miloiu
a1756b347e [USETUP] Update Romanian (ro-RO) translation (#6428) 2024-02-11 22:50:49 +01:00
Hermès Bélusca-Maïto
46831c537f [HAL] HalInitializeBios() should not explicitly call HalpBiosDisplayReset().
While the BIOS support for INT10h emulation has been set up, any
modification of the display should wait until the kernel requests
video initialization with INBV/bootvid.
The latter will call HalResetDisplay() (that calls HalpBiosDisplayReset())
at the correct time.
This avoids an useless video mode change and reset when booting ReactOS.
2024-02-11 18:51:40 +01:00
Dmitry Borisov
adf534b284 [NTOS:IO] Initialize InterruptObject to NULL on failure
Fixes a pool corruption when trying to handle IRP_MN_REMOVE_DEVICE in the driver

CORE-17256
2024-02-11 20:24:15 +03:00
Dmitry Borisov
f4a38a05ec [KMTESTS:NTOS_IO] Add a simple test for IoConnectInterrupt
CORE-17256
2024-02-11 20:24:15 +03:00
Katayama Hirofumi MZ
f8cb6458e4 [MSUTB][SDK] Add CTipbarWnd Part 4 (#6478)
Supporting the Language bar...
JIRA issue: CORE-19363
- Add implementation to CTipbarWnd.
- Implement GetLibTls function.
2024-02-11 17:21:14 +09:00
Katayama Hirofumi MZ
23db429e42 [MSCTF][MSUTB][SDK] Add CTipbarItem and CTipbarThread (#6477)
Supporting the Language bar...
JIRA issue: CORE-19363
- Modify msctf.spec.
- Add CTipbarThread and
  CTipbarItem classes.
2024-02-11 13:24:41 +09:00
Serge Gautherie
eb55d984c0 [GITHUB] build.yml: Re-enable 'build-msbuild-i386' (#6470)
Something fixed it in the meantime.

Revert 0.4.15-dev-6069-g 56a45014. CORE-18911
2024-02-10 13:36:38 +03:00
Serge Gautherie
24dea07c3c [GITHUB] build.yml: Use all matrix values to restore Linux build cache (#5595)
Do not mix different build configurations. Extend cache key.

Addendum to 0.4.15-dev-2996-g f777e6bd and 0.4.15-dev-6472-g 732f223c.
2024-02-10 13:32:27 +03:00
Katayama Hirofumi MZ
b548b05e89 [MSUTB] Disable Desk Band (#6472)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add IDD_CLOSELANGBARNOBAND and 
  IDD_MINIMIZELANGBARNOBAND resource dialogs.
- Add IDB_BITMAP154 and IDB_BITMAP155 resource
  bitmaps.
- Disable Desk Band by using g_bEnableDeskBand
  global variable.
2024-02-10 18:12:45 +09:00
Katayama Hirofumi MZ
152af475b1 [MSUTB][SDK] Implement SetRegisterLangBand (#6471)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add some helper functions.
- Implement SetRegisterLangBand
  function.
2024-02-10 16:04:33 +09:00
Katayama Hirofumi MZ
463fec0503 [MSUTB] Implement GetPopupTipbar (#6469)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add GetTipbarInternal helper function.
- Implement GetPopupTipbar function.
2024-02-10 15:14:21 +09:00
Katayama Hirofumi MZ
a6ab8ca780 [MSUTB] Implement ClosePopupTipbar (#6468)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement ClosePopupTipbar function.
2024-02-10 14:25:12 +09:00
Katayama Hirofumi MZ
c6ceae3440 [MSUTB] Add CTipbarWnd Part 3 (#6467)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add implementation to
  CTipbarWnd class.
- Add delay link to imm32.dll.
2024-02-10 13:04:37 +09:00
Maj Soklič
5974982d9c [GITHUB] Update Actions for Node.js 16 deprecation preparation (#5819)
GitHub started to show deprecation warnings for all Node.js 16 based Actions:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

In order to resolve this:
- build.yml: Update cache to v4
- labeler.yml:
  - Remove the now optional 'repo-token' argument
  - Add 'sync-labels' to remove non-actual labels on PR updates
- stale.yml: Remove useless issue permission since we don't have issues enabled
2024-02-10 02:50:59 +03:00
Stanislav Motylkov
6f874a4656 [GITHUB] Fix Labeler rule for 'drivers'
Addendum to d18b6fc4.
2024-02-10 02:08:04 +03:00
Stanislav Motylkov
d18b6fc437 [GITHUB] Upgrade Labeler rules for v5
Addendum to 51f3ef04.
2024-02-10 01:42:13 +03:00
Hermès Bélusca-Maïto
88891d2ce7 [SETUPLIB][USETUP] Convert MUI_LANGUAGE GeoID values to numbers. 2024-02-09 22:33:30 +01:00
Hermès Bélusca-Maïto
c26a2e89eb [SETUPLIB][USETUP] Convert MUI_LANGUAGE codepages to numbers. 2024-02-09 22:06:39 +01:00
Hermès Bélusca-Maïto
f0a1d766f1 [SETUPLIB][USETUP] Convert internal MUI_LAYOUTS data to numbers.
LangID is a LANGID and LayoutID is a KLID: keyboard layout ID.
See terminology at http://archives.miloush.net/michkap/archive/2004/11/27/270931.html

These tables of MUI_LAYOUTS for each language, correspond to the
intl.inf LCID map:
```
; List of locales.
; <LCID> = <Description>,<OEMCP>,<Language Group>,<langID:HKL pair>,<langID:HKL pair>,...
```
where:
- each MUI_LANGUAGE entry corresponds to one such locale description;
- each MUI_LAYOUTS entry corresponds to a <langID:HKL pair>.

See http://archives.miloush.net/michkap/archive/2006/10/14/825404.html
for some details.
2024-02-09 21:28:23 +01:00
Adam Stachowicz
51a446f966 [GITHUB] build.yml: Update actions to latest versions (#6327) 2024-02-09 22:54:15 +03:00
Adam Stachowicz
51f3ef04f2 [GITHUB] labeler.yml: Update to v5 (#6326)
Release notes: https://github.com/actions/labeler/releases
2024-02-09 22:52:12 +03:00
Adam Stachowicz
f0faa45159 [GITHUB] stale.yml: Update to v9 (#6325)
Release notes: https://github.com/actions/stale/releases
2024-02-09 22:50:40 +03:00
Hermès Bélusca-Maïto
475098c8b1 [NTOS:IO] Don't uppercase the ServiceName in IopDisplayLoadingMessage().
Problematic behaviour was added in commit a97f262ed (r26067), and
commit c39812d1b (r46193) converted to RtlUpcaseUnicodeString() call.

This was modifying the caller's given string. This is not really
a good practice to do so just to make display fancier.

For example, IopInitializeBuiltinDriver(), that calls the display
function, also uses the passed ServiceName later after.

Because IopDisplayLoadingMessage() executes only in SOS mode,
uppercasing the ServiceName in one case but not the other would
implicitly modify the observable OS behaviour.

IopSuffixUnicodeString() is adapted to be similar to RtlPrefixUnicodeString().
2024-02-09 17:16:20 +01:00
Hermès Bélusca-Maïto
3b60f4fa13 [NTOS:IO] Fix a count in characters vs. bytes mismatch. 2024-02-09 17:14:19 +01:00
Hermès Bélusca-Maïto
d1b3115afa [NTOS:IO] IopDisplayLoadingMessage(): Display the loading messages only in SOS mode.
- Make the boolean SosEnabled from ex/init.c visible globally so that
  it can be checked against by IopDisplayLoadingMessage().

- Also use RtlString* function to construct the string.
2024-02-09 17:13:30 +01:00
Hermès Bélusca-Maïto
17c59456cd [NTOS:IO] Minor formatting for IopSuffixUnicodeString and IopDisplayLoadingMessage.
- Doxygen comments;
- SAL annotations;
- These two functions are local to driver.c file only -> static'ify them.
- 2 -> sizeof(WCHAR);
- Rename Length to NumChars;
- static const'ify the L".SYS" string.
2024-02-09 17:00:25 +01:00
Hermès Bélusca-Maïto
08afb1f4b4 [NTOS:INBV] Don't include the fancy splashscreen logo as well
CORE-19449
2024-02-09 12:00:01 +01:00
Hermès Bélusca-Maïto
ee2e256ebf [NTOS:INBV] Disable fancy boot splashscreen features
CORE-19449
2024-02-09 11:52:23 +01:00
Katayama Hirofumi MZ
afaa05e366 [MSUTB][SDK] Add CTipbarWnd Part 2 (#6466)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add implementation to
  CTipbarWnd class.
- Add delay link to uxtheme.dll.
2024-02-09 18:28:24 +09:00
Katayama Hirofumi MZ
f8b62abf16 [MSUTB][SDK] Add CTipbarWnd (stub) (#6465)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add CTipbarWnd class (stub;
  empty implementation).
2024-02-09 15:04:45 +09:00
Hermès Bélusca-Maïto
87df3b548e [SETUP:REACTOS] Temporarily use USETUP file/cabinet extraction routines.
Do this until Wine's setupapi cabinet extraction becomes faster...
2024-02-08 19:08:46 +01:00
Hermès Bélusca-Maïto
bff31569e6 [USETUP] Make the "SpApiSup" files usable from e.g. the GUI setup. 2024-02-08 19:08:39 +01:00
Hermès Bélusca-Maïto
864aed6bcd [SDK:CRT] malloc.h: Use MS PSDK-compatible guard name instead of MinGW one.
Use the MS PSDK-compatible name _INC_MALLOC, instead of the MinGW one
_MALLOC_H_, so that code that may depend on this to determine whether
malloc.h functions are defined, can compile without problems.
2024-02-08 17:48:58 +01:00
Katayama Hirofumi MZ
362804169d [MSUTB] Add CShellWndThread (#6463)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CShellWndThread class.
2024-02-08 22:13:44 +09:00
Katayama Hirofumi MZ
5901716c07 [MSUTB] Add CTipbarGripper (#6462)
Supporting Language Bar...
JIRA issue: CORE-19363
- Half-implement CTipbarGripper class.
2024-02-08 20:31:01 +09:00
Katayama Hirofumi MZ
3581a79ebf [SDK] cicutf.h: s/OnPointingEnded/OnMouseOutFromWindow/ (#6461)
Supporting Language Bar...
JIRA issue: CORE-19363
Renaming method.
2024-02-08 14:13:59 +09:00
Adam Słaboń
1f28f715ba [NTOS:FSTUB] Pack the MASTER_BOOT_RECORD structure (#6416)
Otherwise the USHORT members are aligned to 4-byte boundary space
which overflows the disk sector buffer and ultimately results in crash.
This can be reproduced by trying to format the USB drive with Rufus.

Also put some additional C_ASSERT checks for extra safety.
2024-02-08 01:02:19 +03:00
Katayama Hirofumi MZ
7dd3308828 [MSUTB][SDK] Add CUTBContextMenu (#6452)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add some resource strings.
- Half-implement CUTBContextMenu
  class.
2024-02-07 16:47:10 +09:00
Katayama Hirofumi MZ
c9c5b3d3ae [MSUTB][SDK] Add CModalMenu (#6451)
Supporting Language Bar...
JIRA issue: CORE-19363
- Fix the return value type of
  CUIFObject::Initialize method.
- Implement CModalMenu class.
2024-02-07 14:11:21 +09:00
Doug Lyons
2bc44bf95c [MSI] Don't write past end of string when selecting parent directory (#6335)
Import Wine commit: bbce5d014d

Since there's not really something sensible to do in the
"path contains no backslashes" case (adding a backslash seems pointless),
move PathAddBackslashW call inside the if condition to avoid the crash.
Fix suggested by Thomas Faber.

This fixes heap assert in msi/dialog.c when installing Tortoise GIT.
CORE-16693

Co-authored-by: Thomas Faber <thomas.faber@reactos.org>
Co-authored-by: Fabian Maurer <dark.shadow4@web.de>
2024-02-06 23:20:57 +03:00
Katayama Hirofumi MZ
0bce79a50b [MSCTF][MSUTB][SDK] Add CLBarInatItem (#6447)
Supporting Language Bar...
JIRA issue: CORE-19363
- Modify msctf.spec.
- Add some helper functions.
- Half-implement CLBarInatItem class.
- Add some TF_... function prototypes
  to "msctf.idl".
2024-02-06 21:39:32 +09:00
Katayama Hirofumi MZ
8bf0854c8e [MSUTB] Add CLBarItemButtonBase (#6446)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CLBarItemButtonBase class.
- Improve CLBarItemBase class.
2024-02-06 15:58:16 +09:00
Katayama Hirofumi MZ
8bfebdf444 [MSUTB] Add CUTBLBarMenu (#6445)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CUTBLBarMenu class.
2024-02-06 13:34:34 +09:00
Katayama Hirofumi MZ
34705d1a5d [MSUTB][SDK] Add CLBarItemBase (#6444)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CLBarItemBase class.
- Add TF_E_... flags to "msctf.idl".
2024-02-06 12:21:46 +09:00
Hervé Poussineau
9e43518da5 [NTOS:PO] Set SystemBatteriesPresent when having a battery device in the system
This is (at least) used by powercfg.cpl to know if it needs to display some additional pages.
2024-02-05 18:04:02 +01:00
Hervé Poussineau
dff8b93ee2 [NTOS:PO] Give the power device type to PopAddRemoveSysCapsCallback function 2024-02-05 18:04:02 +01:00
Hervé Poussineau
0be4e4aa6d [CMBATT] Correctly print UNICODE_STRING 2024-02-05 18:04:01 +01:00
Katayama Hirofumi MZ
c858429fb1 [COMCTL32] ToolTips: Don't set text on default LPSTR_TEXTCALLBACK (#6412)
Based on KRosUser's tooltip_fix.patch.
JIRA issue: CORE-19309
Don't set text on default processing
of LPSTR_TEXTCALLBACK.
2024-02-05 08:08:33 +09:00
Oleg Dubinskiy
290221ef5b [SHELL32] Sync HCR_RegGetIconW() function to Wine 9.1 (#6418)
Import the following fixes:
- Use the number of bytes instead of the number of characters in the length
  passed to RegQueryValueExW. Calculate this by multiplying the number of
  characters on the size of one wide character in bytes, since only length
  of characters is passed to the function. This fixes ERROR_MORE_DATA
  returned from RegQueryValueExW, because the passed number of bytes was
  less than the actual length of the output buffer, since it was calculated
  incorrectly, so the function failed even when it received the correct
  number of wide characters.
  This partially imports Wine commit:
  32584bb521.
- Limit the number of characters in registry icon index buffer from 7 to 5,
  as it done in ANSI version of this function, since registry index number
  can contain up to 4 digits + space for the null-terminator.

This fixes problems when loading custom (user-defined) icons from registry,
like icons defined by the current user or for all users, instead of just
default icons from the root classes.

CORE-14758

Co-authored-by: Zhiyi Zhang <zzhang@codeweavers.com>
2024-02-02 18:10:36 +03:00
Hervé Poussineau
913235952c [ACPI] Return success even if AcpiInterfaceNotificationsRegister is not implemented
Drivers calling this function still won't be notified in case of event,
but they will at least succeed their initialization.

CORE-18309
2024-02-01 10:08:58 +01:00
Hervé Poussineau
7f1025dcce [CMBATT] Send correct tag on IoAcquireRemoveLock
This prevents an assert in IoReleaseRemoveLock in debug builds, which
already receives the 'Irp' tag.
2024-02-01 10:08:58 +01:00
Hervé Poussineau
6b5ee5ccc7 [BATTC] Make input buffer on IOCTL_BATTERY_QUERY_TAG optional
In that case, don't wait to get battery tag.
2024-02-01 10:08:51 +01:00
Hervé Poussineau
385ac5d4d2 [DEVMGR] Fix diagnostic message when device is failing with CM_PROB_FAILED_ADD
In this specific case, we don't have more information to show.
This prevents using "FIXME" string as a placeholder for device details.

CORE-18309
2024-02-01 09:57:02 +01:00
Katayama Hirofumi MZ
c1dfd580ab [MSUTB][SDK] Add InitFromReg (#6425)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add many global variables
  to add UTB settings.
- Add IsSkipRedrawHKL, IsBiDiLocalizedSystem,
  InitSkipRedrawHKLArray helper functions.
- Add InitFromReg helper function to
  load the settings from registry.
- Add CicRegKey::EnumValue method.
2024-01-31 20:32:21 +09:00
Katayama Hirofumi MZ
5e4fe2cf40 [MSCTF][MSUTB][SDK] Add CTrayIconWnd and CMainIconItem (#6424)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add CTrayIconWnd, CMainIconItem,
  and CButtonIconItem classes.
- Modify msctf.spec for TF_GetLangIcon
  function.
- Add main icon IDI_MAINICON
  ("res/earth.ico").
2024-01-31 16:52:02 +09:00
Katayama Hirofumi MZ
1311537435 [MSUTB][SDK] Implement DoCloseLangbar (#6423)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement GetGlobalCompartment function.
- Implement GetGlobalCompartmentDWORD and
  SetGlobalCompartmentDWORD helper functions.
- Implement TurnOffSpeechIfItsOn and
  DoCloseLangbar functions.
2024-01-31 12:21:09 +09:00
Katayama Hirofumi MZ
934cd46df5 [MSUTB][SDK] Add Language Bar dialogs (#6422)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add IDD_CLOSELANGBAR and
  IDD_MINIMIZELANGBAR
  resource dialogs.
- Implement CUTBLangBarDlg class.
- Implement CUTBCloseLangBarDlg
  and CUTBMinimizeLangBarDlg
  classes.
2024-01-30 15:38:53 +09:00
Katayama Hirofumi MZ
1001b59a06 [MSUTB][SDK] Add CUTBMenuWnd and CUTBMenuItem (#6420)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CUTBMenuWnd and
  CUTBMenuItem classes.
- Add IDS_MENUWND and
  IDS_LEFTCLICK resource strings.
2024-01-29 18:38:59 +09:00
Katayama Hirofumi MZ
c0020b6821 [MSUTB] Add CTipbarAccessible (#6417)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CTipbarAccessible class.
- Add delay link to oleacc.dll.
2024-01-28 11:35:44 +09:00
Stanislav Motylkov
b50dfbcee4 [DESK][SHELL32] Improve French (fr-FR) translation
Make "My Network Places" translation consistent.
Fix suggested by Hermès Bélusca-Maïto.
2024-01-27 15:06:12 +03:00
Katayama Hirofumi MZ
883863fa50 [MSUTB] Add CTipbarAccItem (#6415)
Supporting Language Bar...
JIRA issue: CORE-19363
Half-implement CTipbarAccItem class.
2024-01-27 19:25:17 +09:00
Katayama Hirofumi MZ
d6caac3056 [MSUTB] Add CCicLibMenu and CCicLibMenuItem (#6414)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CCicLibMenu and
  CCicLibMenuItem classes.
2024-01-27 14:06:25 +09:00
Stanislav Motylkov
deee8aaec1 [REGEDIT] edit.c: Display bus number as signed (it can be -1) 2024-01-26 01:18:20 +03:00
Stanislav Motylkov
c9985e48d3 [REGEDIT] Update Russian (ru-RU) translation 2024-01-26 01:08:43 +03:00
Stanislav Motylkov
889cfee653 [FORMAT] Fix translation headers (+ miscellaneous fixes) 2024-01-26 00:02:38 +03:00
Stanislav Motylkov
e480a7d17c [INF] Shortcuts: Remove remaining trailing dots. Addendum to 92a36b3613. 2024-01-25 21:58:40 +03:00
Katayama Hirofumi MZ
6b0ee735c7 [SDK] cicuif.h: Add CUIFMenuItemSeparator (#6411)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add CUIFMenuItemSeparator class.
- Implement CUIFMenu::InsertSeparator
  method.
2024-01-25 12:35:04 +09:00
Katayama Hirofumi MZ
a88c85259b [SDK] cicuif.h: Fix CUIFMenuItem::OnPaintO10 (#6410)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenuItem::OnPaintO10 method.
2024-01-25 12:09:56 +09:00
Katayama Hirofumi MZ
6634f66e0e [SDK] cicuif.h: Fix CUIFMenuItem::OnPaintDef (#6409)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenuItem::OnPaintDef method.
2024-01-25 12:09:02 +09:00
Oleg Dubinskiy
5abf0c76b7 [NTOS:KE/x86/arm] Use a better boot process affinity value (#6399)
Use a value that is independent of the CPU bitness.
Addendum to commit 96d5b6281
2024-01-24 17:52:56 +01:00
Katayama Hirofumi MZ
927b183aa9 [SDK] cicuif.h: Fix CUIFMenuItem::DrawUnderline (#6406)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenuItem::DrawUnderline
method.
2024-01-24 19:13:24 +09:00
Katayama Hirofumi MZ
3ac5de4102 [SDK] cicuif.h: Fix CUIFMenu::OnKeyDown (#6408)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenu::OnKeyDown
method.
2024-01-24 17:52:36 +09:00
Katayama Hirofumi MZ
76c898ca8e [SDK] cicuif.h: Fix CUIFMenuItem::InitMenuExtent (#6407)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenuItem::InitMenuExtent
method.
2024-01-24 17:51:59 +09:00
Katayama Hirofumi MZ
3056f253e4 [SDK] cicuif.h: Fix CUIFMenu::SetMenuFont (#6403)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenu::SetMenuFont
method.
2024-01-24 15:57:45 +09:00
Katayama Hirofumi MZ
f465035cd9 [SDK] cicuif.h: Fix CUIFMenuItem::Init (#6405)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenuItem::Init method.
2024-01-24 14:42:17 +09:00
Katayama Hirofumi MZ
21e759735e [SDK] cicuif.h: Fix CUIFMenuItem::DrawBitmapProc (#6404)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenuItem::DrawBitmapProc
method.
2024-01-24 14:41:46 +09:00
Katayama Hirofumi MZ
f170276fd2 [SDK] cicuif.h: Fix CUIFMenu::InitShow (#6402)
Supporting Language Bar...
JIRA issue: CORE-19363
Implement CUIFMenu::InitShow method.
2024-01-24 14:41:04 +09:00
Katayama Hirofumi MZ
f3ae595df9 [SDK] cicuif.h: Fix CUIFBalloonWindow::CreateRegion (#6401)
Implementing Language Bar...
JIRA issue: CORE-19363
- Implement CUIFBalloonWindow::CreateRegion
  method.
2024-01-24 14:40:31 +09:00
Katayama Hirofumi MZ
062890ac5f [SDK] cicuif.h: Add CUIFMenu and CUIFMenuItem (#6400)
Supporting Language Bar...
JIRA issue: CORE-19363
- Half-implement CUIFMenu
  and CUIFMenuItem.
- Reduce lines.
2024-01-23 20:33:43 +09:00
Andrei Miloiu
e4344ad152 [DOC] Update Romanian translation notes.txt (#6239) 2024-01-21 22:53:35 +01:00
Andrei Miloiu
62f645b753 [SYSSETUP] Update Romanian (ro-RO) translation (#6344) 2024-01-21 22:44:42 +01:00
Andrei Miloiu
7d77a9713e [CHKSDK] Update Romanian (ro-RO) translation (#6354) 2024-01-21 22:42:41 +01:00
Eric Kohl
d3d67bf5bd [SERVICES] Separate the start tag and the service tag of the manages services
This fixes two winetest errors.
2024-01-21 22:42:26 +01:00
Andrei Miloiu
835942fbf6 [FORMAT] Update Romanian (ro-RO) translation (#6355) 2024-01-21 22:30:00 +01:00
Andrei Miloiu
85ad46099c [TREE] Update Romanian (ro-RO) translation (#6358) 2024-01-21 22:25:20 +01:00
Andrei Miloiu
92a36b3613 [INF] Update Romanian (ro-RO) translation (#6359) 2024-01-21 22:25:00 +01:00
Andrei Miloiu
15beb9d754 [NOTEPAD] Update Romanian (ro-RO) translation (#6372) 2024-01-21 22:22:46 +01:00
Andrei Miloiu
189e81d131 [MPLAY32] Update Romanian (ro-RO) translation (#6373) 2024-01-21 22:13:19 +01:00
Andrei Miloiu
735b06bf0a [CHARMAP] Improve Romanian (ro-RO) translation (#6374) 2024-01-21 22:12:15 +01:00
Andrei Miloiu
bc326b966a [SERVMAN] Update Romanian (ro-RO) translation (#6375) 2024-01-21 22:11:41 +01:00
Andrei Miloiu
9e03f07a71 [WINMM] Update Romanian (ro-RO) translation (#6376) 2024-01-21 22:11:26 +01:00
Andrei Miloiu
46edca2036 [MORE] Update Romanian (ro-RO) translation (#6377) 2024-01-21 22:10:54 +01:00
Andrei Miloiu
0b22bf25fc [BROWSEUI] Update Romanian translation (#6378) 2024-01-21 22:10:39 +01:00
Andrei Miloiu
bff61ed75f [SYSDM] Update Romanian (ro-RO) translation (#6379) 2024-01-21 22:10:20 +01:00
Andrei Miloiu
f805438e70 [LSASRV] Update Romanian (ro-RO) translation (#6380) 2024-01-21 22:08:19 +01:00
Andrei Miloiu
aa8069b0f8 [SAMSRV] Update Romanian (ro-RO) translation (#6381) 2024-01-21 22:07:35 +01:00
Andrei Miloiu
b9de02ceec [DISKPART][MC] Update Romanian (ro-RO) translation for message table (#6382) 2024-01-21 22:05:38 +01:00
Andrei Miloiu
a62cc5f9da [EXPLORER_OLD] Update Romanian (ro-RO) translation (#6388) 2024-01-21 22:05:11 +01:00
Andrei Miloiu
846980f299 [USERENV] Update Romanian (ro-RO) translation (#6389) 2024-01-21 21:56:37 +01:00
Andrei Miloiu
cb97d8eaef [COMDLG32] Update Romanian (ro-RO) translation (#6390) 2024-01-21 21:56:11 +01:00
Andrei Miloiu
559933d6de [LABEL] Update Romanian (ro-RO) translation (#6392) 2024-01-21 21:32:41 +01:00
Andrei Miloiu
1c5b5ce8a4 [NETPLWIZ] Update Romanian (ro-RO) translation (#6393) 2024-01-21 21:32:09 +01:00
Andrei Miloiu
a0d7030a06 [ACPPAGE] Update Romanian (ro-RO) translation (#6394) 2024-01-21 21:28:27 +01:00
Andrei Miloiu
82e6688e4d [SUBST] Update Romanian (ro-RO) translation (#6395) 2024-01-21 21:26:30 +01:00
Andrei Miloiu
34d63501ba [SETUPAPI] Update Romanian (ro-RO) translation (#6396) 2024-01-21 21:07:06 +01:00
Justin Miller
748a2e1655 [NTOS] Fix boot on UP build - PrcbLocks are not used on UP (#6391)
On the uniprocessor kernel KiAcquirePrcbLock is a stub that doesn't modify the current Prcb's PrcbLock value.
Quickly protect this assert around CONFIG_SMP
2024-01-20 08:59:13 -08:00
Oleg Dubinskiy
ab528ac6ae [NTOS:KE] Acquire PRCB lock before marking thread ready for execution in dispatch interrupt routine (#6387)
Fixed in x86 and ARM (this was already done in x64).

This is needed because thread preparation routine KxQueueReadyThread()
releases PRCB lock, but does not acquire it, so that the locking must
always be done outside the function, same as in all its other usage cases.
This fixes an assert from release PRCB routine, when booting x86 ReactOS
in SMP mode, because it attempts to release the lock when it is not
actually acquired.

Addendum to commit a011d19ed.

+ Add an assert in KxQueueReadyThread() to ensure the PRCB lock is actually acquired.
2024-01-20 15:58:39 +01:00
Oleg Dubinskiy
f72d6dd4c5 [NTOS:KE] Set IRQL to SYNCH_LEVEL when exiting from idle after the thread is ready for execution (#6386)
CORE-1697

Raise IRQL to SYNCH_LEVEL when exiting from the idle thread in the
idle loop, in case it is scheduled for execution. Then restore it
back to DISPATCH_LEVEL, after this is done.
This behaviour is a bit similar to the way it's done on x64.

This IRQL raise is necessary only in SMP builds.
Calls are placed in CONFIG_SMP ifdef: this avoids unnecessary IRQL
changes on UP, since SYNCH_LEVEL and DISPATCH_LEVEL are identical
there, unlike in MP, where SYNCH_LEVEL is IPI_LEVEL - 2 actually.

This prevents bugcheck DRIVER_IRQL_NOT_LESS_OR_EQUAL when booting
SMP x86 ReactOS, in KiTimerExpiration when calling it 2nd time.
The BSOD happened due to IRQL levels mismatch.
2024-01-20 15:55:20 +01:00
Justin Miller
3306a16e84 [HALX86] Fix SYNCH_LEVEL differences between UP and SMP in HAL (#5874)
First step to fixing the multiprocessor kernel when booting on a single core.
2024-01-20 06:26:59 -08:00
Timo Kreuzer
9c1cfe0587 [NTOS:KE] Fix initialization of node block for application processors
- Initialize KeNodeBlock[0] statically
- Update Prcb->ParentNode->ProcessorMask for all processors
2024-01-18 22:41:46 +01:00
Doug Lyons
619ff7c429 [WS2_32_WINETEST] Patch ws2_32:sock wine test to run on ReactOS (#5609)
Disable ReactOS specific tests which are not implemented yet.
ROSTESTS-385

- Bypass part of test that uses MEM_WRITE_WATCH.
- Bypass three tests that are unimplemented: 1) WSPAcceptEx, 2) WSPConnectEx, and 3) WSPDisconnectEx
2024-01-18 12:11:25 +01:00
Katayama Hirofumi MZ
73ba03add1 [SDK] cicuif.h: Add CUIFBalloonButton and CUIFBalloonWindow (#6384)
Supporting TIPs...
JIRA issue: CORE-19360
- Implement CUIFBalloonButton class.
- Half-implement CUIFBalloonWindow class.
2024-01-18 19:25:46 +09:00
Hermès Bélusca-Maïto
feb67576dd [NTOS:CM][CMLIB] In PE mode, allow registry hives (except system ones) to use read/write access.
+ Improve related comments.

Registry hives are opened in shared read access when NT is loaded in PE
mode (MININT) or from network (the hives residing on a network share).
This is true in particular for the main system hives (SYSTEM, SOFTWARE,
DEFAULT, ...).

However, in PE mode, we can allow other hives, e.g. those loaded by the
user (with NtLoadKey) to be loaded with full read/write access, since we
boot from a local computer.
2024-01-17 22:13:03 +01:00
Hermès Bélusca-Maïto
793ee786cd [NTOS:CM] Initially start the registry in read-only mode.
Disable registry hive writes, until the IO subsystem is initialized
and disk access is enabled (when the SM signals so after AUTOCHK).
2024-01-17 22:09:45 +01:00
Hermès Bélusca-Maïto
76f1da5631 [NTOS:CM][CMLIB] Minor code styling
In particular remove some extra-parentheses around single code tokens,
and replace few "DPRINT1 + while (TRUE);" by UNIMPLEMENTED_DBGBREAK.

+ Improve some comments.
2024-01-17 22:09:37 +01:00
Whindmar Saksit
d41dec2e07 [SHELL32][CONTROL] Added basic IOpenControlPanel support (#6248)
Add a basic IOpenControlPanel implementation that supports Vista canonical registry names.

Implements `control.exe /name company.name [/page id]` and `IOpenControlPanel`
handling of Vista-style canonical registry names.

The documented `Microsoft.*` names don't work because they are simply not
in our registry but "[Executable Control Panel Items](https://learn.microsoft.com/en-us/windows/win32/shell/how-to-register-an-executable-control-panel-item-registration-)" registered by 3rd-party ISVs
will function correctly in control.exe and the COM API.

Notes:

- `IOpenControlPanel` is implemented in CControlPanelFolder.cpp because
  it is supposed to have tighter integration with that shell folder than
  it does in this PR.

- `IOpenControlPanel` is also supposed to handle .cpl files with canonical
  names registered under [`Extended Properties`](https://learn.microsoft.com/en-us/windows/win32/shell/how-to-register-dll-control-panel-item-registration-#step-3) but the control panel folder
  does not implement `IShellFolder2::GetDetailsEx` yet, so it will have to wait.

- These "Executable Control Panel Items" are also supposed to be displayed
  in the control panel itself but this PR does not address that. The
  `ITEMIDLIST` format for those needs investigation...

- The Wow64 handling is perhaps not correct but it does not matter,
  `ShellExecuteEx` gets to deal with whatever is in the `...\shell\open\command` key.
  `CControlPanelFolder` would have to take more care when it starts
  reading those keys so it knows when to append "(32-bit)" to the display name.

- `%s%s` because .cpl canonical names don't have the `::` prefix according
  to Geoff Chappell.

- Always returns `CPVIEW_CLASSIC` because our `CControlPanelFolder` does
  not support the category view.
2024-01-17 17:07:21 +01:00
Doug Lyons
fb43301bad Fix Cursor Position in "...file name:" box when opening from Explorer 'Search' toolbar (#6333)
Original patch by @I_Kill_Bugs.
Fix Cursor being in middle of '...file name:' edit box when using 'Search' from the Explorer toolbar.

JIRA issue: CORE-19407
2024-01-17 07:42:18 -08:00
Serge Gautherie
2505489d29 [MKISOFS] CMakeLists.txt: Add a check for Clang and its version (#6369)
GCC 8.4 and Clang 13.0.1:
`cc1: note: unrecognized command-line option ‘-Wno-deprecated-non-prototype’ may have been intended to silence earlier diagnostics`

Addendum to commit 4e3bf252d
2024-01-17 16:32:46 +01:00
Jose Carlos Jesus
d4a453ca2e [TRANSLATION] Improve Portuguese (pt-PT) translation (#6171)
Updates for DESK.CPL, INPUT.CPL, EXPLORER.EXE, SHELL32.DLL
2024-01-17 16:07:21 +01:00
Katayama Hirofumi MZ
89d8b472af [MSUTB] Add CTrayIconItem (#6371)
Supporting Language Bar...
JIRA issue: CORE-19363
- Implement CTrayIconItem class.
- Add delay link to shell32.dll.
2024-01-17 12:42:54 +09:00
Katayama Hirofumi MZ
ae54529024 [SDK] cicuif.h: Add CUIFWndFrame (#6370)
Supporting TIPs...
JIRA issue: CORE-19360
Implement CUIFWndFrame class.
2024-01-17 12:42:18 +09:00
Adam Słaboń
823fdb19d7 [SDK][VIRTIO][NETKVM] Make VirtIO a separate library (#6280)
* [SDK][VIRTIO][NETKVM] Make VirtIO a separate library

This is to avoid code duplication when more VirtIO drivers are brought in. This will also be used on development of a VirtIO XDDM GPU Driver.

* [VIRTIO] Sync with upstream
2024-01-16 17:55:35 -08:00
Timo Kreuzer
96d5b6281d [NTOS:KE/x64] Fix boot process affinity 2024-01-16 08:15:53 +01:00
Timo Kreuzer
1ee23d33ac [NTOS:KE] Fix some KAFFINITYs 2024-01-16 08:15:53 +01:00
Andrei Miloiu
a175a88fcb [DESK] Update Romanian (ro-RO) translation (#6350) 2024-01-15 22:25:11 +01:00
Andrei Miloiu
e084cbc7c3 [CMD] Update Romanian (ro-RO) translation (#6366) 2024-01-15 22:23:07 +01:00
Andrei Miloiu
d1097a2b16 [CALCULATOR] Update Romanian (ro-RO) translation (#6362) 2024-01-15 22:20:50 +01:00
Andrei Miloiu
fe4a7918d3 [WINMINE] Update Romanian (ro-RO) translation (#6363) 2024-01-15 22:20:27 +01:00
Andrei Miloiu
bfe233912d [SHIMGVW] Update Romanian (ro-RO) translation (#6356) 2024-01-15 22:19:09 +01:00
Andrei Miloiu
cb53a0df1b [SHDOCLC] Update Romanian (ro-RO) translation (#6357) 2024-01-15 22:15:57 +01:00
Andrei Miloiu
cd4c1c563b [SOLITAIRE] Update Romanian (ro-RO) translation (#6361) 2024-01-15 22:13:04 +01:00
Andrei Miloiu
7cf14d6d34 [SPIDER] Update Romanian (ro-RO) translation (#6360) 2024-01-15 22:08:26 +01:00
Andrei Miloiu
ea06bf8cb1 [RASDLG] Update Romanian (ro-RO) translation (#6345) 2024-01-15 22:07:35 +01:00
Andrei Miloiu
d089dccdde [EXPLORER] Update Romanian (ro-RO) translation (#6351) 2024-01-15 22:06:54 +01:00
Andrei Miloiu
fd573dee26 [SHELL32] Update Romanian (ro-RO) translation (#6352) 2024-01-15 22:06:16 +01:00
Andrei Miloiu
c54f935918 [MSPAINT] Update Romanian (ro-RO) translation (#6364) 2024-01-15 22:05:02 +01:00
Andrei Miloiu
10e6061bb9 [SENDMAIL] Update Romanian (ro-RO) translation (#6353) 2024-01-15 21:59:19 +01:00
Andrei Miloiu
703e2cd1bb [SYSDM] Update Romanian (ro-RO) translation (#6367) 2024-01-15 21:58:35 +01:00
Andrei Miloiu
6f90b43f8a [APPWIZ] Improve Romanian (ro-RO) translation (#6343) 2024-01-15 21:57:52 +01:00
Andrei Miloiu
293aa53c62 [HDWWIZ] Update Romanian (ro-RO) translation (#6342) 2024-01-15 21:56:51 +01:00
Andrei Miloiu
0830e7a445 [REACTOS] Update Romanian (ro-RO) translation (#6341) 2024-01-15 21:56:32 +01:00
Andrei Miloiu
744c1395fd [USERINIT] Update Romanian (ro-RO) translation (#6340) 2024-01-15 21:55:34 +01:00
Andrei Miloiu
12056e88eb [WINLOGON] Update Romanian (ro-RO) translation (#6261) 2024-01-15 21:54:11 +01:00
Andrei Miloiu
8080492b39 [MORE] Update Romanian (ro-RO) translation (#6259) 2024-01-15 21:53:42 +01:00
Katayama Hirofumi MZ
6294f5b3ff [SDK] cicuif.h: Fix CUIFSchemeDef::DrawCtrlEdge (#6347)
Supporting TIPs...
JIRA issue: CORE-19360
Implement CUIFSchemeDef::DrawCtrlEdge method.
2024-01-15 10:36:42 +09:00
Katayama Hirofumi MZ
1156249d63 [SDK] cicuif.h: Fix CUIFSchemeDef::DrawCtrlBitmap (#6348)
Supporting TIPs...
JIRA issue: CORE-19360
Implement CUIFSchemeDef::DrawCtrlBitmap method.
2024-01-15 10:36:12 +09:00
Hervé Poussineau
922757e2e3 [FREELDR:UI] Update display after restoring screen contents
JIRA issue: CORE-18186
2024-01-14 19:12:11 +01:00
Serge Gautherie
2c895c986f [CMAKE][WIN32U_APITEST] Remove 3 useless 'set_module_type(... IMAGEBASE default)' (#6328)
And add an explicit documentation comment.

Addendum to commit 2b7246fd3.
2024-01-14 16:07:00 +01:00
Katayama Hirofumi MZ
cbc3ee2287 [JOY] Add IDCANCEL action to MainPageProc (#6346)
Based on KRosUser's joycancel.patch. Enable Esc key and Close button.
JIRA issue: CORE-19424
Insert a line of "case IDCANCEL:".
2024-01-14 20:48:34 +09:00
Timo Kreuzer
92db51883a [MSVCRT] Add asm wrapper around RtlUnwind for Wine code
This is needed, because Wine code expects RtlUnwind to restore the non-volatile registers, before returning, but ours / the native one doesn't do that.
Should fix CORE-19392 and CORE-19397
2024-01-13 19:39:23 +02:00
Timo Kreuzer
d52b70a73e [NTDLL_APITEST] Add test for x86 RtlUnwind 2024-01-13 19:39:23 +02:00
Hervé Poussineau
382836f087 [TCPIP] Remove code duplication to get max link speed, MTU and max packet size
This is already done when link goes up, in ReconfigureAdapter() function.
2024-01-13 15:23:46 +01:00
Hervé Poussineau
89b685007a [TCPIP] Call netif_set_link_up/netif_set_link_down after link status change
- Update TCP cached information only after updating adapter information
  (so that TCPUpdateInterfaceIPInformation/TCPUpdateInterfaceLinkStatus
  gets new status)
- Call netif_set_link_up/netif_set_link_down in TCPUpdateInterfaceLinkStatus

This fixes a lwIP requirement:
  2007-07-13 Jared Grubb (integrated by Frédéric Bernon)
  * [...] Be carefull for port maintainers to add the NETIF_FLAG_LINK_UP
    flag (like in ethernetif.c) if you want to be sure to be compatible with
    future changes...
2024-01-13 15:23:46 +01:00
Hervé Poussineau
3e3d34d97b [TCPIP] Get max link speed, MTU and max packet size when adapter is connected 2024-01-13 15:23:46 +01:00
Timo Kreuzer
4c9037fff1 [CRT_APITEST] Fix some Vista+ tests 2024-01-13 15:15:47 +02:00
Katayama Hirofumi MZ
d6b5c19233 [SDK] cicuif.h: Add CUIFToolbarButton (#6338)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CUIFToolbarButton class.
2024-01-13 18:21:03 +09:00
Katayama Hirofumi MZ
fa2715fb6b [SDK] cicuif.h: Add CUIFToolbarMenuButton (#6336)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CUIFToolbarMenuButton class.
- Add CUIFToolbarButtonElement class.
2024-01-13 16:02:36 +09:00
Thomas Faber
286d460b45 [CRTDLL_APITEST] Oops. Fix that other compiler. CORE-16933 2024-01-12 12:58:27 -05:00
Thomas Faber
c8aba5a172 [CRT_APITEST] Add tests for _mbsncmp and _mbsstr. CORE-16933 2024-01-12 12:36:43 -05:00
Katayama Hirofumi MZ
4490a053d0 [SHELL32] Improve error message on copying files (#6290)
Based on KRosUser's copyerrorfix.patch.
JIRA issue: CORE-19414
- If feFrom->szFilename was empty,
  then use feFrom->szFullPath instead.
2024-01-12 16:01:21 +09:00
Katayama Hirofumi MZ
f51258ae51 [SDK] cicuif.h: Reduce magic numbers (#6334)
Improve human readability.
JIRA issue: CORE-19360
- Define some flags of m_style.
- Define some flags of dwDrawFlags.
- Reduce some magic numbers.
2024-01-12 13:40:28 +09:00
Katayama Hirofumi MZ
4287f07c75 [SDK] cicuif.h: Add CUIFGripper (#6332)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CUIFGripper class.
2024-01-11 22:09:19 +09:00
Muhammad Faathin Abdurrahman
5391eaadff [KERNEL32] OpenFile(): Use InitializeObjectAttributes (#6323)
Use InitializeObjectAttributes macro instead of initializing the members manually.
2024-01-11 12:31:12 +01:00
Adam Słaboń
8d1beca119 [NTOSKRNL_VISTA] IoQueueWorkItemEx: Pass new context for the queue (#6276)
Passing parameter-provided context results in missing WorkerRoutine and WorkItem when callback is executed.
2024-01-11 12:29:53 +01:00
Jose Carlos Jesus
2f2167abb0 [BOOTDATA] Add Portuguese (pt-PT) translation to hivecls.inf (#6218) 2024-01-11 11:59:11 +01:00
Katayama Hirofumi MZ
74ff3844cc [SDK] cicuif.h: Add CUIFButton2 (#6331)
Supporting TIPs...
JIRA issue: CORE-19360
- Improve CUIFScheme class.
- Add CUIFButton2 class.
2024-01-11 18:44:43 +09:00
Katayama Hirofumi MZ
5719896650 [SDK] cicuif.h: Refactoring Part 2 (#6330)
Supporting TIPs...
JIRA issue: CORE-19360
- Fix some mistakes of
  CUIFButton::OnMouseIn and
  CUIFButton::OnMouseOut.
- Fix some mistakes of CUIFObject
  and CUIFWindow.
2024-01-10 13:13:21 +09:00
Katayama Hirofumi MZ
e694e24720 [RAPPS] Don't download database at startup if appwiz mode (#6319)
Providing quick access of Control
Panel "Add/Remove Programs".
JIRA issue: CORE-19419
- Don't download the database if
  bAppwizMode in ParseCmdAndExecute
  function.
- Add CAppDB::GetAvailableCount method.
- Add CMainWindow::CheckAvailable method.
- Use CMainWindow::CheckAvailable in
  some cases of TVN_SELCHANGED handling.
2024-01-10 11:36:30 +09:00
Katayama Hirofumi MZ
d3ae8258c2 [SDK] cicuif.h: Add CUIFSchemeDef (#6329)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CUIFSchemeDef class.
- Improve CUIFWindow class.
2024-01-10 11:25:59 +09:00
Katayama Hirofumi MZ
9a9b22aac1 [NTUSER] Check class name existence on IntGetAtomFromStringOrAtom (#6184)
Based on I_Kill_Bugs' class_error.patch.
JIRA issue: CORE-13422, CORE-7531, CORE-18639
2024-01-10 08:01:37 +09:00
Katayama Hirofumi MZ
8b5c5fb913 [SDK] cicuif.h: Refactoring (#6321)
Improve readability and reduce code.
JIRA issue: CORE-19268
- Delete cicSetLayout function and
  use gdi32!SetLayout function directly.
- Don't use ::SetRect and ::SetRectEmpty.
- s/CUIFButton::m_dwUnknown10/CUIFButton::m_bPressed/.
- Reduce lines.
2024-01-10 03:05:38 +09:00
Katayama Hirofumi MZ
3299e96e91 [SHELL32] SHFileOperation: Fail elegantly if source doesn't exist (#6318)
Based on KRosUser's dragdropfixpart2.patch.
JIRA issue: CORE-19417, CORE-19211
- Check source file existence.
2024-01-09 19:38:34 +09:00
Andrei Miloiu
f105b50c4f [ZIPFLDR] Update Romanian (ro-RO) translation (#6271) 2024-01-09 11:12:01 +01:00
Andrei Miloiu
22ca537be3 [WLDAP32] Improve Romanian (ro-RO) translation (#6275) 2024-01-09 11:11:04 +01:00
Andrei Miloiu
114ef5f14a [CMD] Update Romanian (ro-RO) translation (#6277) 2024-01-09 11:10:35 +01:00
Andrei Miloiu
fe2f718bf2 [NEWDEV] Update Romanian (ro-RO) translation (#6278) 2024-01-09 11:09:37 +01:00
Andrei Miloiu
30ded664fc [RAPPS] Improve Romanian (ro-RO) translation (#6279) 2024-01-09 11:08:53 +01:00
Andrei Miloiu
7aa48a3824 [TASKKILL] Update Romanian (ro-RO) translation (#6282) 2024-01-09 11:07:31 +01:00
Andrei Miloiu
290f6a5ad0 [FORMAT] Update Romanian (ro-RO) translation (#6283) 2024-01-09 11:07:08 +01:00
Andrei Miloiu
8f62437352 [CRYPTUI] Update Romanian (ro-RO) translation (#6292) 2024-01-09 11:05:54 +01:00
Andrei Miloiu
ba7c50edce [OLEDLG] Update Romanian (ro-RO) translation (#6293) 2024-01-09 11:05:31 +01:00
Andrei Miloiu
cf2c1e93a5 [IPCONFIG] Update Romanian (ro-RO) translation (#6294) 2024-01-09 11:05:01 +01:00
Andrei Miloiu
97e45e2ad1 [ACPPAGE] Update Romanian (ro-RO) translation (#6296) 2024-01-09 11:04:41 +01:00
Andrei Miloiu
5bc6fe88e8 [RASDLG] Update Romanian (ro-RO) translation (#6298) 2024-01-09 11:04:05 +01:00
Andrei Miloiu
3f6c57279d [MSCONFIG_NEW] Update Romanian (ro-RO) translation (#6299) 2024-01-09 11:03:37 +01:00
Andrei Miloiu
25ca5ea537 [MODEMUI] Update Romanian (ro-RO) translation (#6300) 2024-01-09 11:03:12 +01:00
Andrei Miloiu
22719c8097 [DESK] Update Romanian (ro-RO) translation (#6301) 2024-01-09 11:02:41 +01:00
Andrei Miloiu
9b2627f4ba [DISKPART] Update Romanian (ro-RO) translation (#6303) 2024-01-09 11:01:59 +01:00
Andrei Miloiu
5adb252fea [OPENGLCFG] Update Romanian (ro-RO) translation (#6304) 2024-01-09 11:01:30 +01:00
Andrei Miloiu
84de569349 [WINMM] Update Romanian (ro-RO) translation (#6309) 2024-01-09 11:00:42 +01:00
Andrei Miloiu
4d0080db9b [INF] Update Romanian (ro-RO) translation (#6310) 2024-01-09 11:00:25 +01:00
Andrei Miloiu
8a5fe3818e [MSCONFIG_NEW] Update Romanian (ro-RO) translation (#6311) 2024-01-09 10:58:40 +01:00
Katayama Hirofumi MZ
0b3756044f [MSCTFIME][MSUTB][SDK] cicuif.h: Add CUIFButton (#6320)
Supporing TIPs...
JIRA issue: CORE-19268
- Add CUIFButton, CUIFSolidBrush, and CUIFIcon classes.
2024-01-09 16:57:30 +09:00
Whindmar Saksit
55a5d7a177 [SHELL32] RegFolder must correctly handle GetDisplayNameOf parsing paths (#6265) 2024-01-08 17:02:59 +01:00
Whindmar Saksit
7c2e8c67f1 [CONSRV] Don't blink cursor if the console window is not active (#5601)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2024-01-08 13:49:28 +01:00
Katayama Hirofumi MZ
710df1361c [COMCTL32] ToolTip: Expand tabs (#6315)
Based on KRosUser's tooltip_tabfix.patch.
ToolTip should expand tabs.
JIRA issue: CORE-5635, CORE-13651
- Add DT_EXPANDTABS flag for DrawText.
2024-01-08 19:51:42 +09:00
Katayama Hirofumi MZ
4ee54e2519 [SDK] cicuif.h: Add CUIFToolTip (#6317)
Supporting TIPs...
JIRA issue: CORE-19360
- Half-implement CUIFToolTip.
- Strengthen some classes.
2024-01-08 16:44:38 +09:00
Katayama Hirofumi MZ
7898297c53 [SDK] cicuif.h: Add CUIFShadow (#6316)
Supporting TIPs...
JIRA issue: CORE-19360
- Half-implement CUIFShadow class.
2024-01-08 12:52:37 +09:00
Timo Kreuzer
9be24a9d51 [CMAKE] Add GCC options to make a long double 64 bits
This adds -mlong-double-64 to make the size of a long double 64 bits in GCC builds to match MSVC builds.
2024-01-07 11:03:08 +02:00
Katayama Hirofumi MZ
469e7c6d4e [SDK] cicuif.h: Add CUIFWindow (#6313)
Supporting TIPs...
JIRA issue: CORE-19360
- Strengthen CUIFObject.
- Add CUIFWindow.
2024-01-07 16:49:31 +09:00
Andrei Miloiu
55bc06fa7a [LABEL] Update Romanian (ro-RO) translation (#6258) 2024-01-06 23:01:23 +01:00
Andrei Miloiu
0103c55fa8 [IPCONFIG] Update Romanian (ro-RO) translation (#6281) 2024-01-06 22:58:31 +01:00
Andrei Miloiu
d882d57046 [APPWIZ] Improve Romanian (ro-RO) translation (#6272) 2024-01-06 22:56:56 +01:00
Andrei Miloiu
048ea61adb [SHUTDOWN] Update Romanian (ro-RO) translation (#6264) 2024-01-06 22:47:08 +01:00
Andrei Miloiu
f320804f24 [MSI] Update Romanian (ro-RO) translation (#6260) 2024-01-06 22:46:33 +01:00
Andrei Miloiu
166d9c8ac1 [DESKMON] Update Romanian (ro-RO) translation (#6257) 2024-01-06 22:27:19 +01:00
Andrei Miloiu
eba2a77baf [MSPORTS] Update Romanian (ro-RO) translation (#6256) 2024-01-06 22:26:42 +01:00
Andrei Miloiu
7ce3f91993 [ACCESS] Update Romanian (ro-RO) translation (#6255) 2024-01-06 22:25:32 +01:00
Andrei Miloiu
37344a6dfc [INTL] Update Romanian (ro-RO) translation (#6247) 2024-01-06 22:25:04 +01:00
Andrei Miloiu
4a68b08198 [FONTVIEW] Update Romanian (ro-RO) translation (#6245) 2024-01-06 22:24:12 +01:00
Andrei Miloiu
acf170c95d [MSPAINT] Update Romanian (ro-RO) translation (#6241) 2024-01-06 22:22:43 +01:00
Andrei Miloiu
44fa14b337 [NETSHELL] Update Romanian (ro-RO) translation (#6246) 2024-01-06 22:19:00 +01:00
Andrei Miloiu
7c5204b9b2 [REGEDIT] Update Romanian (ro-RO) translation (#6223) 2024-01-06 22:18:17 +01:00
Katayama Hirofumi MZ
bf92fa2386 [MSCTFIME][MSUTB][SDK] Add cicInitUIFLib and cicDoneUIFLib (#6307)
Supporting TIPs...
JIRA issue: CORE-19360
- Implement cicInitUIFLib and cicDoneUIFLib functions.
- Use them in msctfime and msutb.
- Add CUIFSystemInfo class in <cicero/cicuif.h>.
2024-01-06 19:21:37 +09:00
Katayama Hirofumi MZ
afb132a90b [SDK] cicuif.h: Add CUIFBitmapDC (#6306)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CUIFBitmapDC class.
- Add cicInitUIFUtil and
  cicDoneUIFUtil functions.
- Add cicSetLayout, cicMirrorBitmap,
  cicCreateDitherBrush,
  cicCreateDisabledBitmap,
  and cicCreateShadowMaskBmp
  utility functions.
2024-01-06 17:44:57 +09:00
Katayama Hirofumi MZ
46cf45414c [SDK] cicuif.h: Add CUIFColorTable (#6305)
Supporting TIPs...
JIRA issue: CORE-19360
- Improve cicGetFN function.
- Add CUIFColorTable, CUIFColorTableSys,
  and CUIFColorTableOff10 classes.
- Implement cicInitUIFScheme,
  cicUpdateUIFScheme, and
  cicDoneUIFScheme functions.
2024-01-06 14:45:23 +09:00
Katayama Hirofumi MZ
d689cfe158 [SHELL32] Don't crash on Control Panel item D&D (#6289)
Based on @douglyons 's control-panel-copy-to-desktop-fix.patch.
JIRA issue: CORE-19210
- Delete needless #ifdef __REACTOS__ guards because
  shlfileop.cpp is a forked file.
- Do NULL check against feFrom->szFilename.
2024-01-06 11:00:36 +09:00
Katayama Hirofumi MZ
8d7a8f0ec1 [DESK] Find best display settings (#6288)
Based on KRosUser's desk.patch.
JIRA issue: CORE-18187, CORE-16878
- Add FindBestElement helper function.
- Use FindBestElement to find the best
  display settings.
2024-01-06 10:59:05 +09:00
Katayama Hirofumi MZ
267a1c9cda [MSCTFIME] Reduce comment lines (#6297)
Improve readability.
JIRA issue: CORE-19360
- Reduce the lines of comments
  by using C++ comments.
2024-01-05 18:36:30 +09:00
Katayama Hirofumi MZ
6df2af2610 [SDK] Add CUIFObject and CUIFObjectArray (#6295)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CUIFObjectArray and CUIFObject classes.
- Strenthen CicArray and CUIFTheme classes.
2024-01-05 17:43:06 +09:00
Thamatip Chitpong
90ed686209 [NTUSER] Use UserHMGetHandle macro (#6244)
Use UserHMGetHandle macro everywhere instead of obj->head.h for consistency.
2024-01-05 07:16:44 +07:00
Katayama Hirofumi MZ
90432c1a4c [COMCTL32][USER32] EDIT & ListView & TreeView: Fix HRGN leaks (#6268)
Based on KRosUser's memleak_comctl32.patch.
JIRA issue: CORE-19405
Fix HRGN handle leaks.
2024-01-04 18:05:39 +09:00
Katayama Hirofumi MZ
77c5aea41f [MSCTFIME][SDK] Add <cicero/cicuif.h> (#6291)
Supporting TIPs...
JIRA issue: CORE-19360
- Add cicGetFN helper function
  in <cicero/cicbase.h>.
- Add <cicero/cicuif.h>.
- Add CUIFTheme class in
  <cicero/cicuif.h>.
2024-01-04 17:32:43 +09:00
Katayama Hirofumi MZ
35f83286c5 [MSCTFIME][SDK] Implement CicCaret class (#6287)
Supporting TIPs... UIComposition class requires a caret class.
JIRA issue: CORE-19360
- Add <cicero/ciccaret.h> header.
- Add CicCaret class for displaying a caret.
2024-01-03 19:55:14 +09:00
Katayama Hirofumi MZ
b48e77e15b [CTFMON][MSCTFIME][SDK] Define new(cicNoThrow) and use it (#6286)
Use new(cicNoThrow) instead of plain operator new.
JIRA issue: CORE-19360
- Define CicNoThrow structure and
  cicNoThrow macro in <cicero/cicbase.h>.
- Use new(cicNoThrow) instead of
  plain operator new.
2024-01-03 16:45:23 +09:00
Katayama Hirofumi MZ
6cde331a89 [MSCTFIME] Half-implement UIWndProc (#6285)
Supporting TIPs...
JIRA issue: CORE-19360
- Add UIComposition and UI classes.
- Add CIMEUIWindowHandler structure.
- Half-implement UIWndProc by using them.
2024-01-03 13:52:54 +09:00
Katayama Hirofumi MZ
0e9939bd42 [MSCTFIME] Implement CTextEventSink::_Advise and _Unadvise (#6284)
Supporting TIPs...
JIRA issue: CORE-19360
2024-01-03 10:50:48 +09:00
Katayama Hirofumi MZ
b59bf8a3f4 [COMCTL32][USER32] ComboBox: Don't close listbox on letter type (#6227)
Based on KRosUser's combo_v3.patch.
JIRA issue: CORE-16376
- Set CBF_NOROLLUP flag on (WM_CHAR or
  WM_IME_CHAR) and CBF_DROPPED state.
2024-01-03 08:45:24 +09:00
Katayama Hirofumi MZ
006bdfa234 [MSCTFIME][SDK] Half-implement CTextEventSink (#6274)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CTextEventSink class.
- Add ITfTextLayoutSink interface
  into "msctf.idl".
2024-01-02 19:45:03 +09:00
Katayama Hirofumi MZ
f9489f4876 [MSCTFIME] Strengthen CicInputContext (#6273)
Supporting Text Input Processors (TIPs)...
JIRA issue: CORE-19360
2024-01-02 15:33:37 +09:00
Katayama Hirofumi MZ
88107adc92 [MSCTFIME][SDK] Implement CFunctionProvider (#6269)
Supporting TIPs...
JIRA issue: CORE-19360
Define CFunctionProviderBase class.
Define CFunctionProvider class.
Strengthen <cicero/cictf.h>.
2024-01-01 16:36:49 +09:00
Katayama Hirofumi MZ
e5548aa501 [MSCTFIME][SDK] Improve human readability (#6240)
Improve code quality.
JIRA issue: CORE-19360
- Add some SAL annotations.
- Add readable comments more.
- Rename some member variables.
2024-01-01 11:05:49 +09:00
Katayama Hirofumi MZ
d6c70f0864 [COMCTL32][USER32] RadioButton: Notify BN_CLICKED on WM_SETFOCUS (#6266)
Based on KRosUser's button_fixnotif.patch.
JIRA issue: CORE-6542, CORE-19384
Notify BN_CLICKED to the parent on WM_SETFOCUS message
handling if the button type was either BS_RADIOBUTTON or
BS_AUTORADIOBUTTON, and if the button was unchecked.
2024-01-01 11:01:59 +09:00
Katayama Hirofumi MZ
a842a92260 [RAPPS] Don't ask for 'remote from registry' when no selection (#6267)
Based on KRosUser's RAPPS.patch.
JIRA issue: CORE-19409
If m_ApplicationView->GetFocusedItemData was NULL, then do not ask for removal.
2024-01-01 10:12:51 +09:00
Hermès Bélusca-Maïto
a70ce994f0 🎊 🍾 🥳 Happy New Year 2024 to the ReactOS Community! 🎆 ⚛️ ☢️
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.██████╗  ██████╗ ██████╗ ██╗  ██╗
 __,  ,__)            __,  ,__)       __, ,__)         ╚════██╗██╔═████╗╚════██╗██║  ██║
(--|__| _ ,_ ,_      (--|\ | _       (--\ | _  _ ,_     █████╔╝██║██╔██║ █████╔╝███████║
  _|  |(_||_)|_)(_|    _| \|(/_(_|_)     \|(/_(_||     ██╔═══╝ ████╔╝██║██╔═══╝ ╚════██║
 (        |  |  ,_|   (                (__|            ███████╗╚██████╔╝███████╗     ██║
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.╚══════╝ ╚═════╝ ╚══════╝     ╚═╝
2024-01-01 00:00:00 +01:00
Eric Kohl
f5346cbc1b [ADVAPI32][IDL][SERVICES] Implement I_ScValidatePnPService
This is actually a Vista+ function, but we need it enable umpnpmgr.dll to notify services of device events. Up until WinXP it was possible to make direct calls to the service manager by umpnpmgr.dll because umpnpmgr.dll was loaded into the service manager process. From Vista onwards umpnpmgr.dll is run as a separate service host process. And since ReactOS always ran umpnpmgr.dll as a separate process, we have to use the Vista RPC functions to notify services.
2023-12-31 15:33:19 +01:00
Timo Kreuzer
10bb50b456 [HAL] Fix SMP initialization
- Don't use CONFIG_SMP, this isn't handled in (most of) hal
- Add a dummy HalpSetupProcessorsTable for UP
- Call HalpRegisterKdSupportFunctions only for processor 0
2023-12-30 12:53:18 +02:00
Timo Kreuzer
86b82e4ce7 [CRT] Sync $I10_OUTPUT and test with wine head
Both were broken on MSVC builds, where a long double is 64 bits and not 80 bits like on GCC. The new code works on MSVC builds, too.
2023-12-30 12:51:22 +02:00
Katayama Hirofumi MZ
40131fd1ca [WINHLP32] Don't show file path in title (#6250)
Based on KRosUser's winhlp.patch. This PR will supersede #5401.
JIRA issue: CORE-18679
Just copy help file title.
2023-12-29 21:16:20 +09:00
hpoussin
9cfd8dd918 [LWIP] Correctly synchronize to lwIP 1.4.1 (#6123)
* [TCPIP] Rename lwip library to lwipcore

* [TCPIP] Remove ReactOS-specific code from LWIP library

* [TCPIP] Synchronize LWIP code to 1.4.1

Update to LWIP 1.4.1 should have been done by bd3b0e8ef4
However, I was unable to find the exact revision used in this commit.

So, do the following
- take code from STABLE-1_4_1 commit on https://git.savannah.gnu.org/git/lwip.git
- cherry-pick LWIP 32aa9a41e2013e5ee6eee09317a848647e37badf (CORE-8978)
- cherry-pick LWIP c0b534e5318baf870e2152c70d4d11a3a86181f3
- add a ReactOS-specific change in src/api/tcpip.c (missing include)
- add ReactOS specific file CMakeLists.txt

NOTE: Changes are mostly in unit test files (not used) and CHANGELOG file.

CORE-7140
2023-12-29 13:05:41 +01:00
Katayama Hirofumi MZ
d8108a64a4 [COMDLG32] Color Picker: Fix black cross (#6242)
JIRA issue: CORE-19403, CORE-19405
- Fix HRGN handle leak.
- Fix black cross coordinates.
2023-12-29 20:58:51 +09:00
Katayama Hirofumi MZ
8e01ab830b [IMM32] Disable some annoying logging (#6249)
@HBelusca said in ReactOS Chat:

> hi, is it possible to disable those two dprints?
> err:(../dll/win32/imm32/imm.c:949) pIMC was NULL
> err:(../dll/win32/imm32/imm.c:849) pClientImc was NULL
> they come out every other second of usage of any app in ReactOS.

JIRA issue: CORE-19268
Disable logging on two points by not using IS_NULL_UNEXPECTEDLY macro.
2023-12-29 20:57:27 +09:00
Katayama Hirofumi MZ
1aeac0bf24 [REGEDIT] Fix condition of enabling load/unload hive menu item (#6251)
Based on KRosUser's regedit_loadfix.patch.
JIRA issue: CORE-19298
Fix the condition of enabling/disabling the
"Load Hive" and Unload Hive menu items.
2023-12-29 20:56:01 +09:00
Katayama Hirofumi MZ
d46d3167a3 [SHELL32] Fix status bar part sizes (#6243)
Based on KRosUser's cdefview_fixstatus.patch.
JIRA issue: CORE-19406
In CDefView::OnSize, call _ForceStatusBarResize function
instead of _HandleStatusBarResize function.
2023-12-29 13:34:23 +09:00
Hermès Bélusca-Maïto
b5f9e1c2dc [PSDK] ntddvdeo.h: Add missing GUIDs.
References:
- MS WDK from Windows 2k3, 7, 10.
- https://naughter.wordpress.com/2016/08/20/changes-in-the-windows-v10-0-14393-sdk-compared-to-windows-v10-0-10240-sdk-part-one/
2023-12-28 22:11:05 +01:00
Hermès Bélusca-Maïto
6c93f3ca6b [MSI_WINETEST][BASEADDRESS] Rename the 'custom' and 'selfreg' build targets.
They are renamed to 'msi_custom' and 'msi_selfreg', respectively.
This is to avoid any future build target name collisions with other
tests that would also use similarly-named targets. (For example, a
future setupapi wine-synced commit.)
2023-12-27 21:50:32 +01:00
Katayama Hirofumi MZ
73a1c9d418 [MSCTFIME][SDK] Implement CtfImeSelectEx (#6238)
Supporting TIPs...
JIRA issue: CORE-19360
- Add GetCharsetFromLangId and
  InternalSelectEx helper functions.
- Add CicBridge::GetInputContext
  and CicBridge::SelectEx.
- Implement CtfImeSelectEx function.
- CTFIMECONTEXT structure moved
  into <cicero/cicimc.h>.
2023-12-27 20:29:02 +09:00
Katayama Hirofumi MZ
d528cc4013 [MSCTFIME][SDK] Implement CicBridge::ActivateIMMX etc. (#6237)
Supporting TIPs...
JIRA issue: CORE-19360
- Implement CicBridge::ActivateIMMX and
  CicBridge::DeactivateIMMX functions.
2023-12-27 16:19:47 +09:00
Katayama Hirofumi MZ
b9e8fb9ea4 [MSCTFIME][SDK] Implement CtfImeProcessCicHotkey (#6236)
Supporting TIPs...
JIRA issue: CORE-19360
- Define ITfSysHookSink and IID_ITfThreadMgr_P
  interfaces in <cicero/cictf.h>.
- Implement CtfImeProcessCicHotkey function.
2023-12-27 15:08:17 +09:00
Katayama Hirofumi MZ
cfff2dbd12 [MSCTF] Implement InitCUASFlag (#6235)
Implementing TIPs and Language Bar...
JIRA issue: CORE-19361
- Add InitCUASFlag function.
- Use it in ProcessAttach function.
2023-12-27 12:32:01 +09:00
Katayama Hirofumi MZ
ec0695c26b [MSCTF][SDK] Implement InitLangChangeHotKey (#6234)
Supporting TIPs and Language Bar...
JIRA issue: CORE-19361
- Implement InitLangChangeHotKey function.
- Add some global variables about hot-keys.
- Fix CicRegKey in <cicero/cicreg.h>.
2023-12-27 11:43:01 +09:00
Katayama Hirofumi MZ
7f1df040ed [COMDLG32] Color Picker: Limit value by maxval (#6225)
Set maximum value to value if
value was beyond maximum value.
CORE-19402
2023-12-26 21:50:41 +09:00
Katayama Hirofumi MZ
6e5fde7ebb [COMCTL32] Property Sheet: Use PROPSHEET_IsDialogMessage in message loop (#6226)
Fix Ctrl+Tab and Shift+Ctrl+Tab key
combination action in property sheet.
JIRA issue: CORE-17941
Use PROPSHEET_IsDialogMessage in
the message loop of PropertySheetA/W
function, instead of IsDialogMessage.
2023-12-26 21:49:04 +09:00
Katayama Hirofumi MZ
449a08a6a8 [COMDLG32] Fix IDC_TOOLBARPLACES size (#6228)
Based on KRosUser's comdlg_resbug.patch.
Change IDC_TOOLBARPLACES control
extent of NEWFILEOPENV2ORD
resource dialog.
CORE-16925
2023-12-26 21:46:35 +09:00
Katayama Hirofumi MZ
07a22af58b [MSCTF][SDK] Implement TF_IsCtfmonRunning (#6233)
- Add many global variables.
- Add GetUserSIDString, InitUserSidString,
  InitUniqueString, and
  GetDesktopUniqueName helper functions.
- Implement TF_IsCtfmonRunning function.
- Fix CicFileMapping class in
  <cicero/cicfmap.h>.
- Modify msctf.spec.
- Half-implement ProcessAttach and
  ProcessDetach functions.
CORE-19361
2023-12-26 16:17:06 +09:00
Katayama Hirofumi MZ
4293704ecb [CTFMON] Unlink RegNotifyChangeKeyValue (#6232)
Dynamic load advapi32!RegNotifyChangeKeyValue function.
Output log if RegNotifyChangeKeyValue failed.
CORE-19362
2023-12-26 15:21:39 +09:00
Katayama Hirofumi MZ
69a925cae8 [MSCTF] Implement TF_RunInputCPL (#6231)
- Add FullPathExec, and RunCPLSetting
  helper functions.
- Implement TF_RunInputCPL function
  by using them.
- Modify msctf.spec.
CORE-19361
2023-12-26 13:39:56 +09:00
Katayama Hirofumi MZ
bfa3e554d4 [CTFMON][MSCTFIME][MSCTF][MSUTB][SDK] Cicero is ANSI, not Unicode (#6230)
Cicero interface is not Unicode (W)
but ANSI (A).
- ctfmon.exe is ANSI, not Unicode.
- msutb.dll is ANSI, not Unicode.
- Apply generic text mapping to the
  cicero headers.
- Include <tchar.h> to use generic
  text mapping.
CORE-19361, CORE-19362, CORE-19363
2023-12-26 12:07:01 +09:00
Katayama Hirofumi MZ
a8a4703699 [MSCTF][SDK] Implement TF_RegisterLangBarAddIn etc. (#6229)
- Add dll/win32/msctf/utils.cpp.
- Implement TF_RegisterLangBarAddIn
  and TF_UnregisterLangBarAddIn.
- Strengthen <cicero/cicreg.h>.
- Modify msctf.spec.
CORE-19361
2023-12-26 10:31:53 +09:00
Hermès Bélusca-Maïto
434ac241df [NTOS:INBV:PO] Consolidate shutdown logo routines where all the boot theming is implemented.
And it's late now, but... Merry Christmas 2023 as well! 🎄
Logo design by contributor 'TheCustomFHD'

"From ReactOS with Love" ;^)
2023-12-25 21:43:20 +01:00
Katayama Hirofumi MZ
f4460c3fcd [CTFMON][MSCTF][MSUTB][SDK] Add msutb.dll (stub) (#6222)
msutb.dll is the GUI back-end
of Language Bar (Tipbar).
- Add msutb.dll module at
  dll/win32/msutb/.
- The implementation of
  msutb.dll is currently stub.
- Modify msctf.spec and msctf.idl.
- Add <cicero/cicutb.h>.
- Adapt ctfmon.exe to these changes.
CORE-19362, CORE-19363
2023-12-25 22:29:57 +09:00
Katayama Hirofumi MZ
5d9f622eeb [SHLWAPI] Fix SHCreateMemStream corner case (#6224)
When the system run out of memory,
check NULL and fail elegantly if
necessary.
This doesn't fix CORE-19229 but I
think it needs a fix.
CORE-19229
2023-12-25 08:22:08 +09:00
Hermès Bélusca-Maïto
6d265d1fd8 [NTOS:INBV] Isolate the bitmap resources pertaining to the boot theme/animation into their resource sub-file. 2023-12-24 22:39:36 +01:00
Hermès Bélusca-Maïto
0f3da97456 [NTOS:KE:EX] Fix comment typo. 2023-12-24 22:39:35 +01:00
Hermès Bélusca-Maïto
7b410fb8ca [NTOS:INBV] Don't hardcode the off-screen rot-bar-bits buffer size. 2023-12-24 21:54:24 +01:00
Hermès Bélusca-Maïto
81dc30a434 [NTOS:INBV] Improve comment & define name. 2023-12-24 21:54:23 +01:00
Hermès Bélusca-Maïto
7aec73a76c [NTOS:INBV] Minor code style. 2023-12-24 21:54:16 +01:00
Hermès Bélusca-Maïto
7b956a0a1f [BOOTVID] Fix definition of GetFontPtr(). 2023-12-24 21:41:09 +01:00
Hermès Bélusca-Maïto
3812996042 [NTOS:INBV] Fix build when INBV_ROTBAR_IMPLEMENTED is not defined. 2023-12-24 21:40:36 +01:00
Thamatip Chitpong
f74a2aac8c [NTUSER] Add UserHMSetHandle macro (#6164) 2023-12-24 23:42:15 +07:00
Katayama Hirofumi MZ
758fff284d [COMDLG32] Color Picker: Fix cursor clipping (#6219)
- ClipCursor(NULL) for WM_LBUTTONUP
  and WM_NCDESTROY.
- ClipCursor(...) for WM_LBUTTONDOWN.
CORE-17002
2023-12-24 22:10:26 +09:00
Katayama Hirofumi MZ
4a3a78857f [SDK] Add <cicero/cicfmap.h> for File Mapping
CORE-19361
2023-12-24 11:50:11 +09:00
Elliot Killick
932aef40f7 [LDR][NDK] Fix inconsistent Cookie type (#6188)
Make LdrUnlockLoaderLock Cookie type consistent with LdrLockLoaderLock
and LdrpMakeCookie functions.

In addition:
* Adjustment of the formatting string for ULONG_PTR;
* ntdll.spec: specify ptr for 2nd parameter of LdrUnlockLoaderLock:
  This is a parameter whose length is pointer-like, platform-dependent.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2023-12-23 22:13:47 +01:00
Adam Słaboń
fcaa38c705 [NETKVM] Don't restrict driver setup to x86 builds (#6221) 2023-12-23 22:00:34 +01:00
Whindmar Saksit
83bc98f96a [DESK] Remember icon picker custom colors between invocations (#6215)
This makes editing a theme slightly less annoying, if you can define custom colors.
2023-12-23 22:00:11 +01:00
Serge Gautherie
48909364db [REGEDIT] *.rc: Fix 3 caption copy-pastas (#6212)
Addendum to commit 54adb5e45
2023-12-23 21:53:17 +01:00
Serge Gautherie
df81dadd9c [UMPNPMGR] PNP_RegisterNotification(): Fix a string format (#6211)
Type was changed from DWORD to DWORD_PTR (as handle).
Addendum to commit 71df39b02
2023-12-23 21:50:47 +01:00
Serge Gautherie
ffc99d08e8 [SETUPAPI] CMP_RegisterNotification(): Remove useless/broken check (#6210)
Revert new broken check from commit  b0a73746c,
and even remove initial a6eabc004 (r73394) useless check.
2023-12-23 21:49:47 +01:00
Serge Gautherie
8943354d17 [SETUPAPI] cfgmgr.c: Remove 5 useless '= NULL' initializations (#6209) 2023-12-23 21:38:36 +01:00
Serge Gautherie
74a82c831b [SETUPAPI] CMP_RegisterNotification(): Remove duplicated code (#6207)
Addendum to commit 9277f5352
2023-12-23 21:38:09 +01:00
Ratin Gao
ffb20d3330 [REACTOS] Fix typos (#6198)
- Adress -> Address
- Currupted -> Corrupted

3rd-party files are not modified.
2023-12-23 21:37:08 +01:00
Whindmar Saksit
f380a51040 [WSHOM.OCX] WshShell::Run intWindowStyle parameter is optional (#6180)
The last two parameters are optional, see
https://learn.microsoft.com/en-us/previous-versions/d5fk67ky(v=vs.85)

Test case:
```
' test.vbs
Set objShell = Wscript.CreateObject("Wscript.Shell")
objShell.Run "calc.exe" ' Should work because the arguments are optional
objShell.Run "winver.exe", invalidnumber ' Windows treats this as SW_HIDE because it can convert VT_EMPTY
objShell.Run "notepad.exe", "invalidnumber" ' Windows fails with error
```
2023-12-23 21:27:00 +01:00
Serge Gautherie
3558b7b985 [VFATFS] FATGetNextDirEntry(): Fix 1 MSVC 'warning C4267' (#6179)
Fix `warning C4267: '=': conversion from 'size_t' to 'USHORT', possible loss of data`
by explicitly casting to USHORT.
This is OK as the line immediately before NULL-terminates the buffer within boundary.

Addendum to commit 096a69471 (r6279).
2023-12-23 21:24:51 +01:00
Carl J. Bialorucki
77653462a9 [EXPLORER] Notification area icon improvements (#6169)
Automatically adjusts the spacing of the tray icons according to the small
or large taskbar icons setting. Also, a minor bug fix to the clock spacing
when switching between taskbar icon sizes.

CORE-19380

Update the ROS-specific CompactTrayIcons registry value from a binary
yes/no to have three states. The three states are as follows:

  0 (default) - Automatic. When small taskbar icons are used, the
  notification area will use compact tray icon spacing. When large
  taskbar icons are used, the notification area will use larger tray
  icon spacing. While no version of Windows behaves this way, I believe
  this is a smart default choice for ReactOS since users wanting large
  taskbar icons will generally expect larger tray icon spacing, while
  users with small taskbar icons may want more compact spacing.

  1 - Never Compact. Regardless of the taskbar icon size setting, the
  notification area will always use the larger spacing. This follows
  the behavior of Windows 7 and newer versions.

  2 - Always Compact. Regardless of the taskbar icon size setting, the
  notification area will always use the compact spacing. This follows
  the behavior of Windows Vista and older versions.

Fix a clock spacing bug that occurs when changing the taskbar size
before advancing to the next minute. The taskbar clock now adjusts
its spacing when the size of the taskbar changes.
2023-12-23 21:21:12 +01:00
Katayama Hirofumi MZ
f2d34ab4c9 [SDK] Add cicRealCoCreateInstance into <cicero/cicbase.h>
It looks like Cicero wants to hook CoCreateInstance.
CORE-19363
2023-12-23 11:02:40 +09:00
Katayama Hirofumi MZ
eb72347672 [CTFMON][MSCTFIME][SDK] Refactoring on Cicero design
CORE-19362
2023-12-23 09:34:41 +09:00
Katayama Hirofumi MZ
50755684cf [CTFMON][SDK] Move ClosePopupTipbar and GetPopupTipbar
Refactoring. CORE-19362
2023-12-23 08:27:47 +09:00
Katayama Hirofumi MZ
ac1a96477b [BROWSEUI] Clear pidlLastParsed on CAddressEditBox::Execute (#6183)
Based on KRosUser's gopidlparsed.patch.
Clear pidlLastParsed if necessary.
CORE-19019
2023-12-23 08:16:01 +09:00
Katayama Hirofumi MZ
19f3d6bd8d [MSCTFIME] Delay-import msctf, oleaut32, and imm32 (#6220)
Reduce DLL initialization cost.
- Delay-import msctf.dll, oleaut32.dll, and imm32.dll.
- Unlink comctl32.dll.
CORE-19360
2023-12-22 20:21:25 +09:00
Katayama Hirofumi MZ
1726ee83e7 [MSCTFIME][SDK] s/IMCCLock/CicIMCCLock/ and s/IMCLock/CicIMCLock/
Refactoring. CORE-19360
2023-12-22 14:52:49 +09:00
Katayama Hirofumi MZ
91b740f900 [SDK] Add <cicero/cicevent.h>
CORE-19361
2023-12-22 12:26:43 +09:00
Katayama Hirofumi MZ
eaa975c54e [SDK] Add <cicero/cicmutex.h>
CORE-19361
2023-12-22 12:13:27 +09:00
Katayama Hirofumi MZ
c4308d1e49 [CTFMON][MSCTFIME][SDK] Improve cicGetOSInfo
and s/OSINFO_/CIC_OSINFO/.
Adapt ctfmon and msctfime to these changes.
CORE-19360
2023-12-22 11:52:06 +09:00
Katayama Hirofumi MZ
96d525959b [BROWSEUI] Load settings on CInternetToolbar::OnContextMenu (#6182)
Based on KRosUser's go.patch.
CORE-19145
2023-12-22 06:57:33 +09:00
Thamatip Chitpong
986809c719 [NTUSER] menu.c: Fix readability after commit 1df52257
Add comments for default return value.
2023-12-22 00:22:07 +07:00
Николай Димитров
4514e91dd6 [TRANSLATION] Update and fix Bulgarian (bg-BG) translation (#5581)
NOTE: IDS_ADMINISTRATOR_NAME translation excluded for the time being.

It should be "Администратор", but bg-BG translation missing in samsrv.dll,
therefore don't translate it because otherwise this would introduce a mismatch
(samsrv falls back into english when translation is missing).

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2023-12-21 18:09:34 +01:00
Thamatip Chitpong
979551e33e [NTUSER] accelerator.c: Fix readability after commit 95657698
Add comments for default return value.
2023-12-22 00:01:02 +07:00
Thamatip Chitpong
26f8b97886 [NTUSER] window.c: Fix readability after commit 3f5fd1d0
Add comments for default return value.
2023-12-21 23:49:03 +07:00
Katayama Hirofumi MZ
34068456a5 [COMCTL32][USER32] EDIT control: Check bCaptureState on WM_CHAR (#6206)
Based on KRosUser's edit_v2.patch.
Edit control should stop processing
characters when left mouse button
is down.
If es->bCaptureState is set, then
ignore WM_CHAR message.
CORE-10259
2023-12-21 20:24:44 +09:00
Katayama Hirofumi MZ
df9c535542 [MSCTFIME][SDK] Improve CicArray (#6217)
- Add template type parameter.
- Use size_t for indexing instead of INT.
- Protect CicArray members.
- Adapt msctfime to new CicArray.
CORE-19360
2023-12-21 20:17:35 +09:00
Katayama Hirofumi MZ
7d6fc57ec9 [CTFMON][MSCTFIME][SDK] Renaming for Cicero (#6216)
Keep consistency with Cicero naming rule.
- s/CModulePath/CicSystemModulePath/.
- s/GetOSInfo/cicGetOSInfo/.
- s/IsWow64/cicIsWow64/.
- s/GetSystemModuleHandle/cicGetSystemModuleHandle/.
- s/LoadSystemLibrary/cicLoadSystemLibrary/.
- Move cicGetOSInfo and cicIsWow64
  to <cicero/cicbase.h>.
- Delete some Cicero headers.
- Adapt ctfmon and msctfime to
  these changes.
CORE-19360
2023-12-21 19:05:33 +09:00
Katayama Hirofumi MZ
814cb188c6 [MSCTFIME][SDK] Implement CicInputContext::OnCleanupContext (#6213)
- Strengthen CicInputContext class.
- Modify <cicero/imclock.h>.
- add __cxa_pure_virtual function.
CORE-19360
2023-12-21 16:23:23 +09:00
Thamatip Chitpong
533d877aaf [NTUSER] Remove RETURN() macro (#6194)
Remove macro definition and the remaining uses.
RETURN() macro is just a wrapper for goto, most of the time it makes the code more complicated than using goto directly.
2023-12-21 11:10:46 +07:00
Katayama Hirofumi MZ
f5b0c66a05 [SDK] msctf.idl: Add ITfCleanupContextSink
CORE-19360
2023-12-21 12:44:07 +09:00
Katayama Hirofumi MZ
3401a99e0f [MSCTFIME] Half-implement CicBridge::ActivateIMMX/DeactivateIMMX
CORE-19360
2023-12-21 12:02:21 +09:00
Katayama Hirofumi MZ
e6cb6d257a [MSCTFIME] Implement CicInputContext::GetGuidAtom
CORE-19360
2023-12-21 11:04:02 +09:00
Katayama Hirofumi MZ
ee73267db8 [MSCTFIME] Fix compartment code
Fix some mistakes. CORE-19360
2023-12-21 10:42:06 +09:00
Eric Kohl
9277f5352a [SETUPAPI] CMP_RegisterNotification: Do not fail if we cannot retrieve a window title 2023-12-20 15:20:01 +01:00
Eric Kohl
92942fbbd8 [IDL] Revert commit c03899fc 2023-12-20 15:13:40 +01:00
Eric Kohl
c03899fc7f [IDL] Add missing PNP_VETO_TYPE 2023-12-20 15:09:03 +01:00
Eric Kohl
71df39b027 [IDL][SETUPAPI][UMPNPMGR] Improve PNP_RegisterNotification
- The 2nd parameter is the handle to the recipient.
- The 8th parameter is the callers process id.
2023-12-20 14:49:30 +01:00
Katayama Hirofumi MZ
954598037f [MSCTFIME][SDK] Implement CCompartmentEventSink (#6205)
- Modify <cicero/cicbase.h> and
  <cicero/cicarray.h>.
- Add CCompartmentEventSink class.
CORE-19360
2023-12-20 22:01:39 +09:00
Katayama Hirofumi MZ
209e9a7c1d [SDK] Add <cicero/cicarray.h> and <cicero/cicreg.h>
CORE-19360
2023-12-20 20:49:21 +09:00
Katayama Hirofumi MZ
9d495475f0 [MSCTFIME][MSCTF][SDK] Add compartment helper functions (#6202)
- Implement GetCompartment,
  SetCompartmentDWORD,
  GetCompartmentDWORD,
  SetCompartmentUnknown, and
  ClearCompartment helper functions.
- Add TF_DllDetachInOther prototype
  to "msctf.idl".
CORE-19360
2023-12-20 17:51:37 +09:00
Katayama Hirofumi MZ
0d8e6e781c [MSCTFIME] Implemenet CicBridge::InitIMMX/UnInitIMMX (#6201)
- Define LIBTHREAD structure.
- Add InitDisplayAttrbuteLib and
  UninitDisplayAttrbuteLib helper functions.
- Define CThreadMgrEventSink class.
- Strengthen CicBridge class.
CORE-19360
2023-12-20 16:12:57 +09:00
Katayama Hirofumi MZ
0b7405abf2 [MSCTFIME] Implement CActiveLanguageProfileNotifySink (#6200)
- Add link to msctf.dll.
- Implement CActiveLanguageProfileNotifySink class.
- Strengthen CicProfile class.
CORE-19360
2023-12-20 12:29:03 +09:00
Katayama Hirofumi MZ
f889c29af6 [MSCTFIME] Fix build of #6197 (6c438e4) Part 2
Add link to oleaut32.dll.
CORE-19360
2023-12-19 20:10:53 +09:00
Katayama Hirofumi MZ
a449125692 [MSCTFIME] Fix build of #6197 (6c438e4)
CORE-19360
2023-12-19 19:36:53 +09:00
Katayama Hirofumi MZ
6c438e4530 [MSCTFIME] Implement ImeConfigure (#6197)
Add code to CicInputContext and CicBridge classes.
Implement ImeConfigure function by using them.
CORE-19360
2023-12-19 19:23:52 +09:00
Katayama Hirofumi MZ
dfd6d7f32a [MSCTFIME] Add TLS::PeekTLS and use it
Refactoring. CORE-19360
2023-12-19 18:34:08 +09:00
Katayama Hirofumi MZ
e0eab48aee [MSCTFIME] Implement CtfImeDestroyInputContext
CORE-19360
2023-12-19 16:40:03 +09:00
Katayama Hirofumi MZ
5197d36839 [MSCTFIME] Refactor on IMC/IMCC locking
- Rename _IMCCLock as IMCCLOCK.
- Rename InternalIMCCLock as IMCCLock.
- Rename _IMCLock as IMCLOCK.
- Add get() pointer accessor of IMCCLock and IMCLOCK.
- Protect the pointer of IMCCLOCK and IMCLOCK.
CORE-19360
2023-12-19 16:12:12 +09:00
Katayama Hirofumi MZ
52bd0c0c18 [MSCTFIME][SDK] Implement CtfImeGuidAtom (#6196)
- Add CTFIMECONTEXT structure.
- Add CicInputContext class.
- Rename INPUTCONTEXTDX.dwUnknown5 as
  hCtfImeContext and retype it as HIMCC.
- Implement CtfImeGetGuidAtom by using them.
CORE-19360
2023-12-19 15:46:13 +09:00
Katayama Hirofumi MZ
6d100d5b29 [MSCTFIME][SDK] Implement CtfImeIsGuidMapEnable (#6195)
- Add link to imm32.dll.
- Add <cicero/imclock.h>.
- Add INIT_GUIDMAP constant to <immdev.h>.
- Implement CtfImeIsGuidMapEnable by using them.
CORE-19360
2023-12-19 15:23:12 +09:00
Katayama Hirofumi MZ
64378a88ba [MSCTFIME] Implement CtfImeDispatchDefImeMessage (#6193)
and add IsMsImeMessage helper funciton.
CORE-19360
2023-12-19 14:24:48 +09:00
Katayama Hirofumi MZ
084fae1eb4 [SHIMGVW] Add 'rotate and save image' buttons (#6186)
- Add IDC_ROT_CWSAVE and IDC_ROT_CCWSAVE buttons.
- Add Preview_pSaveImage helper function.
- Use it in IDC_ROT_CWSAVE and IDC_ROT_CCWSAVE
  command handling.
CORE-19358, CORE-19387
2023-12-19 13:22:53 +09:00
Hermès Bélusca-Maïto
53cc92613f [WINESYNC] Support improvements for staging patches (#5898)
- Simplify patch directory usage;
- Fix the path shown in the warning message.

The staging patch path in the warning message didn't show the correct
sub-directory where the patch resides.
2023-12-18 22:21:41 +01:00
Hermès Bélusca-Maïto
32b81a9157 [WINESYNC] When initially reverting wine-staging patches, ignore whitespace.
This fixes in particular problems when reverting created new files (i.e.
they are deleted). I suspect this is due to an endline-format "expectation"
from the git apply command.
2023-12-18 22:21:40 +01:00
Hermès Bélusca-Maïto
1d92196d2a [WINESYNC] Use the same 'winesync' author as for all the other commits the script generates.
This now correctly sets the commit author as 'winesync' (before it was
the committer's developer name) for the following types of commits:

`[WINESYNC]: revert wine-staging patchset for <MODULE_NAME>`

and

`[WINESYNC]: <MODULE_NAME> is now in sync with wine-staging <WINE_TAG>`
2023-12-18 22:21:39 +01:00
Hermès Bélusca-Maïto
f8569465ce [WINESYNC] Make the wine-staging tag optional, in which case Wine-Staging is not used. 2023-12-18 22:21:38 +01:00
Hermès Bélusca-Maïto
7f8d2d14b7 [WINESYNC] Elegantly handle empty 'files' and 'directories' lists.
Expand on Timo's commit 4b5a55516.
We may encounter cases where either the 'directories' or 'files' lists
in the .cfg YAML files are empty, and we don't want the script to throw
an exception in that case.

Furthermore, explicitly check for such empty lists when calling PyGit2
index.add_all(...) function, because if it's called on a None or empty
list, _all_ untracked files in the selected git repository get added,
which is not what we want there.
2023-12-18 22:21:37 +01:00
Hermès Bélusca-Maïto
67ca439d06 [WINESYNC] Allow using the "new" Wine-Staging patchinstall.py script.
Wine-Staging switched to staging/patchinstall.py , removing the
deprecated patches/patchinstall.sh in Feb.16, 2023 commit
c1b4af92f7
just before the v8.2 release.

In order to maintain interoperability between older and newer
Wine-Staging versions, try to run first the new script; if it fails,
fall back to the older script.
2023-12-18 22:21:36 +01:00
Hermès Bélusca-Maïto
454901ab0b [WINESYNC] Explicitly use posix paths for git file manipulations.
Whenever using git, be it on Windows CMD, git-bash on Windows, or in
*nix systems, git appears to always use posix-like paths internally.
So, enforce them with posixpath when building/concatenating paths that
are going to be passed to pygit2 functions.

Otherwise, exceptions like the following one happens:

```
  File "./winesync.py", line 296, in revert_staged_patchset
    self.reactos_index.remove(os.path.join(self.staged_patch_dir, patch_file_name))
[... skipped ...]
OSError: index does not contain sdk\tools\winesync\setupapi_staging\0002-wine-staging-4.0-setupapi_winetest.patch at stage 0
```

(The git index actually contains the specified path, but in "posix" form
with slash-separators.)

On *nix platforms, these changes should not matter.
2023-12-18 22:21:35 +01:00
Hermès Bélusca-Maïto
e638ff59d1 [WINESYNC] Fix some apparent problems with commits manipulation with pygit2. 2023-12-18 22:21:34 +01:00
Hermès Bélusca-Maïto
d566273583 [WINESYNC] Minor formatting. 2023-12-18 22:21:33 +01:00
Timo Kreuzer
1831bc6add [NTOS:KE/x64] Implement initial IPI code 2023-12-18 23:16:39 +02:00
Timo Kreuzer
e6201ea61e [USERENV] Use RegCopyTreeW from advapi32_vista 2023-12-18 23:14:14 +02:00
Timo Kreuzer
0db5d8a388 [SERVICES] Use RegCopyTreeW from advapi32_vista 2023-12-18 23:14:14 +02:00
Timo Kreuzer
eef22cc036 [ADVAPI32] Unify source for vista registry functions
- In advapi32_vista compile the code from advapi32/reg/reg.c
- Export RegCopyTreeW from advapi32_vista
2023-12-18 23:14:14 +02:00
Timo Kreuzer
d28bbf458a [ADVAPI32] Fix bugs in RegpCopyTree 2023-12-18 23:14:14 +02:00
Katayama Hirofumi MZ
a3288862e1 [MSCTFIME] Implement ImeDestroy and CtfImeDestroyThreadMgr (#6189)
- Define ITfSysHookSink interface.
- Add implementation to CicBridge class.
- Implement ImeDestroy and CtfImeDestroyThreadMgr functions.
- Implement CtfImeCreateThreadMgr function.
CORE-19360
2023-12-18 21:56:21 +09:00
Eric Kohl
ec0a300f2b [UMPNPMGR] Broadcast a WM_DEVICECHANGE message after a device install was queued 2023-12-18 11:17:08 +01:00
Katayama Hirofumi MZ
8f8db4ddb6 [MSCTFIME][IMM32][SDK] Implement CtfImeInquireExW (#6187)
- Use C++.
- Adapt INPUTCONTEXTDX to C++.
- Add some global variables.
- Add DllShutDownInProgress function.
- Add TLS class.
- Modify CtfImeInquireExW prototype.
- Modify Imm32InquireIme for
  CtfImeInquireExW.
CORE-19360
2023-12-18 19:11:17 +09:00
Eric Kohl
54adb5e45c [REGEDIT] Display REG_RESOURCES_REQUIREMENTS_LIST 2023-12-18 09:08:27 +01:00
Joachim Henze
1061ed4d28 [SHELL32] *.rc 640x480-ify IDD_FOLDER_OPTIONS_* (#6165) CORE-1762
This makes the 3 dlgs fit the screen in y for 640x480 desktop resolution like their MS role-models.

Beside that also fixes:
- the wrong vertical position of IDC_FOLDER_OPTIONS_TASKICON and wrong horizontal position of ICON IDI_SHELL_PROGRAMS_FOLDER2 for all translations
- fix some accelerator collisions for de-DE and place many FIXMEs for other translations that still have some
- improve the distance on the lower end (height) of the 3 groupboxes to look much better than before in IDD_FOLDER_OPTIONS_GENERAL for all langs
- bg-BC.rc in 1st dlg IDD_FOLDER_OPTIONS_GENERAL the text of the radiobuttons was historically shifted to the left (as part of an ancient workaround for the too long strings) and as a consquence the text was at the same area where the icons are. Fixed now.
- en-US: text truncation for IDC_FOLDER_OPTIONS_DOUBLECLICK string (affected also many other langs)
- es-ES: fix text truncation on button IDC_FOLDER_OPTIONS_RESTORE
- id-ID: BS_MULTILINE in IDC_FOLDER_OPTIONS_ULBROWSER and IDC_FOLDER_OPTIONS_ULPOINT. Added missing spacing between IDC_VIEW_APPLY_TO_ALL and IDC_VIEW_RESET_ALL buttons
- it-IT.rc fix text truncation in IDC_FOLDER_OPTIONS_RESTORE
- ro-RO.rc fix text truncation in IDC_FOLDER_OPTIONS_RESTORE
- uk-UA.rc lacked the ICON IDI_SHELL_PROGRAMS_FOLDER2 entirely (as a consequence of a historic workaround)
- fix text truncation for many languages for the radiobuttons in IDD_FOLDER_OPTIONS_GENERAL (1st dlg)
- fix text truncation for all languages for the "Opens with:" text in IDD_FOLDER_OPTIONS_FILETYPES (3rd dlg)
- strip unneeded dummy texts for IDC_FILETYPES_APPNAME
- take over "Free Space" instead of "Size available" for IDS_SHV_COLUMN_DISK_AVAILABLE which was done for en-US.rc some years ago, but was forgotten to do as well for other languages back then
- ... and so on

CORE-1762
2023-12-18 07:05:07 +01:00
Thamatip Chitpong
1df5225708 [NTUSER] menu.c: Don't use RETURN() macro (#6185)
Also remove parentheses around return value.
2023-12-18 12:04:57 +07:00
Katayama Hirofumi MZ
b6274fdde1 [SHIMGVW] Unlock file (#6181)
- Add m_pMemStream to PREVIEW_DATA structure.
- Add Preview_pFreeImage helper function.
- Add MemStreamFromFile helper function to make
  a memory stream.
- Avoid file locking by using a memory stream and
  GdipLoadImageFromStream.
CORE-19183
2023-12-18 12:37:50 +09:00
Mark Jansen
e8f9564c20 [NTDLL_APITEST] Add test for RtlGetProcessHeaps 2023-12-17 22:28:40 +01:00
Mark Jansen
b8cdd1a879 [RTL] Implement RtlGetProcessHeaps 2023-12-17 22:28:24 +01:00
Serge Gautherie
0ba94c83b5 [SHELL32] AddStaticContextMenusToMenu(): Fix 3 MSVC 'warning C4805' (#6177)
- Use 'bool' type.
- Do not abuse '|=' operator.

Addendum to commit 7fb91d98f
2023-12-17 22:20:06 +01:00
Serge Gautherie
e1c68dcba0 [APISETS] Forward _seh_longjmp_unwind4() to msvcrt (#6176)
Addendum to commit 1a6b6a27b
2023-12-17 22:19:00 +01:00
Whindmar Saksit
c1f9ea10aa [REGEDIT] Fix inverted case matching when searching value data (#6159) 2023-12-17 22:16:34 +01:00
Whindmar Saksit
5be53f553c [BROWSEUI] Don't call SHOpenFolderAndSelectItems with full pidls and don't leak them (#6153)
- The children passed to SHOpenFolderAndSelectItems are not supposed to be full pidls.
- Don't leak the array from IShellFolderView::GetSelectedObjects.
2023-12-17 22:16:19 +01:00
Whindmar Saksit
7ffc31554d [CSCRIPT][WSCRIPT] Implement Sleep (#6146) 2023-12-17 22:14:45 +01:00
Serge Gautherie
bf7e7c2383 [WIN32SS:GDI] eng/error.c: Minor code tweaks (#6128)
- Remove a useless debug.h include.
- Use the initialized pTeb pointer.
- Remove a useless else.
- Add a SAL2 annotation.
2023-12-17 22:13:45 +01:00
Serge Gautherie
91d291f766 [SDK:CMAKE] writing_CmakeLists_for_ReactOS.txt: Fix typos (#6105) 2023-12-17 22:12:25 +01:00
Whindmar Saksit
82c07abf1a [USER32] Support loading icons from data file module (#6065)
GetModuleFileName() fails on LOAD_LIBRARY_AS_DATAFILE causing LoadImage to fail.
Use a fake filename for LR_SHARED (with same format as Windows).
This may not be a good design, but it does match Windows' behaviour.

+ Added test.
2023-12-17 22:11:50 +01:00
Eric Kohl
8f349ab3c2 [NETCFGX] Create only one "Alternative Configuration" tab
- Check for the presence of the second tab.
- Remove unnecessary checks for checked radiobuttons.

CORE-19328
2023-12-17 21:50:20 +01:00
Hermès Bélusca-Maïto
bb7661312e [SETUP:REACTOS] Fix identical expression in treelist.c
Supersedes PRs #3226 and #5199 by Kyle_Katarn.
CORE-16036
2023-12-17 20:58:32 +01:00
Hermès Bélusca-Maïto
63d5423853 [SETUP:REACTOS] Simplify CONTROL "ComboBox" to COMBOBOX resource declaration. 2023-12-17 20:57:11 +01:00
Hermès Bélusca-Maïto
bd51cd14d6 [SETUP:REACTOS] Fix layout of the Restart-page. 2023-12-17 20:57:10 +01:00
Mark Jansen
474a8ea46b Remove liberapay 2023-12-17 16:27:45 +01:00
Andrew Shelkovenko
44c7d9ad42 [DXHALTEST] Correct some typos (#5737)
I.e. translate GreatLordish into proper English :)

Reviewed-by: Robert Naumann <gonzomdx@gmail.com>
Reviewed-by: Joachim Henze <joachim.henze@reactos.org>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Carl J. Bialorucki <cbialo2@outlook.com>
2023-12-17 15:56:39 +03:00
Whindmar Saksit
19a0f14bb1 [SHELL32] ShellDispatch::ShellExecute must default to displaying the window (#6143)
SW_HIDE is not the correct default show mode.

This can be reproduced by simple script:
WScript.CreateObject("Shell.Application").ShellExecute("calc.exe");
2023-12-17 15:48:24 +03:00
Thamatip Chitpong
95657698e7 [NTUSER] accelerator.c: Don't use RETURN() macro (#6166) 2023-12-17 17:22:58 +07:00
Dmitry Borisov
bbe6b07612 [DC21X4] Fix minor issues (#6161)
- The return value got lost when refactoring the setup function
- The check against 0xFFFFFFFF was meant to reject an empty EEPROM image
- Add missing PAGED_CODE(); macros

CORE-8724
2023-12-17 12:00:25 +03:00
Serge Gautherie
f7d612f3e3 [BASESRV][CSRLIB][NTVDM] Add missing \n to DPRINT() calls (#5951)
and promote 1 DPRINT().
2023-12-16 23:57:35 +01:00
Jose Carlos Jesus
80751952ba [USETUP] Shorten the Portuguese translation to fit on one line (#6174) 2023-12-16 20:58:08 +00:00
Hermès Bélusca-Maïto
231ac99414 [BROWSEUI] Fix item deletion in CExplorerBand::OnTreeItemDeleted().
Addendum to commit 1b634b38e (r73706)
CORE-10838

The TVN_DELETEITEM notification sends the info about the item to be
deleted in the itemOld member of the NMTREEVIEW structure, and not in
the itemNew one!
2023-12-16 15:25:52 +01:00
Timo Kreuzer
835438f614 [NDK] Sync KUSER_SHARED_DATA with XDK 2023-12-16 14:04:36 +02:00
Timo Kreuzer
5f0e98ea3c [XDK] Add offsets to KUSER_SHARED_DATA and improve structure
Offsets taken from vergiliusproject.com.
2023-12-16 14:04:36 +02:00
Timo Kreuzer
aafe33ca85 [XDK] Remove obsolete _ANONYMOUS_STRUCT/UNION 2023-12-16 14:04:36 +02:00
Timo Kreuzer
f42e9029f7 [XDK] Apply standard formatting to KUSER_SHARED_DATA 2023-12-16 14:04:36 +02:00
Timo Kreuzer
766a093f70 [XDK][NDK] Update XSTATE definitions 2023-12-16 14:04:36 +02:00
Timo Kreuzer
1a6b6a27b2 [MSVCRT] Initialize exception support in DllMain 2023-12-16 13:52:15 +02:00
Timo Kreuzer
86f2d4cd4e [NTDLL] Initialize keyed event for condition variables 2023-12-16 13:52:15 +02:00
Katayama Hirofumi MZ
fed7ee70a6 [SHIMGVW] Enable middle button dragging (#6173) 2023-12-16 20:46:40 +09:00
Katayama Hirofumi MZ
e62d12b140 [SHIMGVW] Enable scrolling (#6172)
- Add m_xScrollOffset and m_yScrollOffset to
  PREVIEW_DATA structure.
- Add ZoomWnd_UpdateScroll helper function.
- Handle WM_HSCROLL and WM_VSCROLL messages.
- Enable mouse wheel scrolling.
CORE-19358
2023-12-16 19:45:37 +09:00
Katayama Hirofumi MZ
69fb160a48 [SHELL32] Improve Japanese (ja-JP) translation
CORE-18706
2023-12-16 12:57:17 +09:00
Katayama Hirofumi MZ
de7f1ceeef [BOOTDATA][INF] hivecls.inf: Add Japanese (ja-JP) translation
CORE-18706
2023-12-16 12:55:01 +09:00
Katayama Hirofumi MZ
e320346e9e [EVENTVWR] Improve Japanese (ja-JP) translation
CORE-18706
2023-12-16 12:42:58 +09:00
Katayama Hirofumi MZ
98b2451dfe [CHARMAP] BM_CLICK's wParam must be zero 2023-12-16 10:33:03 +09:00
Katayama Hirofumi MZ
d55add359c [COMCTL32][USER32] Button: Fix DLGC_... handling (#6168)
Based on KRosUser's button.patch.
- Fix DLGC_... handling by using & operator
  in BUTTON_CheckAutoRadioButton
  in button.c.
- Fix DLGC_... handling by using & operator
  in IsDialogMessageW in dialog.c.
- BM_CLICK's wParam must be zero.
CORE-17210
2023-12-16 09:29:13 +09:00
Andrei Miloiu
8ab2e5a28a [REG] Update Romanian (ro-RO) translation (#6137) 2023-12-15 11:39:56 +01:00
Andrei Miloiu
40f17bc9f2 [HDWWIZ] Update Romanian (ro-RO) translation (#6080) 2023-12-15 11:38:38 +01:00
Katayama Hirofumi MZ
f0179741d1 [SHIMGVW] Fix and improve zooming (#6167)
- Add WC_ZOOM window class and
  use it for zooming.
- Add ZoomWnd_OnDraw function
  and use it in ZoomWnd_OnPaint.
- Use memory bitmap to reduce flickering.
- Make rendering pixel-perfect.
CORE-19220
2023-12-15 15:16:50 +09:00
Serge Gautherie
ae534e8cee [USER32] GetNextDlgGroupItem(): Remove WineSync copy-pasta (#6162)
Improve WineSync.
Addendum to 61fb8a2 (r19831).
2023-12-14 14:41:58 +00:00
Thamatip Chitpong
3f5fd1d09e [NTUSER] window.c: Don't use RETURN() macro (#6150) 2023-12-14 14:36:38 +00:00
Joachim Henze
d387c799ed [SHELL32] 640x480-ify four dialogs (#6004)
IDD_DRIVE_PROPERTIES
IDD_DRIVE_TOOLS
IDD_DRIVE_HARDWARE
IDD_FOLDER_CUSTOMIZE

Afterwards all 4 dialogs do display fine even with 640x480 screen resolution. Same as their MS role-models do.

I also fixed some accelerator collisions FCIDM_SHVIEW_CUT and synced some forgotten syncs for IDM_CUT accel.
I also moved checkboxes further to the left in the checkdisk dialog, as it was done for en-US and some other languages before, but it was forgotten in other languages (AUTOCHECKBOX.*14000 and AUTOCHECKBOX.*14001)

the french accelerator-changes were
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2023-12-14 13:54:11 +00:00
Serge Gautherie
1244659d4c [NTOSKRNL] Remove remnant internal/arm/asmmacro.S (#6052)
Addendum to 6212c82 (r67715).
2023-12-14 13:48:31 +00:00
Katayama Hirofumi MZ
946b906ec8 [SHIMGVW] Initial implementation of Slide Show (#6163)
Add Slide Show feature.
- Add Preview_StartSlideShow and Preview_EndSlideShow functions.
- Add g_hMainWnd and g_hwndFullscreen global variables.
- Modify ZoomWnd_OnPaint to display Slide Show correctly.
- Add a timer to proceed Slide Show.
CORE-19358
2023-12-14 17:38:08 +09:00
Katayama Hirofumi MZ
079b36542c [CTFMON][SDK] Add ctfmon.exe (#6149)
ctfmon.exe will be a replacement of our
kbswitch.exe in the future. That is the
front-end of Language Bar. It is needed
to support TIPs.
- Add ctfmon.exe at base/applications/ctfmon.
- Add <cicero/cicbase.h>,
  <cicero/CModulePath.h>, and
  <cicero/osinfo.h> headers and use them.
CORE-19362
2023-12-13 21:37:15 +09:00
Katayama Hirofumi MZ
a19ba4760e [MSCTF] Add ADD_IMPORTLIB to CMakeLists.txt spec2def
CORE-19361
2023-12-13 11:10:06 +09:00
Katayama Hirofumi MZ
bfd5d37fe6 [MSCTF][SDK][UUID] Strengthen msctf.idl and msctf.spec (#6158)
- Add some function prototypes to
  sdk/include/psdk/msctf.idl.
- Modify dll/win32/msctf/msctf.spec.
- Modify uuid.
CORE-19362
2023-12-13 07:37:45 +09:00
Katayama Hirofumi MZ
3a2c2cbe60 [SDK][UUID] Add ctffunc.idl (#6157)
- Add ctffunc.idl to sdk/include/psdk.
- Modify uuid.
CORE-19362
2023-12-13 07:36:20 +09:00
Katayama Hirofumi MZ
db10ce0f9f [USER32] Skip STATIC controls on arrow keys (#6142)
- Skip DLGC_STATIC controls on array keys.
- Avoid infinite loop by using hwndFirst variable.
CORE-6127
2023-12-13 07:04:52 +09:00
Katayama Hirofumi MZ
be8e4c691d [MSCTFIME] Implement ImeRegisterWord etc. (#6160)
- Implement ImeRegisterWord, ImeUnregisterWord,
  ImeGetRegisterWordStyle, ImeEnumRegisterWord,
  ImeConversionList, ImeEscape, ImeSelect, and
  ImeSetActiveContext functions.
- These functions in MSCTFIME basically do
  nothing.
CORE-19360
2023-12-12 22:43:36 +09:00
Katayama Hirofumi MZ
9b8a5fc5f0 [COMCTL32] Tab control: Use InvalidateRect in TAB_SetItemT update (#6154)
Based on KRosUser's tab.patch.
- In TAB_SetItemT function, use
  InvalidateRect instead of
  TAB_InvalidateTabArea.
CORE-11454
2023-12-12 06:27:46 +09:00
Katayama Hirofumi MZ
17617221ce [MSCTFIME][SDK][USER32] Add msctfime.ime (stub) (#6141)
## Overview
1. msctfime.ime is an IME file interface
  for new-style IMEs a.k.a. "Text Input
  Processors" (TIPs).
2. msctfime.ime is loaded as old-style
  IME file at ImmLoadLayout in specific
  condition.
3. msctfime.ime communicates with
  the current TIP (This feature is not
  implemented yet).

## Proposed changes
- Add msctfime module at dll/ime/msctfime.
- The functions in this module are currently
  stub.
- Move IME file interface declarations from
  <imm.h> to <ddk/immdev.h>.
- Modify ImmNotifyIME, NotifyIME, and
  ImeProcessKey prototypes for x64
  compliance.
CORE-19360
2023-12-11 22:37:25 +09:00
Katayama Hirofumi MZ
04b1e8945b [COMCTL32][USER32] ComboBox: Do default processing on WM_SYSKEYDOWN (#6152)
Based on KRosUser's combo.patch. Enable Alt+F4 on ComboBox.
Do default processing on WM_SYSKEYDOWN if necessary.
CORE-18231
2023-12-11 22:04:18 +09:00
Katayama Hirofumi MZ
ea59e93e31 [FONTS] Make Arial gender glyphs +66% larger (#6156)
Make U+2642 and U+2640 glyphs +66% larger in
ReactOS "Arial" font.

- Modify arial.ttf, ariali.ttf, arialbd.ttf, and
  arialbi.ttf font files by FontForge.
- Modify media/fonts/doc/Arial/ChangeLog.txt.
- Underline values are hacked to do workaround on
  FontForge's bug.

Copyright text:
Digitized data copyright (c) 2010 Google Corporation.
Copyright (c) 2012 Red Hat, Inc.
Copyright (c) 2019-2023 Katayama Hirofumi MZ.

License: SIL Open Font License, Version 1.1
Font File Version: 2.00.1
CORE-19346
2023-12-11 20:53:45 +09:00
Katayama Hirofumi MZ
e2b1ee9a53 [SETUP][BOOTDATA][INF] Add font substitute ('Segoe UI Symbol' to 'Arial') (#6155)
Based on CORE-19346 "segoe-ui-symbo.patch".
In order to display gender glyphs (U+2642 and
U+2640; ♂ and ♀), we add a font substitute from
"Segoe UI Symbol" to "Arial".

ReactOS Arial has many symbol glyphs, so I think
we can use it for "Segoe UI Symbol" font substitute.

The glyph size problem will be fixed in #6156.
CORE-19346
2023-12-11 20:51:04 +09:00
Katayama Hirofumi MZ
a837138dfc [SHIMGVW] Destroy window to exit app in Preview_Edit
CORE-19358
2023-12-11 15:51:55 +09:00
Katayama Hirofumi MZ
2de6e7559e [SHIMGVW] Refactor Part 3 (#6148)
Improve code flexibility.
- Remove g_fnPrevProc, g_hDispWnd, g_hToolBar, and g_Anime global variables.
- Declare PREVIEW_DATA structure and use it.
- Encapsulate preview window by using user data.
CORE-19358
2023-12-11 07:52:18 +09:00
Katayama Hirofumi MZ
045e9dee58 [SDK][UUID] Strengthen <ctfutb.h> (#6135)
For supporting Text Input Processors (TIPs).
Add many TSF interfaces and definitions into "ctfutb.idl".
CORE-19268
2023-12-11 07:51:17 +09:00
Katayama Hirofumi MZ
dc2d2232f4 [SHIMGVW] Use HeapAlloc/HeapFree instead of malloc/calloc/free
malloc/free are slow. CORE-19358
2023-12-10 18:09:59 +09:00
Katayama Hirofumi MZ
468a5492a9 [SHIMGVW] Support Drag & Drop
- Use DragAcceptFiles and WM_DROPFILES.
CORE-19358
2023-12-10 16:55:34 +09:00
Katayama Hirofumi MZ
0b1d6d6b20 [SHIMGVW] Refactoring Part 2 (#6147)
- Move Anime_GetFrameDelay and Anime_Step.
- Remove one parameter from ImageView_SaveSettings.
- Rename some preview-window functions as "Preview_...".
- Rename ImageView_CreateWindow as ImageView_Main.
- Use lParam of WM_CREATE.
CORE-19358
2023-12-10 16:42:22 +09:00
Katayama Hirofumi MZ
0fe0b40ee1 [SHIMGVW] Split animation code to anime.c (#6144)
Improve code flexibility.
Add anime.c and move animation code to anime.c.
CORE-19358
2023-12-10 14:07:46 +09:00
Katayama Hirofumi MZ
5a2c451696 [SHIMGVW] Some minor refactoring (#6139)
Improve human readability. Reduce code amount.
CORE-19358
2023-12-10 08:20:17 +09:00
Katayama Hirofumi MZ
8be912147b [ICCVID][MSRLE32][MSVIDC32] Add VfW codecs version info (#6118)
Based on KRosUser's vfw.patch.
CORE-15382
2023-12-10 06:50:58 +09:00
Andrei Miloiu
623e857a43 [MAIN] Update Romanian (ro-RO) translation (#6013) 2023-12-09 20:24:42 +01:00
Andrei Miloiu
63276e6343 [MYEVENTPROVIDER_DLL][MC] Update Romanian (ro-RO) translation to message table (#6075) 2023-12-09 20:23:30 +01:00
Andrei Miloiu
3c2e1c182e [LSASRV] Update Romanian (ro-RO) translation (#6078) 2023-12-09 20:23:03 +01:00
Andrei Miloiu
053caa1dff [NEWDEV] Update Romanian (ro-RO) translation (#6084) 2023-12-09 20:21:36 +01:00
Andrei Miloiu
8fe995f978 [DXDIAG] Update Romanian (ro-RO) translation (#6085) 2023-12-09 20:21:06 +01:00
Andrei Miloiu
0be73e7253 [RAPPS] Improve Romanian (ro-RO) translation (#6086) 2023-12-09 20:20:31 +01:00
Andrei Miloiu
ec0e51a265 [SHELL32] Update Romanian (ro-RO) translation (#6087) 2023-12-09 20:20:12 +01:00
Andrei Miloiu
9ecf552fe4 [DRIVERS][INF] Update Romanian (ro-RO) translation (#6088) 2023-12-09 20:19:54 +01:00
Andrei Miloiu
28dcfe246d [APPWIZ] Improve Romanian (ro-RO) translation (#6090) 2023-12-09 20:19:09 +01:00
Andrei Miloiu
512715bd89 [LABEL] Update Romanian (ro-RO) translation (#6091) 2023-12-09 20:18:34 +01:00
Andrei Miloiu
8f0885d069 [AT] Update Romanian (ro-RO) translation (#6092) 2023-12-09 20:18:05 +01:00
Andrei Miloiu
ec2465218f [CTM] Update Romanian (ro-RO) translation (#6093) 2023-12-09 20:17:44 +01:00
Andrei Miloiu
2c427f647a [EXPLORER] Update Romanian (ro-RO) translation (#6094) 2023-12-09 20:17:06 +01:00
Andrei Miloiu
5cdee40fa4 [MAGNIFY] Update Romanian (ro-RO) translation (#6095) 2023-12-09 20:15:19 +01:00
Andrei Miloiu
2498935acd [COMCTL32] Update Romanian (ro-RO) translation (#6096) 2023-12-09 20:14:55 +01:00
Andrei Miloiu
e198f54624 [RUNONCE] Update Romanian (ro-RO) translation (#6098) 2023-12-09 20:14:32 +01:00
Andrei Miloiu
814b9e3f2c [DEVMGR] Update Romanian (ro-RO) translation (#6099) 2023-12-09 20:13:43 +01:00
Andrei Miloiu
5c77620c17 [SYSSETUP] Update Romanian (ro-RO) translation (#6100) 2023-12-09 20:13:20 +01:00
Andrei Miloiu
3d75fddb25 [ZIPFLDR] Update Romanian (ro-RO) translation (#6101) 2023-12-09 20:12:47 +01:00
Andrei Miloiu
ea858b3d98 [STOBJECT] Update Romanian (ro-RO) translation (#6102) 2023-12-09 20:12:07 +01:00
Andrei Miloiu
a4f4a2b199 [HDWWIZ] Update Romanian (ro-RO) translation (#6103) 2023-12-09 20:11:19 +01:00
Andrei Miloiu
9b69ef3692 [NTVDM] Update Romanian (ro-RO) translation (#6104) 2023-12-09 20:10:47 +01:00
Andrei Miloiu
75de397181 [ACCESS] Update Romanian (ro-RO) translation (#6111) 2023-12-09 20:09:58 +01:00
Andrei Miloiu
787b41680c [NETSHELL] Update Romanian (ro-RO) translation (#6112) 2023-12-09 20:09:25 +01:00
Andrei Miloiu
5d57e0d81b [NETID] Update Romanian (ro-RO) translation (#6113) 2023-12-09 20:07:23 +01:00
Andrei Miloiu
bd04ddc294 [SYSDM] Update Romanian (ro-RO) translation (#6114) 2023-12-09 20:06:46 +01:00
Andrei Miloiu
2d8e4911a2 [RASDLG] Update Romanian (ro-RO) translation (#6115) 2023-12-09 20:06:04 +01:00
Andrei Miloiu
ffb7f0ea1b [PCICLASS][MC] Update Romanian (ro-RO) translation (#6116) 2023-12-09 20:04:43 +01:00
Andrei Miloiu
6b82ed575c [CMD] Update Romanian (ro-RO) translation (#6117) 2023-12-09 20:04:09 +01:00
Andrei Miloiu
39ac6187db [OPENGLCFG] Update Romanian (ro-RO) translation (#6119) 2023-12-09 20:03:38 +01:00
Andrei Miloiu
53b195f49f [HELP] Update Romanian (ro-RO) translation (#6120) 2023-12-09 20:03:12 +01:00
Andrei Miloiu
3c5bbd4e95 [DISKPART] Update Romanian translation (#6121) 2023-12-09 20:02:34 +01:00
Andrei Miloiu
4c9c49aa64 [TAPIUI] Improve Romanian (ro-RO) translation (#6124) 2023-12-09 20:01:57 +01:00
Andrei Miloiu
35f386bf0c [WINMM] Update Romanian (ro-RO) translation (#6125) 2023-12-09 20:01:09 +01:00
Andrei Miloiu
48e276b180 [IERNONCE] Update Romanian (ro-RO) translation (#6126) 2023-12-09 20:00:40 +01:00
Andrei Miloiu
d7e4bda3ed [TIMEDATE] Update Romanian (ro-RO) translation (#6136) 2023-12-09 20:00:11 +01:00
Katayama Hirofumi MZ
b7dcc1024b [IMM32] Rewrite ImmLoadLayout (#6138)
ImmLoadLayout was buggy.
- Don't do zero fill pImeInfoEx.
- Simplify registry handling.
- Don't reset pImeInfoEx->fLoadFlag if failed early.
CORE-19268
2023-12-09 09:49:57 +09:00
Katayama Hirofumi MZ
414f3da7a6 [COMCTL32] IP Address control: Fix background drawing (#6133)
Based on KRosUser's suggestion.
bgCol is a COLORREF value, not a color index.
Create a brush from bgCol.
CORE-9853
2023-12-09 05:00:39 +09:00
Timo Kreuzer
e5c5efe2ad [NTOS:KE/x64] Set the idle thread's IdealProcessor for application processors 2023-12-08 20:16:51 +02:00
Timo Kreuzer
b1a9e72e92 [NTOS:KE/x64] Do not call HalInitSystem from application processors 2023-12-08 20:16:51 +02:00
Timo Kreuzer
d0f6874d92 [NTOS:KE/x64] Factor out KiIntializeProcessorBootStructures 2023-12-08 20:16:51 +02:00
Timo Kreuzer
8c466c3e36 [NTOS:KE/x64] Improve KiInitializePcr 2023-12-08 20:16:51 +02:00
Timo Kreuzer
d2a3b1c791 [NTOS:KE/x64] Factor out KiInitializeP0BootStructures 2023-12-08 20:16:51 +02:00
Timo Kreuzer
e655594609 [NTOS:KE/x64] (Re)move initialization of IRQL and TR 2023-12-08 20:16:51 +02:00
Timo Kreuzer
0a7255e4bf [NTOS:KE/x64] Move Initialization of TSS 2023-12-08 20:16:51 +02:00
Timo Kreuzer
160980aba1 [NTOS:KE/x64] Move initialization of PCR 2023-12-08 20:16:51 +02:00
Timo Kreuzer
ba62dd0aaa [NTOS:KE/x64] Move initialization of KeLoaderBlock 2023-12-08 20:16:51 +02:00
Timo Kreuzer
e1497d43d7 [NTOS:KE/x64] Improve KiInitializeTss 2023-12-08 20:16:51 +02:00
Timo Kreuzer
bbe16859b5 [NTOS:KE/x64] Rename P0 boot stacks 2023-12-08 20:16:51 +02:00
Timo Kreuzer
6c5b3f203d [NTOS:KE/x64] Add back a stubs.c file 2023-12-08 19:38:59 +02:00
Timo Kreuzer
57c7f06004 [NTOS:KE/x64] Rename stubs.c to traphandler.c 2023-12-08 19:38:59 +02:00
Timo Kreuzer
230f7c7f3c [HALX86] Some improvements / bugfixes for IPI support functions 2023-12-08 19:28:57 +02:00
Timo Kreuzer
d8d46a00c3 [HALX86] Use InterlockedBitTestAndSetAffinity instead of InterlockedBitTestAndSet 2023-12-08 19:28:57 +02:00
Timo Kreuzer
d87b45bee7 [NDK] Add Affinity helper inline functions 2023-12-08 19:28:57 +02:00
Katayama Hirofumi MZ
57e7f0b321 [SHIMGVW] Add g_ or s_ prefix to global variables (#6134)
Renaming global variables:
- s/hInstance/g_hInstance/
- s/shiSettings/g_Settings/
- s/currentFile/g_pCurrentFile/
- s/image/g_pImage/
- s/PrevProc/g_fnPrevProc/
- s/hDispWnd/g_hDispWnd/
- s/hToolBar/g_hToolBar/
- s/ZoomPercents/s_nZoomPercents/
- s/ZoomSteps/s_ZoomSteps/
- s/Buttons/s_Buttons/
- s/BtnConfig/s_ButtonConfig/
CORE-19358
2023-12-08 21:35:43 +09:00
Katayama Hirofumi MZ
e7f6b473e6 [SHIMGVW] Implement ImageView_Delete (#6132)
- Call SHFileOperation to delete.
- Rebuild the file list and load the
  next file.
CORE-19358
2023-12-08 15:30:55 +09:00
Katayama Hirofumi MZ
0faa1561a6 [SHIMGVW] Check VK_CONTROL on ImageView_OnMouseWheel
CORE-19358
2023-12-08 15:03:18 +09:00
Katayama Hirofumi MZ
77ab709b61 [SHIMGVW] Improve window size handling
CORE-19358
2023-12-08 14:56:12 +09:00
Katayama Hirofumi MZ
a500b513b0 [SHIMGVW] Use WM_GETMINMAXINFO instead of WM_SIZING
to limit window size. CORE-19358
2023-12-08 14:30:35 +09:00
Katayama Hirofumi MZ
d178e6bb41 [SHIMGVW] Add VK_OEM_PLUS and VK_OEM_MINUS to IDR_ACCELERATOR
Improve keyboard usability. CORE-19358
2023-12-08 14:22:56 +09:00
Katayama Hirofumi MZ
0f519a783c [SHIMGVW] Implement IDC_BEST_FIT
- Add two parameters to UpdateZoom.
- Enable/disable IDC_BEST_FIT and IDC_REAL_SIZE
  buttons in UpdateZoom.
- Call ResetZoom on IDC_BEST_FIT.
CORE-19358
2023-12-08 11:44:03 +09:00
Katayama Hirofumi MZ
02312c7bf1 [SHIMGVW] Main window class must be "ShImgVw:CPreviewWnd"
and window style is (WS_VISIBLE | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW).
CORE-19358
2023-12-08 11:01:00 +09:00
Whindmar Saksit
e4d03f471b [REGEDIT][REG] Limit registry type to 8 hex digits when importing (#6063)
Matches Windows and lets the Wine13i test in regedit_winetest pass.
2023-12-04 16:46:06 +01:00
Serge Gautherie
0c568c0c90 [XDK] kefuncs.h: Unduplicate 2 function definitions (#6057) 2023-12-04 13:49:57 +01:00
Hermès Bélusca-Maïto
1797566d73 [IMM32] Include ldrfuncs.h for RtlDllShutdownInProgress (#6071) 2023-12-04 13:47:39 +01:00
Hermès Bélusca-Maïto
48456d9108 [NDK] ldrfuncs.h: Add RtlDllShutdownInProgress; make the header C++-compatible (#6071)
The function is added here, because it is loader-related
and thus making sense there, instead of in rtlfuncs.h.
2023-12-04 13:47:33 +01:00
Thamatip Chitpong
2dd0c6c32b [ACPI] Add acpi.rc to CMakeLists (#6089)
Fix missing version info.
2023-12-04 07:17:08 +07:00
Joachim Henze
a6341b49d8 [NETSHELL] 640x480-ify complete that module (#6109)
Addendum to (#5899)

The change in sk-SK.rc
IDD_NETPROPERTIES DIALOGEX 0, 0, 246, 246
to
IDD_NETPROPERTIES DIALOGEX 0, 0, 246, 216
is an addendum to (#5899). In sk-SK.rc that line was accidentally forgotten to be changed.

The change to "all" rc's:
IDD_STATUS DIALOGEX 0, 0, 200, 280
to
IDD_STATUS DIALOGEX 0, 0, 200, 180
changes the last dialog, that had a greater value here than 220 (which is the max we can use for 640x480-ability).
I decided to use 180 for 2 reasons:
1.) bg-BG.rc already used IDD_STATUS DIALOGEX 0, 0, 200, 180 here, so we can sync all langs to that.
2.) We have some dialogs nearby which do use that same dimension for all langs, e.g.:
IDD_LAN_NETSTATUS DIALOGEX 0, 0, 200, 180
IDD_LAN_NETSTATUSADVANCED DIALOGEX 0, 0, 200, 180
2023-12-03 21:35:57 +00:00
Joachim Henze
471cceb14f [TASKMGR] RC trivia el-GR.rc pt-BR.rc pt-PT.rc ru-RU.rc sv-SE.rc (#6097)
As the title says: Just some trivia
2023-12-03 21:35:01 +00:00
Joachim Henze
6a7315228c [NETCFGX] IDD_TCPIP_ALTCF_DLG Fix radiobutton (#6083)
Do to the 2nd dialog the same what (#6049) did for the first dialog:
- Flip the controls

- move vertical position of the groupbox from 55 to 57 to make it look better
- sync vertical position of 2 more controls for fr-FR.rc
2023-12-03 21:34:29 +00:00
Stanislav Motylkov
7c5f93a582 [HOTPLUG] Update Russian (ru-RU) translation 2023-12-04 00:20:40 +03:00
Stanislav Motylkov
0fd51c9fe3 [STOBJECT] Update Russian (ru-RU) translation 2023-12-03 23:56:07 +03:00
Stanislav Motylkov
8bc6c8fa56 [USETUP] Update Russian (ru-RU) translation
- Translate one untranslated string
- Fix some "е" -> "ё" occurences and punctuation.
2023-12-03 23:40:45 +03:00
Stanislav Motylkov
6295c61f3f [SHELL32] Update resource file headers
Only update files that already have a non-standard header.
There are still resource files that just don't have it.

Dedicated to Joachim Henze - PR #6004 commit 273a6e2575.
2023-12-03 22:42:10 +03:00
Stanislav Motylkov
51f9b86cbc [REACTOS] Omit "aka" for the authors' nicknames
Based on grep query: https://git.reactos.org/?p=reactos.git&a=search&h=c00d41d91c181746563e689d3390228f703053f5&st=grep&s=+%28aka+
Dedicated to Joachim Henze - PR #5978 commit 4c7222bab3.
2023-12-03 22:08:20 +03:00
Hermès Bélusca-Maïto
2f0a5e546f [NTOS:KE] Don't hardcode pool tag and TSS flag values (#6051)
Co-authored-by: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
2023-12-03 17:33:10 +01:00
Katayama Hirofumi MZ
6e449d47e8 [IMM32][KERNEL32][SDK] Half-implement BaseCheckAppcompatCache (#6069)
- And add it to <compat_undoc.h>.
- Use <compat_undoc.h> in IMM32.
- Modify kernel32.spec.
CORE-19268
2023-12-03 23:40:49 +09:00
Eric Kohl
d8ba5920a2 [NTOS:PNP][UMPNPMGR] GUID_DEVICE_ENUMERATED should be a DeviceInstallEvent
- Move the GUID_DEVICE_ENUMERATED event from the TargetDeviceChangeEvent category to the DeviceInstallEvent category
- Create a new function that handles DeviceInstallEvent category events
2023-12-03 14:00:34 +01:00
Eric Kohl
30b9be047f [UMPNPMGR] Split the notification code by event category
- Move the TargetDeviceChangeEvent code into a separate function.
- Add a new function for the DeviceClassChangeEvent category.
2023-12-03 11:08:57 +01:00
Katayama Hirofumi MZ
75cf6920bc [IMM32][SDK][NTUSER] Implement ImmProcessKey for Cicero (#6106)
Complete CTF IMM.
- Add CtfImeProcessCicHotkey and CtfImeSetActiveContextAlways
  to access CTF IMEs.
- Check whether Cicero is started in the current thread in ImmProcessKey.
- Call CtfImeProcessCicHotkey if necessary in ImmProcessKey.
- Modify <CtfImeTable.h>.
- Add CI_CICERO_STARTED flag to "ntuser.h".
- Fix Imm32JCloseOpen.
CORE-19268
2023-12-03 17:33:22 +09:00
Thamatip Chitpong
9ea2222967 [HH] Check LoadLibrary and GetProcAddress return value (#6082)
Handle failure cases.
2023-12-03 08:15:08 +07:00
Katayama Hirofumi MZ
d795021a75 [IMM32][SDK] Implement GetKeyboardLayoutCP (#6068)
- Add IMM32!GetKeyboardLayoutCP function.
- Add it to <imm32_undoc.h>.
- Delete ImmDisableLegacyIME and
  ImmSendMessageToActiveDefImeWndW functions
  (2k3/xp IMM32 doesn't have such functions).
- Modify imm32.spec.
- Refer ntdll!RtlDllShutdownInProgress function (that is WinXP+).
CORE-19268
2023-12-03 07:46:35 +09:00
Timo Kreuzer
40b6b1dab3 [HAL] Implement IPI support functions 2023-12-03 00:07:53 +02:00
Katayama Hirofumi MZ
4bccb6e6c9 [SHELL32][SDK][SHELL32_APITEST] Add PathIsTemporaryA/W (#6067)
- Implement PathIsTemporaryA and
  PathIsTemporaryW functions.
- Add them to <undocshell.h>.
- Add PathIsTemporary testcase.
CORE-19278
2023-12-02 23:07:28 +09:00
Whindmar Saksit
f31f9facc9 [URL] Add icon resource for .url files (#6081)
Otherwise, the registration for .url files and the http/https protocols point to a missing icon in url.dll.
2023-12-02 12:38:09 +01:00
Andrei Miloiu
1cf6ce6b5a [CRYPTUI] Update Romanian (ro-RO) translation (#6077) 2023-12-01 15:43:58 +01:00
Andrei Miloiu
2c1dacc0c6 [OPENGLCFG] Update Romanian (ro-RO) translation (#6073)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2023-12-01 15:40:13 +01:00
Andrei Miloiu
0e42ffb716 [WINMM] Update Romanian (ro-RO) translation (#6074) 2023-12-01 15:39:23 +01:00
Andrei Miloiu
98d652e6b7 [REACTOS] Update Romanian (ro-RO) translation (#6079) 2023-12-01 15:38:01 +01:00
Andrei Miloiu
bb97f0d1c3 [RASDLG] Update Romanian (ro-RO) translation (#6059) 2023-12-01 15:35:23 +01:00
Andrei Miloiu
77ed2e2fb0 [EVENTVWR] Update Romanian (ro-RO) translation (#6060) 2023-12-01 15:34:22 +01:00
Andrei Miloiu
64fe3347e9 [DESK] Update Romanian (ro-RO) translation (#5958) (#6061) 2023-12-01 15:33:35 +01:00
Andrei Miloiu
212f3eaf00 [MSGINA] Update Romanian (ro-RO) translation (#6062) 2023-12-01 15:32:38 +01:00
Andrei Miloiu
8ed370c86e [COMDLG32] Update Romanian (ro-RO) translation (#6076) 2023-12-01 15:27:36 +01:00
Joachim Henze
5012c6a2b0 [NETCFGX] IDD_TCPIP_BASIC_DLG Radiobuttons need 2 arrow-down-presses instead of one (#6049)
We do have to reorder the controls.
We do have to add some missing WS_TABSTOP in some languages.
We do have to strip some dots in some languages.
2023-12-01 14:19:32 +00:00
Thamatip Chitpong
e0c17c3f46 [DXG] Don't repeat "DXG" module name in version info 2023-12-01 08:23:13 +07:00
Katayama Hirofumi MZ
84e8ea0dd5 [USER32] Fix IsWindow by not using WNDS2_INDESTROY (#6066)
Based on I_Kill_Bugs' IsWinodw.patch.
CORE-11722, CORE-16432
2023-12-01 09:08:58 +09:00
Timo Kreuzer
f92c44b217 [NTOS:KE] Remove KiMask32Array
It's useless and also broken in the way it is used. Replace it with a simple shift and make it correct for 64 bit.
2023-11-30 13:03:52 +02:00
Timo Kreuzer
642c795531 [KERNEL32] Fix 64-bit bug in SetProcessAffinityMask 2023-11-30 13:01:14 +02:00
Katayama Hirofumi MZ
931224fbe1 [IMM32][SDK][NTUSER] Implement CtfImmTIMActivate (#6041)
- Add Imm32InitTLS, Imm32AllocateTLS, Imm32GetTLS,
  Imm32GetCoInitCountSkip, Imm32IncCoInitCountSkip, and
  Imm32DecCoInitCountSkip helper functions to
  control the TLS data.
- Introduce "CoInitialize Spy" (ISPY) to manage COM
  initialization status.
- Implement CtfImmCoInitialize and CtfImmCoUninitialize.
- Implement CtfImmEnterCoInitCountSkipMode and
  CtfImmLeaveCoInitCountSkipMode.
- Implement CtfImmLastEnabledWndDestroy,
  ImmDisableTextFrameService, and CtfImmTIMActivate.
CORE-19268
2023-11-30 17:22:50 +09:00
Eric Kohl
01a8288d28 [UMPNPMGR] Move the pnp event thread to a separate file 2023-11-29 23:03:00 +01:00
Hermès Bélusca-Maïto
8ed5151d33 [BOOTDATA] Add explicit value types as we do for the others.
Addendum to commit fce106ab2.
2023-11-29 19:02:38 +01:00
Whindmar Saksit
fce106ab25 [BOOTDATA] hivesft: Fix URL Protocol registry value (#6058)
"URL Protocol" is a registry value, not a key!

IEFrame later comes along and adds the value covering up the issue for everyone except poor gopher.
2023-11-29 20:40:19 +03:00
Katayama Hirofumi MZ
2aeda3dc15 [SHELL32][SHELL32_APITEST][SDK] Implement PathIsEqualOrSubFolder (#5714)
Implement PathIsEqualOrSubFolder function.
- Add it to <undocshell.h>.
- Add PathIsEqualOrSubFolder testcase.
- Add SHGetPathCchFromIDListW as an
  extension of SHGetPathFromIDListW.
CORE-19278
2023-11-29 22:50:01 +09:00
Thamatip Chitpong
ea8a49d81f [PORTCLS] Don't repeat "PORTCLS" module name in version info 2023-11-29 10:31:14 +07:00
Thamatip Chitpong
82e81b2342 [WS2HELP] Add ws2help.rc to CMakeLists (#6055)
Fix missing dll version info
2023-11-29 07:03:28 +07:00
Thamatip Chitpong
a79bd4d0cc [SETUPAPI] Add dll version info (#6050) 2023-11-28 19:30:34 +07:00
Hermès Bélusca-Maïto
8c3f7b1027 [HALARM] HalpActiveProcessors is a KAFFINITY (see headers) 2023-11-28 12:17:48 +01:00
Eric Kohl
12a5971b7a [NTOS:PNP] Queue a device change event on interface enable or disable 2023-11-27 22:36:52 +01:00
Timo Kreuzer
a64a674980 [TASKMGR] Fix 64-bit bugs 2023-11-27 23:30:51 +02:00
Serge Gautherie
b386ea728f [NTOSKRNL] Remove unused internal/amd64/asmmacro.S
Added, but never(?) used.

Addendum to 99e6ad7 (r46620).
2023-11-27 22:51:51 +02:00
Joachim Henze
628d4a92e9 [TASKMGR] Fix text cutoff statusbar2 CPU%, improve statusbar3 Mem (#5978)
ReactOS taskmgr writes a bit more *useful* dynamically
generated strings in the status-bar field 3 with the memory
than MS Windows XP taskmgr does for example.
Available space in the statusbar is very limited,
therefore we use the following trick to get as much as possible of that helpful text visible
for the majority of the translations:
- We do shrink the CPU% column a bit in width and static text lengths, as it is the one which
has very little variety in length of its dynamic part: 0% to 100%

This improves the display for all languages, and for some languages it also fixes
text-cutoff that we even had with the wider width in the CPU% column already.

also fix an accelerator collision in nl-NL.rc
2023-11-27 17:53:34 +00:00
Doug Lyons
75c67f9b51 [USER32] Fix F1'97 Demo icon not showing in explorer (#5268)
Fixes the F1'97 Demo program (a racing game) not showing an icon in explorer.
This fixes a very special kind of icons which are embedded into the
executable by ancient Watcom C/C++ compilers.
Windows XP/2k3sp2 can show that icon.
Windows Vista/7 cannot show that icon.

Due to the different behavior of the various Windows versions, we
also added a testcase for our bots to protect that functionality in the future,
we committed that test by 0.4.15-dev-7076-g c00d41d91c (#6020)

JIRA issue: CORE-10726
2023-11-27 17:02:08 +00:00
Katayama Hirofumi MZ
f630bbce0a [IEXPLORE][INF] Follow-up of 76b25a7
Adapt icon location to ReactOS. CORE-18625
2023-11-27 21:19:05 +09:00
Katayama Hirofumi MZ
76b25a747a [IEXPLORE][INF] Fix 'Internet Browser' registry settings
HKCR\CLSID\%CLSID_Internet%\ShellFolder" was wrong.
CORE-18625
2023-11-27 21:07:54 +09:00
Katayama Hirofumi MZ
f7a4c26322 [INPUT] Fix exception on SPI_SETDEFALTINPUTLANG (#6043)
Follow-up to #4666. Fix an abnormal termination at setting the default language.
- pCurrent was NULL at the scene. Don't use it there for SPI_SETDEFALTINPUTLANG.
- Save the default keyboard layout. Use it.
CORE-11700, CORE-13244, CORE-18364
2023-11-27 20:25:58 +09:00
Katayama Hirofumi MZ
fb642f727f [IMM32] s/CopyMemory/RtlCopyMemory/
CORE-19268
2023-11-27 16:21:34 +09:00
Doug Lyons
c00d41d91c [USER32_APITEST] Add test for bad 'Icon Groups' but good 'Icons' such as F1'97 (#6020)
Add test for bad 'Icon Groups' but good 'Icons' such as created
by old versions of Watcom C/C++
That icon shows fine in Windows Explorer WinXP/Win2K3,
but does not show in WinVista/Win7 anymore.
A very special corner case.

We will commit the proposed fix shortly after committing the new test.
2023-11-26 15:26:05 +00:00
Andrei Miloiu
e3d97d7dde [PING] Update Romanian (ro-RO) translation (#6010)
Co-authored-by: Joachim Henze <joachim.henze@reactos.org>
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2023-11-26 14:11:45 +00:00
Andrei Miloiu
624b36ad59 [WINLOGON] Update Romanian (ro-RO) translation (#6011)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2023-11-26 14:10:12 +00:00
Hermès Bélusca-Maïto
d0e1d36009 [SDK:LIB] Import PathCch* functions from Wine (#5842)
CORE-12686

Isolate PathCch* functions from Wine implementation in kernelbase
(which are mixed with a ton of unrelated stuff).

These functions are compiled into a pathcch.lib library, similarly
to the one in the official MS PSDK. Excepting that here, their actual
implementation is in the library. This contrasts with the one in the
MS PSDK, which is an import library to an apiset DLL.

The pathcch.h header is an original one, that contains SAL annotations
and descriptive parameter names, based on the MinGW and MS PSDK headers.
Wine's header was not used as it is poor and incomplete.

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
2023-11-26 13:43:15 +01:00
Whindmar Saksit
c7777f5963 [ZIPFLDR] Fix off-by-one count error during enumeration (#6040)
CORE-19342
2023-11-26 13:41:02 +01:00
Katayama Hirofumi MZ
af7defb556 [KERNEL32] Implement SetComPlusPackageInstallStatus 2023-11-26 21:30:00 +09:00
Katayama Hirofumi MZ
f3bd8ffb20 [GDI32_APITEST] Strengthen PatBlt with negative values
CORE-19334
2023-11-26 15:31:00 +09:00
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
Serge Gautherie
5a0cd3743e [WIDL] CMakeLists.txt: Remove an obsolete comment (#6016)
Addendum to 8184186 (r55855).
2023-11-20 16:07:46 +01:00
Katayama Hirofumi MZ
cbc60aa07a [NETSHELL] Double click on component should open properties (#6008)
Based on KRosUser's lanprop.patch. Add NM_DBLCLK handling.
CORE-19330
2023-11-20 21:48:18 +09:00
Katayama Hirofumi MZ
edaeef9418 [SHELL32] Fix exception on modifying deleted file type (#5996)
Based on KRosUser's filetypes.patch. Check NULL for pEntry.
CORE-19324
2023-11-20 09:27:06 +09:00
Justin Miller
516ccad340 [NTOS:KE][HALX86] Implement AP startup code (#5879)
Co-authored-by: Victor Perevertkin <victor.perevertkin@reactos.org>

Introduce the initial changes needed to get other processors up and into kernel mode. 
This only supports x86 as of now but is the first real step towards using other system processors.
2023-11-19 15:51:33 -08:00
Katayama Hirofumi MZ
9e42809fc1 [NETCFGX] Use CheckDlgButton/IsDlgButtonChecked instead of BM_GETCHECK/BM_SETCHECK
CORE-19331
2023-11-20 07:58:58 +09:00
George Bișoc
f3141fb29e [NTOS:CM] Implement support for alternate registry hives
Sometimes repairing a broken hive with a hive log does not always guarantee the hive
in question has fully recovered. In worst cases it could happen the LOG itself is even
corrupt too and that would certainly lead to a total unbootable system. This is most likely
if the victim hive is the SYSTEM hive.

This can be anyhow solved by the help of a mirror hive, or also called an "alternate hive".
Alternate hives serve the purpose as backup hives for primary hives of which there is still
a risk that is not worth taking. For now only the SYSTEM hive is granted the right to have
a backup alternate hive.

=== NOTE ===

Currently the SYSTEM hive can only base upon the alternate SYSTEM.ALT hive, which means the
corresponding LOG file never gets updated. When time comes the existing code must be adapted
to allow the possibility to use .ALT and .LOG hives simultaneously.
2023-11-19 20:44:29 +01:00
George Bișoc
279f8f8864 [CMLIB] Fix the bin during hive initialization from memory if it's corrupt
As we iterate over the chunk hive data pointer for hive bins that we are going
to enlist, we might encounter one or several bins that would get corrupted
during a premature abortion of a registry writing operation such as due to
a power outage of the system, hardware malfunction, etc.

Corruption at the level of hive bins is nasty because they contain actual cell
data of registry information such as keys, values etc. Assuming a bin is corrupt
in part we can fix it by recovering some of the bin properties that, theoretically,
could be fixed -- namely the signature, size and offset.

For size and offset we are more or less safe because a bin typically has a size
of a block, and the offset is the coordinate index of where a hive bin should lay at.
2023-11-19 20:44:29 +01:00
George Bișoc
27917c14ed [NTOS:CM] Flush the dirty data to disk if the SYSTEM hive has been recovered by FreeLdr
If FreeLdr performed recovery against the SYSTEM hive with a log, all of its data is only present in volatile memory thus dirty. So the kernel is responsible to flush all the data that's been recovered within the SYSTEM hive into the backing storage.
2023-11-19 20:44:29 +01:00
George Bișoc
fa80176a62 [FREELDR][HACK] Temporarily disable registry recovery code for AMD64
The newly implemented code for registry recovery makes the FreeLdr binary to grow
in size, to the point that it would BSOD because the PE image is too big.

For now we have to temporarily disable any of the newly added code, until
either FreeLdr is split into a basic PE bootloader image itself and a
"FreeLdrlib" that is used by the PE image to access various bootloader APIs
or another proper solution is found.
2023-11-19 20:44:28 +01:00
George Bișoc
7983b65e10 [FREELDR] Implement SYSTEM hive recovery at bootloader level & use CmCheckRegistry for registry validation
Validate the SYSTEM hive with CmCheckRegistry and purge volatile data with the same function when initializing a hive descriptor for SYSTEM.
Also implement SYSTEM recovery code that takes use of SYSTEM log in case something is fishy with the hive. If hive repair doesn't have fully recovered the SYSTEM hive, FreeLdr will load the alternate variant of the SYSTEM hive, aka SYSTEM.ALT.

If FreeLdr repairs the hive with a LOG, it will mark it with HBOOT_BOOT_RECOVERED_BY_HIVE_LOG on BootRecover field of the header. All the recovered data that is present as dirty in memory will have to be flushed by the kernel once it is in charge of the system.
Otherwise if the system boot occurred by loading SYSTEM.ALT instead, FreeLdr will mark HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE, the kernel will start recovering the main hive as soon as it does any I/O activity into it.
2023-11-19 20:44:28 +01:00
George Bișoc
cce399e772 [ROSLOAD] Use CmCheckRegistry to purge volatile data 2023-11-19 20:44:28 +01:00
George Bișoc
4db1b0fb62 [SDK][CMLIB] Purge volatile data of registry in a proper way with CmCheckRegistry
Thanks to CmCheckRegistry, the function can perform volatile data purging upon boot which this removes old hacky CmPrepareHive code. This also slightly refactors HvInitialize making it more proper.
2023-11-19 20:44:28 +01:00
George Bișoc
cc63d8f4a2 [SDK][CMLIB] Implement log transaction writes & Resuscitation
=== DOCUMENTATION REMARKS ===

This implements (also enables some parts of code been decayed for years) the transacted writing of the registry. Transacted writing (or writing into registry in a transactional way) is an operation that ensures the successfulness can be achieved by monitoring two main points.
In CMLIB, such points are what we internally call them the primary and secondary sequences. A sequence is a numeric field that is incremented each time a writing operation (namely done with the FileWrite function and such) has successfully completed.

The primary sequence is incremented to suggest that the initial work of syncing the registry is in progress. During this phase, the base block header is written into the primary hive file and registry data is being written to said file in form of blocks. Afterwards the seconady sequence
is increment to report completion of the transactional writing of the registry. This operation occurs in HvpWriteHive function (invoked by HvSyncHive for syncing). If the transactional writing fails or if the lazy flushing of the registry fails, LOG files come into play.

Like HvpWriteHive, LOGs are updated by the HvpWriteLog which writes dirty data (base block header included) to the LOG themselves. These files serve for recovery and emergency purposes in case the primary machine hive has been damaged due to previous forced interruption of writing stuff into
the registry hive. With specific recovery algorithms, the data that's been gathered from a LOG will be applied to the primary hive, salvaging it. But if a LOG file is corrupt as well, then the system will perform resuscitation techniques by reconstructing the base block header to reasonable values,
reset the registry signature and whatnot.

This work is an inspiration from PR #3932 by mrmks04 (aka Max Korostil). I have continued his work by doing some more tweaks and whatnot. In addition to that, the whole transaction writing code is documented.

=== IMPORTANT NOTES ===

HvpWriteLog -- Currently this function lacks the ability to grow the log file size since we pretty much lack the necessary code that deals with hive shrinking and log shrinking/growing as well. This part is not super critical for us so this shall be left as a TODO for future.

HvLoadHive -- Currently there's a hack that prevents us from refactoring this function in a proper way. That is, we should not be reading the whole and prepare the hive storage using HvpInitializeMemoryHive which is strictly used for HINIT_MEMORY but rather we must read the hive file block by block
and deconstruct the read buffer from the file so that we can get the bins that we read from the file. With the hive bins we got the hive storage will be prepared based on such bins. If one of the bins is corrupt, self healing is applied in such scenario.

For this matter, if in any case the hive we'll be reading is corrupt we could potentially read corrupt data and lead the system into failure. So we have to perform header and data recovery as well before reading the whole hive.
2023-11-19 20:44:27 +01:00
George Bișoc
d2b8b9ec96 [NTOS:CM] Use the appropriate flags on functions that will call CmCheckRegistry & add missing CmCheckRegistry calls
In addition to that, in some functions like CmFlushKey, CmSaveKey and CmSaveMergedKeys we must validate the underlying hives as a matter of precaution that everything is alright and we don't fuck all the shit up.
2023-11-19 20:44:27 +01:00
George Bișoc
f33da480af [SDK][CMLIB] Implement CmCheckRegistry and validation private helpers
CmCheckRegistry is a function that provides the necessary validation checks for a registry hive. This function usually comes into action when logs have been replayed for example, or when a registry hive internals have changed such as when saving a key, loading a key, etc.

This commit implements the whole Check Registry infrastructure (cmcheck.c) in CMLIB library for ease of usage and wide accessibility across parts of the OS. In addition, two more functions for registry checks are also implemented -- HvValidateHive and HvValidateBin.

Instead of having the CmCheckRegistry implementation in the kernel, it's better to have it in the Configuration Manager library instead (aka CMLIB). The benefits of having it in the library are the following:

- CmCheckRegistry can be used in FreeLdr to fix the SYSTEM hive
- It can be used on-demand in the kernel
- It can be used for offline registry repair tools
- It makes the underlying CmCheckRegistry implementation code debug-able in user mode

CORE-9195
CORE-6762
2023-11-19 20:44:27 +01:00
George Bișoc
54c552392f [SDK][CMLIB] Implement self-heal registry helpers
This implements cmheal.c file which provides the basic registry self-heal infrastructure needed by the public CmCheckRegistry function. The infrastructure provides a range of various self-heal helpers for the hive, such as subkey, class, values and node healing functions.
2023-11-19 20:44:27 +01:00
George Bișoc
586bea138e [CMLIB] Add STATUS_INVALID_PARAMETER and STATUS_REGISTRY_IO_FAILED status codes
Add these NTSTATUS codes in the CMLIB library. STATUS_INVALID_PARAMETER will be used mostly for HvInitialize function, STATUS_REGISTRY_IO_FAILED for whatever routines that deal with reading or writing into a hive file.
2023-11-19 20:44:26 +01:00
George Bișoc
bfcb28787d [NTOS:CM] Disable hard errors when setting up a new size for a hive file / annotate CmpFileSetSize parameters with SAL
During a I/O failure of whatever kind the upper-level driver, namely a FSD, can raise a hard error and a deadlock can occur. We wouldn't want that to happen for particular files like hives or logs so in such cases we must disable hard errors before toying with hives until we're done.

In addition to that, annotate the CmpFileSetSize function's parameters with SAL.
2023-11-19 20:44:26 +01:00
George Bișoc
0d776beac9 [NTOS:CM] Ignore syncing/flushing requests after registry shutdown
When shutting down the registry of the system we don't want that the registry in question gets poked again, such as flushing the hives or syncing the hives and respective logs for example. The reasoning behind this is very simple, during a complete shutdown the system does final check-ups and stuff until the computer
shuts down.

Any writing operations done to the registry can lead to erratic behaviors. CmShutdownSystem call already invokes a final flushing of all the hives on the backing storage which is more than enough to ensure consistency of the last session configuration. So after that final flushing, mark HvShutdownComplete as TRUE indicating
that any eventual flushing or syncying (in the case where HvSyncHive gets called) request is outright ignored.
2023-11-19 20:44:26 +01:00
George Bișoc
99fab7b905 [SDK][CMLIB] Declare some BootType and BootRecover identifiers & Miscellaneous Stuff
=== DOCUMENTATION REMARKS ===

HBOOT_TYPE_REGULAR and HBOOT_TYPE_SELF_HEAL are boot type values set up by the CMLIB library (for the BootType field respectively). HBOOT_TYPE_REGULAR indicates a normal system boot whereas HBOOT_TYPE_SELF_HEAL indicates the system boot is assisted within self healing mode.

Whether the former or the latter value is set it's governed by both the kernel and the bootloader. The bootloader and the kernel negotiate together to determine if any of the registry properties (the hive, the base block, the registry base, etc) are so severed from corruption or not. In extreme cases where
registry healing is possible, the specific base block of the damaged hive will have its flags marked with HBOOT_TYPE_SELF_HEAL. At this point the boot phase procedure is orchestrated since the boot phase no longer goes on the default path but it's assisted, as I have already said above.

HBOOT_NO_BOOT_RECOVER, HBOOT_BOOT_RECOVERED_BY_HIVE_LOG and HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE on the other hand are identifiers for the BootRecover field of the BASE_BLOCK header structure. These are used exclusively by FreeLdr to tell the kernel if the bootloader recovered the SYSTEM hive or not. In case where the bootloader did recover the SYSTEM hive,
the kernel will perform a flush request on the dirty data down to disk. The (almost) worse case FreeLdr could not repair the main hive by applying log data, it will load the alternate mirror version of the hive.

In addition to that, declare other miscellaneous CMLIB identifiers for log transaction writes purposes.
2023-11-19 20:44:23 +01:00
Serge Gautherie
2cc7eeb939 [HALX86] Add missing \n to DPRINT() calls (#5993)
And promote some DPRINT() to DPRINT1().
2023-11-19 19:44:46 +01:00
Serge Gautherie
d27ec14822 [PSDK][SHELLBTRFS] Get rid of FILE_INFO_BY_HANDLE_CLASS.MaximumFileInfoByHandlesClass (#6003)
Follow-up to commit 455f330 (see PR #5802).
'MaximumFileInfoByHandlesClass' was our typo.
2023-11-19 19:42:18 +01:00
Hermès Bélusca-Maïto
5ee1dc6113 [USETUP] Don't error out in case one tries to "delete" empty partition space.
Just... don't delete it ¯\_(ツ)_/¯
2023-11-19 16:44:34 +01:00
Andrei Miloiu
b578846d82 [DOC] Update Romanian translation notes (#5908) 2023-11-19 16:40:18 +01:00
Andrei Miloiu
84216a9ebc [MMSYS] Update Romanian (ro-RO) translation (#6001) 2023-11-19 16:39:10 +01:00
Andrei Miloiu
d6b7b7adad [COMDLG32] Update Romanian (ro-RO) translation (#6000) 2023-11-19 16:38:22 +01:00
Andrei Miloiu
a96573c4e5 [MSACM32] Update Romanian (ro-RO) translation (#5999) 2023-11-19 16:37:43 +01:00
Andrei Miloiu
fddc83ef9a [SHIMGVW] Update Romanian (ro-RO) translation (#5998) 2023-11-19 16:37:08 +01:00
Andrei Miloiu
af5a3ffedb [SHDOCLC] Update Romanian (ro-RO) translation (#5997) 2023-11-19 16:36:07 +01:00
Joachim Henze
4939936165 [NETCFGX] Strip 2x wrong WS_DISABLED style on dlgs (#5987)
I checked: those are not present in german XPSP3 for those dlgs.
I noticed that subtle thing just by the fact that the de-DE.rc had one
less of those compared to all other languages.
I don't know why those were added, but it is like that since eternity already,
e.g. see ebc7599c6d from ancient 2008 SVN r36325 times had them already.
2023-11-19 14:37:29 +00:00
Timo Kreuzer
aff1666356 [ADVAPI32] Improve handling of unaligned key name in RegOpenKeyExW
Check for unaligned buffer before calling NtOpenKey instead of checking the result for STATUS_DATATYPE_MISALIGNMENT.
2023-11-19 15:32:39 +02:00
Katayama Hirofumi MZ
f95c789f2b [SHELL32] Select 1st item after deletion of file type (#6007)
Based on KRosUser's filestypedel.patch.
- Select the first item after the user deleted a
  file type.
CORE-19325
2023-11-19 22:16:03 +09:00
Katayama Hirofumi MZ
ede60035f4 [CALC] Adapt to <strsafe.h> (#5894)
Use safer string functions of  <strsafe.h>.
Use StringCbPrintf instead of _stprintf.
Use StringCbCopy insteaad of _tcscpy.
Use StringCbCat instead of _tcscat.
CORE-19306
2023-11-19 21:46:00 +09:00
Katayama Hirofumi MZ
80c4856bba [INPUT] Implement advanced settings (#5864)
Allow the user to turn off "Advanced Text Service".
[HKEY_CURRENT_USER\Software\Microsoft\CTF]
"Disable Thread Input Manager"=dword:00000001
Implement AdvancedSettingsPageProc procedure.
Modify IDS_REBOOT_NOW resource string.
CORE-19268
2023-11-19 21:39:06 +09:00
Katayama Hirofumi MZ
b6a0ef10d2 [STOBJECT] Remove #if 0 and #endif in Volume_IsMute (#5973)
Based on KRosUser's volume.patch.
The pair of #if 0 and #endif was added in 180b6fb.
CORE-18583
2023-11-19 21:28:37 +09:00
Katayama Hirofumi MZ
d5cfd83789 [HOTPLUG] Update Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:51:59 +09:00
Katayama Hirofumi MZ
6a63d4a3c1 [DEVCPUX] Add Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:44:25 +09:00
Katayama Hirofumi MZ
e2988b537a [DESKADP] Add Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:39:30 +09:00
Katayama Hirofumi MZ
4aeaf747d1 [CRYPTEXT] Add Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:34:39 +09:00
Katayama Hirofumi MZ
ef754b121a [ACPPAGE] Add Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:29:56 +09:00
Katayama Hirofumi MZ
69d7adbebc [DESKMON] Add Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:17:25 +09:00
Katayama Hirofumi MZ
da18e2893b [NETPLWIZ] Add Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:12:17 +09:00
Katayama Hirofumi MZ
c9295fbeeb [STOBJECT] Add Japanese (ja-JP) translation
CORE-18706
2023-11-19 20:06:50 +09:00
Timo Kreuzer
e3f204e228 [CMAKE] Remove "/Gy" option from ML
Reason: VS solution builds pass the compiler options to the assembler. These are usually ignored and result in a warning only, but ML of the latest VS supports /Gy (function level linking), but that requires all functions to be declared with "PROC" and otherwise results in an error.
2023-11-19 09:19:33 +02:00
Katayama Hirofumi MZ
72081168fb [MSPAINT] Introduce partial image history (#5994)
- Add IMAGE_PART structure and use as history items.
- Overload ImageModel::PushImageForUndo(const RECT& rcPartial).
- Add ToolsModel::GetToolSize.
- Implement partial image history on TwoPointDrawTool.
CORE-19094
2023-11-19 12:59:39 +09:00
Katayama Hirofumi MZ
416d63026e [ACCESS] Improve IDC_RESET_COMBO selection (#5893)
Based on KRosUser's access.patch. CORE-19303
2023-11-19 10:33:18 +09:00
Andrei Miloiu
0a7a2824cf [WININET] Update Romanian (ro-RO) translation (#5992) 2023-11-18 22:41:25 +01:00
Andrei Miloiu
a6a617f96c [VGAFONTEDIT] Update Romanian (ro-RO) translation (#5991) 2023-11-18 22:40:18 +01:00
Andrei Miloiu
a9445f5ff6 [MPR] Update Romanian (ro-RO) translation (#5990) 2023-11-18 22:39:02 +01:00
Andrei Miloiu
444cff7b10 [NEWDEV] Update Romanian (ro-RO) translation (#5989) 2023-11-18 22:37:56 +01:00
Timo Kreuzer
455f330775 [KERNEL32_VISTA] Sync GetFileInformationByHandleEx with wine head 2023-11-18 17:53:42 +02:00
Timo Kreuzer
908cda5ee4 [KMTEST] Fix duplicated test names to stop testman from blowing up 2023-11-18 15:01:06 +02:00
Katayama Hirofumi MZ
764e5505a7 [MSPAINT] Add get/putSubImage in dib.cpp and use them
CORE-19094
2023-11-18 14:25:19 +09:00
Katayama Hirofumi MZ
a65ebc8a71 [MSPAINT] Fix PushImageForUndo (follow-up of 7c0615f)
CORE-19226, CORE-19237
2023-11-18 11:37:43 +09:00
Katayama Hirofumi MZ
a58aee5f5b [MSPAINT] Use Swap in RegistrySettings::SetMostRecentFile
CORE-19237
2023-11-18 11:23:13 +09:00
Katayama Hirofumi MZ
7c0615fa05 [MSPAINT] Split master image from history items
CORE-19237
2023-11-18 11:19:38 +09:00
Timo Kreuzer
bf95b7e8e5 [NTOS:CC] Do not access VACB after decrementing it's reference count
It might already be deleted by a different thread.
2023-11-17 20:07:55 +02:00
Katayama Hirofumi MZ
a2a063a282 [INETCPL] Let image list be automatically deleted (#5892)
Based on KRosUser's inetsec.patch.
Don't delete the image list because the image list will be automatically deleted by the list view.
CORE-19301
2023-11-17 10:11:41 +09:00
Katayama Hirofumi MZ
8860dc5393 [BOOTDATA] LiveCD: Enable Toggle key (Alt+Shift etc.) (#5985) 2023-11-16 22:23:11 +00:00
Serge Gautherie
780c2a0375 [SERVICES][SETUPLIB][UMANDLG][USETUP] Add missing \n to DPRINT() calls (#5983)
And promote 1 DPRINT() to DPRINT1.
2023-11-16 22:22:12 +00:00
Hermès Bélusca-Maïto
98353cdb37 [CMD] Use correct console input mode in ConInString()
ENABLE_PROCESSED_INPUT is necessary to correctly deal with CR-LF
and display it only when necessary. Fixes cmd:batch winetests.

Addendum to commit db219e45c
2023-11-16 21:58:54 +01:00
Serge Gautherie
a5c3bb5bce [WIN32KNT_APITEST] 2 minor code improvements and a first fix (#5980)
- Update .rc filename; addendum to 7ad21a4 (r70458).
- Move one '#include "resource.h"' around to where it is needed.
  Addendum to e1b2e7a (r29284) then ec5e0ea (r48103).
- Adjust all '#include <win32nt.h>'
2023-11-16 21:57:10 +01:00
George Bișoc
1d8ce79080 [NTDLL_APITEST] Write some tests for NtSetDefaultLocale 2023-11-16 21:09:08 +01:00
George Bișoc
6438b85605 [NTOS:EX] Bail out on an invalid locale or language ID
NtSetDefaultLocale and ExpSetCurrentUserUILanguage do not probe the given locale or language ID,
and as a result of that these functions would happily take any given argument. This is problematic
because overwriting NLS data (specifically the Default registry key value as its gets set by the
NtSetDefaultLocale syscall itself) with garbage stuff, rendering the system completely unbootable.

In addition to that, these functions do not check the captured language/locale ID against pre-determined
locales or languages pre-installed in the system. This basically means an ID of 1, for example, is still
valid because it is not bogus albeit there is no such a locale of an ID of 1. That value would get passed
to the Default value key and that renders the system unbootable as well.

CORE-18100
2023-11-16 21:09:05 +01:00
Hermès Bélusca-Maïto
db219e45c0 [CMD] Fix missing/misplaced newlines at end of displayed errors and prompts.
ConInString() should display a newline when it encounters the terminating
carriage-return pressed by the user for ending string output.
+ Remove the extra \n hacks in FilePromptYN[A].

Improve outputted strings from DATE and TIME commands.
+ Rename some STRING_***_ERROR defines.

CORE-18489
2023-11-16 17:06:40 +01:00
Hermès Bélusca-Maïto
cef9f5c4a6 [RTL] Minor formatting, remove redundant 'return'. 2023-11-16 17:06:40 +01:00
Andrei Miloiu
6a6b5ec22c [INF] Update Romanian (ro-RO) translation (#5969) 2023-11-16 13:34:43 +01:00
Andrei Miloiu
f61f3b0b00 [TASKKILL] Update Romanian (ro-RO) translation (#5954) 2023-11-16 13:33:55 +01:00
Katayama Hirofumi MZ
157739a658 [MSPAINT] s/AirBrushWidth/AirBrushRadius/
Fix logical error. CORE-19094
2023-11-16 15:45:06 +09:00
Katayama Hirofumi MZ
3faa56d2c7 [CRYPTUI] Let image list be automatically deleted (#5891)
Based on KRosUser's cryptui.patch.
- Don't delete the image list because the list view will delete the image list automatically.
CORE-17290
2023-11-16 14:58:49 +09:00
Serge Gautherie
24757e30e9 [NTDDRAW][NTGDI][VGADDI] Add missing \n to DPRINT() calls (#5952)
Add missing \n to DPRINT() calls and demote some DPRINT1().
2023-11-15 21:07:27 +01:00
Ratin Gao
bd0a5498b0 [NTDLL:LDR] Little fixes about SAL annotation and behavior (#5793)
- Uniform function declarations in .c and .h with fixes and SAL2 improvements.
- Use LDR_[UN]LOCK_LOADER_LOCK_FLAG_XXX correctly.
- Fix incorrect UsedSize calculation in LdrQueryProcessModuleInformationEx (caught by ThFabba).
- Whatever the callback request stop the enumeration or not in LdrEnumerateLoadedModules, the following operations should be the same.
- Fix 2 incorrect DPRINT1 that printed incorrect parameter.
- Return error if RtlAllocateHeap failed in LdrpGetProcedureAddress, and add comments about NT6.2 new changes.
2023-11-15 20:59:32 +01:00
Andrei Miloiu
bd9e2d6beb [FIND] Update Romanian (ro-RO) translation (#5965) 2023-11-15 11:27:09 +01:00
Whindmar Saksit
51ba3b1fb4 [SHELL32] Don't display missing applications in "Open with..." (#5587)
Don't display applications that don't exist. In Windows XP, Exe files that no longer exist are hidden but their registry entry is not deleted.

JIRA issue: CORE-19117
2023-11-15 11:20:04 +01:00
Whindmar Saksit
8025785730 [ADVAPI32] RegEnumKeyExW on HKCR keys must work with just KEY_ENUMERATE_SUB_KEYS access (#5872)
This fixes Windows RegEdit when the same HKCR key exists in HKCU and HKLM.
2023-11-15 11:07:28 +01:00
Andrei Miloiu
2414a21a38 [MSCONFIG_NEW] Update Romanian (ro-RO) translation (#5968) 2023-11-15 11:02:12 +01:00
Andrei Miloiu
08820b747e [EVENTVWR] Update Romanian (ro-RO) translation (#5979) 2023-11-15 11:01:46 +01:00
Andrei Miloiu
4ada65e875 [MSCONFIG] Update Romanian (ro-RO) translation (#5967) 2023-11-15 11:00:40 +01:00
Andrei Miloiu
1313179a32 [DEVMGR] Update Romanian (ro-RO) translation (#5960) 2023-11-15 10:59:48 +01:00
Andrei Miloiu
03dc2ef724 [REGEDIT] Update Romanian (ro-RO) translation (#5961) 2023-11-15 10:59:01 +01:00
Andrei Miloiu
86b6d9dff9 [FLTMC] Update Romanian (ro-RO) translation (#5956) 2023-11-15 10:57:50 +01:00
Andrei Miloiu
3b25db2f8e [DXDIAG] Update Romanian (ro-RO) translation (#5955) 2023-11-15 10:57:15 +01:00
Andrei Miloiu
f13a7de30c [MAGNIFY] Update Romanian (ro-RO) translation (#5964) 2023-11-15 10:56:39 +01:00
Andrei Miloiu
473cb2fe50 [SYSSETUP] Update Romanian (ro-RO) translation (#5957) 2023-11-15 10:55:37 +01:00
Andrei Miloiu
146d3f0bfe [SHELL32] Update Romanian (ro-RO) translation (#5962) 2023-11-15 10:52:26 +01:00
Andrei Miloiu
095791663d [SERVMAN] Update Romanian (ro-RO) translation (#5982) 2023-11-15 10:51:59 +01:00
Andrei Miloiu
5f25a55d64 [NOTEPAD] Update Romanian (ro-RO) translation (#5981) 2023-11-15 10:51:38 +01:00
Andrei Miloiu
e038927dd4 [MORE] Update Romanian (ro-RO) translation (#5966) 2023-11-15 10:51:21 +01:00
Andrew Shelkovenko
85ab39507f [TRANSLATION] Update Russian (ru-RU) translation (#5953)
- [CALC] Update Russian (ru-RU) translation
- [CHARMAP] Update Russian (ru-RU) translation
- [AT] Update Russian (ru-RU) translation
- [ATTRIB] Update Russian (ru-RU) translation
- [COMP] Improve Russian (ru-RU) translation
- [FC] Improve Russian (ru-RU) translation
- [FIND] Update Russian (ru-RU) translation
- [XCOPY] Update Russian (ru-RU) translation
- [FLTMC] Update Russian (ru-RU) translation

Reviewed-by: Oleg Dubinskiy <oleg.dubinskij30@gmail.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2023-11-15 02:00:36 +03:00
Andrei Miloiu
1c56c9cd5f [MSTSC] Update Romanian (ro-RO) translation (#5959) 2023-11-14 14:00:32 +00:00
Andrei Miloiu
3ce9e3b669 [DESK] Update Romanian (ro-RO) translation (#5958) 2023-11-14 13:59:17 +00:00
Joachim Henze
b693eddd74 [TASKMGR] Harmonize and beautify the borders in performance tab (#5949)
- When I started I actually just wanted to make the 2 red lines the same length. see PR-pic
- Ultimately I was able to harmonize all ctrls sizes and position for all rc's.
- This does also fix text truncation and overflows in several rc's.
- Also this prevents the numbers (actual data) in some rc's to be cut off much earlier than in others,
  e.g. hu-HU.rc had IDC_KERNEL_MEMORY_PAGED width just 33 which is very small and will lead to quick truncation.
  Now all languages use width 45 for all data fields and width 57 for all text fields,
  which means if truncation would ever happen with very large numbers in the 64bit era,
  we will see that happen in all rc's at the same moment and not arbitrarily scattered over a century.
  It will happen later after this PR is applied.
- After this PR the two red lines do have the same length. see PR-pic
- After this PR the two green lines do have the same length. see PR-pic
- After this PR the two yellow lines do have the same length. see PR-pic
- After this PR the four brown lines do have the same length. see PR-pic
- After this PR the five cyan lines do have the same length. see PR-pic
2023-11-14 13:57:17 +00:00
Hermès Bélusca-Maïto
161eb5d375 [CRT] dbgrpt.cpp: Fix buffer sizes in the *nprintf functions (#5678)
Sizes are in number of chars; use _countof() instead of hardcoding
them in the functions.
2023-11-14 12:24:00 +01:00
Hermès Bélusca-Maïto
f49e213943 [CRT][MSVCRT] Implement _CrtDbgReport(W)V and redefine _CrtDbgReport(W) around those (#5678)
Also add the internal _VCrtDbgReportA and _VCrtDbgReportW functions listed in
https://learn.microsoft.com/en-us/cpp/c-runtime-library/internal-crt-globals-and-functions?view=msvc-170

CORE-11835, CORE-15517
2023-11-14 12:23:51 +01:00
Serge Gautherie
7901a4c8fe [WIN32KNT_APITEST] w32knapi.c: Update dll name (#5977)
Addendum to commits 7ad21a4 (r70458) and bed6d00 (r76026).
2023-11-14 12:14:39 +01:00
Katayama Hirofumi MZ
91adec683d [SHIMGVW] Add file extension on file save (#5975)
In order to add a filename extension if necessary,
set "png" to OPENFILENAME.lpstrDefExt.
CORE-19222
2023-11-14 19:48:18 +09:00
Serge Gautherie
3fb5957de1 [NTOS:EX][CSRSRV][WIN32K] Make a few #define more explicit/strict (#5907)
- Add parentheses around macro parameters.
- Add casts on return value for the Interlocked*UL ("Unsigned Long") macros.
2023-11-13 20:55:48 +01:00
Whindmar Saksit
e07dbf782c [NETSHELL] Display component icons in list (#5904)
Display the class icons for the installed network components.
Also fixes a bug where the selection change whacked the checkbox of the first item.

Use 0x7fffffff to append the item at the end of the list, as optimization.
2023-11-13 20:51:52 +01:00
Dmitry Borisov
8d7153c8ba [FREELDR] Implement NOSERIALMICE and FASTDETECT options (#5886)
Enable FASTDETECT by default, as done in NT 5+. This is because
the serial mouse is recognized by the serial stack since NT 5.x.
2023-11-13 19:49:41 +01:00
Hermès Bélusca-Maïto
10e7643c80 [FREELDR:NTLDR] Pass boot-time detection options to HwDetect routines.
Will be used for supporting /NOSERIALMICE, /FASTDETECT (NT 5+) switches
(see PR #5886), as well as the undocumented /PCIENUM option.
2023-11-13 19:19:40 +01:00
Whindmar Saksit
413b5a0827 [ADVAPI32] Handle HKEY_CLASSES_ROOT in RegQueryInfoKeyW (#5870)
CORE-8582 , CORE-14676

This fixes the bug where Regedit is unable to show all the keys in HKCR when a key exists in both HKCU and HKLM.
2023-11-13 18:02:41 +01:00
Whindmar Saksit
6eb8a1d0c7 [ADVPACK] Handle ADN_DEL_IF_EMPTY in DelNodeW and DelNodeRunDLL32 (#5821)
- Handling ADN_DEL_IF_EMPTY is critical to avoid data loss.
- SetFileAttributesW failing is not fatal, the delete might still succeed.

NOTE: Not in Wine yet.
2023-11-13 16:42:26 +01:00
Whindmar Saksit
f283a3f9ae [SHELL32][SHELLEXT] IEnumIDList::Next must handle pceltFetched and memory errors correctly (#5820)
- pceltFetched can be NULL if the caller is not requesting multiple items.
- All entries returned in rgelt must be valid, they cannot be NULL.
2023-11-13 16:31:37 +01:00
Hermès Bélusca-Maïto
b4b1c5b9aa [DEVMGR] Fix some bugs spotted by Thomas Faber in PR #5775 (#5790)
- Fix TCHAR/WCHAR mis-usage,
- Fix as a result, a buffer overflow (GlobalAlloc takes the size in
  bytes, but a number of characters was passed to it instead).
- Remove usage of unsafe string function. Now the item text is directly
  retrieved within the allocated buffer.
2023-11-13 16:26:00 +01:00
Whindmar Saksit
7fb91d98f9 [SHELL32] Add support for more registry verb flags and CMF flags (#5785)
- Adds support for registry controlled menu separators and the documented
  values to turn off verbs.
- Adds support for CMF_OPTIMIZEFORINVOKE, CMF_NODEFAULT, CMF_DONOTPICKDEFAULT,
  CMF_EXPLORE and CMF_DISABLEDVERBS.

Bugs fixed:

- A verb with "Extended" set in the registry could cause the menu to invoke
  the incorrect command! This happened because skipping InsertMenuItemW
  caused InvokeCommand to use the wrong index with m_StaticEntries.
- Uses IS_INTRESOURCE instead of HIWORD to check if something is a string
  (only matters on 64-bit).
- TryToBrowse leaking a PIDL when calling ILCombine.

Notes:

- This PR introduces the RosGetProcessEffectiveVersion() helper function
  discussed in chat.
- Relaxed FAILED_UNEXPECTEDLY to FAILED in two places because IContextMenu
  cannot assume that it has a site that leads to IShellBrowser.
2023-11-13 16:21:13 +01:00
Whindmar Saksit
23f31cf7b4 [SHELL32] Support more FOLDERFLAGS in DefView (#5760)
This adds support for more of the FOLDERSETTINGS FOLDERFLAGS.

- Turned on LVS_EX_DOUBLEBUFFER even though there is no setting for it.
  XP has it on for folders but not the desktop and this matches that.
  Vista might turn it on for its shadow labels on the desktop, further
  investigation required.

- Fixes a bug where LVS_EX_SNAPTOGRID was incorrectly assigned where
  the WS_EX flags go.

- LVS_AUTOARRANGE seems to be incorrectly forced on but for compatibility
  I decided to leave it but added a comment. The existing code already
  has the check for FWF_AUTOARRANGE.
2023-11-13 16:13:21 +01:00
Serge Gautherie
bac646f9fe [VMX_SVGA] Demote 3 DPRINT1() and define NDEBUG (#5843)
Addendum to 486e587 (r45778).
2023-11-13 11:11:10 +01:00
Whindmar Saksit
c6ec8d924e [ATL] Added CComPtr.CoCreateInstance helper methods (#5905) 2023-11-13 11:03:05 +01:00
Serge Gautherie
8d54c2d433 [WIN32U_VISTA] .def: Delete this obsolete file (#5931) 2023-11-13 11:01:31 +01:00
Jose Carlos Jesus
357189bdea [USETUP][SHELL32][ACCESS] Improve Portuguese (pt-PT) Translation (#5897) 2023-11-13 10:59:05 +01:00
Andrei Miloiu
6d7cc0d8ad [MORE] Update Romanian (ro-RO) translation (#5941) 2023-11-13 10:57:36 +01:00
Andrei Miloiu
cb8c554c4c [LABEL] Update Romanian (ro-RO) translation (#5939) 2023-11-13 10:55:16 +01:00
Andrei Miloiu
39bec4df92 [ATTRIB] Update Romanian (ro-RO) translation (#5936) 2023-11-13 10:53:36 +01:00
Andrei Miloiu
1d12f6135a [POWERCFG] Update Romanian (ro-RO) translation (#5934) 2023-11-13 10:53:03 +01:00
Andrei Miloiu
e743146a10 [FIND] Update Romanian (ro-RO) translation (#5937) 2023-11-13 10:51:38 +01:00
Joachim Henze
1997c12252 [NETCFGX] 640x480-ify (#5946)
This finishes the 640x480-ification within [NETCFGX]. All dlgs addressed now.

- Allows the final 3 property sheets IDD_TCPIP_ADVIP_DLG, IDD_TCPIP_ADVDNS_DLG and IDD_TCPIP_ADVOPT_DLG to be displayed fine in 640x480 screen resolution by limiting their dlg unit height to 220
- tweaks a bit of the controls vertical positions to look better, e.g. LTEXT "interface metric:" was moved one pix upwards relative to IDC_METRIC to make that look more vertically centered
- IDC_AUTOMETRIC checkbox was moved slightly upwards in relation to the groupbox it was embedded into, which does it make look slightly better
- width of IDC_SUFFIX was enlarged for all languages to the value that was historically chosen for uk-UA.rc. (Only ru-RU.rc continues to do that differently, as it uses even longer text and therefore has to shift 2 controls towards the left to make that fit into the dlg. That part was there also before this PR)
2023-11-13 01:56:38 +00:00
Hermès Bélusca-Maïto
ee11747527 [CRT] Fix "wcsat_s" typo... 2023-11-11 21:30:09 +01:00
Timo Kreuzer
83e1193fb2 [WIN32K] Fix alignment checks in NtUserSetInformationThread
Fixes random failures on x64.
2023-11-10 19:42:13 +02:00
Timo Kreuzer
6ca8eb5c1e [CMAKE] Update baseaddress cmake files 2023-11-10 19:20:24 +02:00
Timo Kreuzer
7377f14339 [GEN_BASEADDRESS] Add handling of 64 bit builds 2023-11-10 19:20:24 +02:00
Timo Kreuzer
9cc4d8994b [CMAKE] Use baseaddress64.cmake for all 64 bit builds
- Rename baseaddress_msvc_x64.cmake to baseaddress64.cmake
- Include it for all compilers and 64 bit architectures
2023-11-10 19:20:24 +02:00
Timo Kreuzer
2b7246fd3c [CMAKE] Add support for "IMAGEBASE default" and use it for test/sample dlls 2023-11-10 19:20:24 +02:00
Timo Kreuzer
58f1201eae [FUSION] Provide baseaddress for fusion_1_1 and fusion_2_0
These DLLs are also named fusion.dll. Give them the same baseaddress as fusion.dll
2023-11-10 19:20:24 +02:00
Timo Kreuzer
2245dd78f5 [ASMPP] Improve handling of rip relative addressing 2023-11-10 19:20:24 +02:00
Timo Kreuzer
a34f1ed03c [CRT] Make ML based asm code GAS compatible
Our transpiler asmpp cannot handle rip relative addressing for "[symbol]".
2023-11-10 19:20:24 +02:00
Timo Kreuzer
d4993c67cd [CRT] Fix parameter check for _memicmp on NT 6+
Fixes a crash in msvcrt_winetest:string
2023-11-10 19:19:22 +02:00
Timo Kreuzer
840dfdc3a1 [CRT] Add parameter check to _mbscmp
Fixes crash in msvcrt_winetest::string
2023-11-10 19:19:22 +02:00
Timo Kreuzer
86f98baaf8 [CRT][MSVCRT] Import _gcvt and _gcvt_s from wine and export _gcvt_s on Vista+
Fixes a crash in msvcrt_winetest string
2023-11-10 19:19:22 +02:00
Timo Kreuzer
a3d22bba1a [RTL_APITEST] Move RtlIntSafe test from kmtest to rtl_apitest 2023-11-10 19:00:41 +02:00
Timo Kreuzer
bdf52a9868 [RTL_APITEST] Add rtl_unittest
First test is RtlCaptureContext
2023-11-10 19:00:41 +02:00
Timo Kreuzer
51b5d846e9 [CRT] Define _NTSYSTEM_ in 2 files to force using import-stubs
This prevents the code from linking to __imp_*, which would pull in the symbol from the import library (e.g. kernel32), which creates problems with the GNU linker, which doesn't like to have the import and a static definition at the same time.
2023-11-10 19:00:41 +02:00
Timo Kreuzer
520cf2294d [APITESTS] Share ok_eq_* macros between apitests and kmtests
This makes it possible to share sources between kmtest and apitests, e.g. for rtl.
2023-11-10 19:00:41 +02:00
Timo Kreuzer
5ecead80e3 [RTL] Add object library rtl_um 2023-11-10 19:00:41 +02:00
Timo Kreuzer
4bd1e81998 [RTL] Get rid of x86 asm version of RtlpGetStackLimits
There is no point in writing this function in asm.
2023-11-10 19:00:41 +02:00
Joachim Henze
393a88a372 [POWERCFG] 640x480-ify and overhaul (#5933)
Main goal was making the dlg display well in 640x480 resolution.
Since the dialogs in that propsheet had very different sizes between the languages
that was a lot of work. Now all of the propsheet-dlgs are harmonized in size to 252x220.
Also I found a way to align some controls in a way that they are more immune
to differing languages lengths for specific strings, so we can currently
to 100% use the same controls dimensions and positions also,
which is a very nice trait. I double-checked all dialogs visually in ResHacker
for all languages (except no-NO.rc for technical reasons), and they do look all
very well like that. The slider for the alarms dlg I enlarged in x,
it has 100 distinct positions, so a larger slider helps the user
not having to position the mouse extremely accurate.
I also fixed various typos, and several places where text cutoff occurred for many languages,
too many to name them all.
Some dummy-strings "unknown" I changed to "?" instead.
That still allows to see its position in a previewer,
but does not lure all the translators into translating that nonsense,
and therefore keeps the rcs better in sync. It also shrinks binary size.
2023-11-09 23:33:17 +00:00
Andrei Miloiu
565bf9e340 [CMD] Update Romanian (ro-RO) translation (#5918) 2023-11-08 20:11:03 +01:00
Andrei Miloiu
3666f2bdbc [IEFRAME] Update Romanian (ro-RO) translation (#5923) 2023-11-08 20:07:04 +01:00
Andrei Miloiu
a575921e93 [LOCALMON] Update Romanian (ro-RO) translation (#5925) 2023-11-08 20:06:16 +01:00
Andrei Miloiu
df24297a10 [INPUT] Update Romanian (ro-RO) translation (#5930) 2023-11-08 20:05:17 +01:00
Andrei Miloiu
dd8029fd0e [SNDREC32] Update Romanian (ro-RO) translation (#5916) 2023-11-08 20:04:46 +01:00
Andrei Miloiu
f1e1ca4ad7 [WORDPAD] Update Romanian (ro-RO) translation (#5917) 2023-11-08 20:04:18 +01:00
Andrei Miloiu
51cc0019f7 [CLIPBRD] Update Romanian (ro-RO) translation (#5909) 2023-11-08 20:01:58 +01:00
Andrei Miloiu
3285d2c769 [MSPAINT] Update Romanian (ro-RO) translation (#5913) 2023-11-08 20:01:21 +01:00
Andrei Miloiu
aca3f92a47 [CONSOLE] Update Romanian (ro-RO) translation (#5919) 2023-11-08 19:59:07 +01:00
Andrei Miloiu
5ee25ee392 [DXDIAG] Update Romanian (ro-RO) translation (#5910) 2023-11-08 19:58:21 +01:00
Andrei Miloiu
328a5d87b0 [HDWWIZ] Update Romanian (ro-RO) translation (#5921) 2023-11-08 19:57:40 +01:00
Andrei Miloiu
c6ed289383 [RASDLG] Update Romanian (ro-RO) translation (#5924) 2023-11-08 19:57:02 +01:00
Joachim Henze
7cd1e606df [OPENGLCFG] 640x480-ify (#5906)
A simple one
2023-11-08 14:44:31 +01:00
Andrei Miloiu
416e6ef814 [MYEVENTPROVIDER_DLL][MC] Update MyEventProvider.mc (#5929) 2023-11-08 11:18:07 +00:00
Andrei Miloiu
d7b7d36721 [NETEVENT][MC] Update neteventmsg.mc (#5928) 2023-11-08 11:16:58 +00:00
Andrei Miloiu
6e9d798833 [NETMSG][MC] Update net_msg.mc (#5927) 2023-11-08 11:14:59 +00:00
Andrei Miloiu
46f67b1970 Update net_msg.mc (#5926) 2023-11-08 11:13:17 +00:00
Andrei Miloiu
ff0b63ff2e [INETCPL] Update Romanian (ro-RO) translation (#5922) 2023-11-08 11:05:06 +00:00
Katayama Hirofumi MZ
c6c7fc1182 [RAPPS] Fix item icons (#5896)
Based on KRosUser's rapps_v2.patch.
ExtractIconW can return (HICON)1.
We check this invalid value.
CORE-19317
2023-11-08 19:53:02 +09:00
Andrei Miloiu
97bf53eeb8 [DESK] Update Romanian (ro-RO) translation (#5920) 2023-11-08 10:43:14 +00:00
Andrei Miloiu
2b910fc1b3 [NOTEPAD] Update Romanian (ro-RO) translation (#5915) 2023-11-08 10:34:25 +00:00
Andrei Miloiu
1795049341 [MSTSC] Update Romanian (ro-RO) translation (#5914) 2023-11-08 10:32:38 +00:00
Andrei Miloiu
692c0141d3 [MMC] Update Romanian (ro-RO) translation (#5912) 2023-11-08 10:26:33 +00:00
Andrei Miloiu
1e1b176493 [SOLITAIRE] Update Romanian (ro-RO) translation (#5911) 2023-11-08 10:24:05 +00:00
Timo Kreuzer
dfcf07b825 [NTOS:KE/x64] Remove GCC vs ML hack 2023-11-07 23:16:50 +02:00
Joachim Henze
adeaba1604 [ACCESS] 640x480-ify (#5903)
The first dlg IDD_PROPPAGEKEYBOARD is the toughest.
All others had plenty of space left.
2023-11-07 12:25:44 +00:00
Joachim Henze
0177b1af45 [NETCFGX] *.rc 640x480-ify IDD_TCPIP_BASIC_DLG and IDD_TCPIP_ALTCF_DLG (#5902)
Both dialogs can easily fit 640x480, like their twins from XPSP3 and 2k3sp2

For IDD_TCPIP_BASIC_DLG we can achieve that by just shrinking the upper groupbox in height by 10 units, and then move all controls below that by 10 units upwards. That doesn't require much brain, only diligence.

For IDD_TCPIP_ALTCF_DLG it is even easier, because the dlgs contents are small enough yet to still fit 640x480, so only the dlg itself must be shrinked for now. Later if more stuff will be added, we can perform pretty easy still by just moving everything a bit upwards. But we can leave that for later.

Fix a common typo in a 3rd dlg regarding a missing space before "(in order)". I decided to put that into this PR, because I didn't touch that dlgs dimensions yet. So the change is not mixed with position changes and therefore the review remains simple.

For ja-JP.rc fix a
-FONT 8, "MS Shell Dlg"
to
+FONT 9, "MS UI Gothic"
2023-11-07 03:17:01 +00:00
Joachim Henze
55563fa891 [NETSHELL] IDD_NETPROPERTIES must fit 640x480 CORE-19284 (#5899)
- adds 3 missing accelerators for zh-CN.rc, zh-HK.rc, zh-TW.rc for IDC_SHOWTASKBAR
- shrinks the dialog in y to fit on a 640x480 screen, like the XPSP3 and 2k3sp2 dlgs do
- for that some controls positions have to be slightly moved up (which cannot lead to text truncation here, guaranteed)
- only 3 controls change in size:
  - IDC_COMPONENTSLIST gets 3 units smaller in height, but is still larger than in XPSP3/2k3sp2. So it is still large enough
  - IDC_NETCARDNAME shrinks a bit in width, but is still larger than in XPSP3/2k3sp2, so what fits there will also fit for us
  - pushbutton IDC_CONFIGURE is slightly increased in width for all languages because that looks better
     except ru-RU.rc (which had the largest width) it is slightly smaller now, but still large enough.
     We can use the same width here now for all rcs!

- strip the lorem ipsum text from IDC_DESCRIPTION, which is never supposed to be displayed. That syncs all rcs in that line and slightly shrinks the binary size and fixes CORE-19284.

- add a FIXME comment for a missing accelerator in sv-SE.rc

*as a consequence all rcs do now use the exact same positions and sizes for all controls again, YIPPIE!*
The only exception that the dlg had before from that rule, was the ru-RU.rc IDC_CONFIGURE was larger in x.
But now that is not needed anymore.
2023-11-06 23:31:37 +00:00
Joachim Henze
561ad3c1d6 [ADVAPI32] Mute frequent taskmgr logspam CORE-18521 (#5888)
George explained that this is supposed to fail like that,
aka "works as designed". So let's at least mute this now,
as it is spammed with every taskmgr refresh cycle
and allows me to reduce logfile-sizes from ~50MB back to ~2MB
when building ros on ros.

err:(dll/win32/advapi32/wine/security.c:309) NtOpenProcessToken failed! Status c0000022.

Fixes CORE-18521

Also strip some EOL-whitespace in the file, and slightly improve the header.
2023-11-05 18:32:13 +01:00
Katayama Hirofumi MZ
0ae6a509b0 [SHLWAPI][SDK] Implement IContextMenu_Invoke (#5856)
- Modify shlwapi.spec.
- Add dll/win32/shlwapi/utils.cpp.
- Implement IContextMenu_Invoke function.
- Add it to <shlwapi_undoc.h>.
CORE-19278
2023-11-05 21:45:08 +09:00
Katayama Hirofumi MZ
43d6fdf2be [ACLUI] Let image list be automatically deleted (#5890)
Based on KRosUser's aclui.patch. The list view will automatically delete the image list.
Don't delete the image list in DestroySecurityPage function.
CORE-19187
2023-11-05 21:36:05 +09:00
Joachim Henze
7f80d5ee79 [CMLIB] Revert previous commit to avoid future merges of other devs
because George is having an open Draft PR since July 2022,
which might also touch this file on master in some years.
And it ofc is easier for me to revert my work now, then for him to
go through the great lengths of merging his work then.
2023-11-05 09:55:03 +01:00
Katayama Hirofumi MZ
1ae6cb7a96 [CALC] Use <winuser.rh> instead of <winuser.h> in resource.rc 2023-11-05 17:21:33 +09:00
Katayama Hirofumi MZ
6691cbe889 [REGEDIT] Use <winuser.rh> instead of <winuser.h> in regedit.rc
CORE-18876
2023-11-05 17:18:07 +09:00
Joachim Henze
f6de3881ca [CMLIB] UNIMPLEMENTED_ONCE less hand-knitted (#5889)
allows to get rid of static var PrintCount, at least visually in the code
2023-11-05 09:12:49 +01:00
Katayama Hirofumi MZ
efb9128c24 [NOTEPAD] Use <winuser.rh> instead of <winuser.h> in rsrc.rc
CORE-18837
2023-11-05 17:11:06 +09:00
Thamatip Chitpong
81ba804b55 [HOTPLUG] Trivial fixes (#5887)
- Update files header and copyright information
- Minor code formatting
2023-11-05 07:02:22 +07:00
Whindmar Saksit
4b03981846 [RAPPS] Improve LicenseType handling (#5809)
Tries now to map the "License" text set to "Freeware" to the
LICENSE_FREEWARE "LicenseType" so it is translated correctly (LoadString).

Fixes the following:

- If only the "License" field is set in the DB, nothing will change
  (this applies to 99% of the current entries in the DB).

- If both "LicenseType" and "License" are set, both will be used
  (no observable change in behavior): "Open Source (GPL v2)" etc.

- If only "LicenseType" is set, it will now display just the type
  "Freeware" instead of "Freeware ()".
  This is done only for "Freeware", because the others (the open source ones)
  have many variations. "OpenSource", "Open Source", "Open Source (GPL)" etc.
2023-11-04 22:08:10 +01:00
Whindmar Saksit
b3c1f652ec [NETSHELL] Register folder attributes as SFGAO_FOLDER, not SFGAO_CANDELETE (#5880)
On Windows the Network connections folder uses a binary value
and someone forgot about Little Endian when converting it to a DWORD.

Addendum to 7eb3fcf1d (r66485). CORE-9276

This issue has not been very visible because of bugs in CRegFolderEnum.
2023-11-04 17:40:22 +03:00
Whindmar Saksit
a6c838299c [NETSHELL] Call ReleaseWriteLock. Fixes CORE-18349 (#5881) 2023-11-04 15:19:10 +01:00
Katayama Hirofumi MZ
fa4b38d902 [MSPAINT] Localize g_ptStart and g_ptEnd into mouse.cpp
And move some ToolsModel code into mouse.cpp
CORE-19094
2023-11-04 23:00:43 +09:00
Katayama Hirofumi MZ
56828b82d9 [MSPAINT] Distinguish between icons and cursors (#5884)
- Convert icons/*_cur.ico to the cursor files (*.cur).
- The hot spot is (16, 16) (default).
- Rename icons/ folder as img/.
- Use LoadCursorW instead of LoadIconW
  for cursors.
- Use CURSOR statements for cursor files
  instead of ICON statements in rsrc.rc.
- I used GIMP to convert the icon files to the PNG files.
- I used RealWorld Cursor Editor to convert the PNG files to the cursor files.
CORE-19297
2023-11-04 22:15:43 +09:00
Katayama Hirofumi MZ
a938d19714 [SHELL32] Commonize CCopyToMenu and CMoveToMenu (#5873)
Reduce code. And correctly do the filename check.
CORE-18909
2023-11-04 21:56:15 +09:00
Katayama Hirofumi MZ
d21def4819 [MSPAINT] Use <winuser.rh> instead of <winuser.h> in rsrc.rc (#5883)
CORE-19094
2023-11-04 21:53:04 +09:00
Thamatip Chitpong
119057800e [HOTPLUG] Add device removal support (#5836) 2023-11-04 13:31:26 +01:00
Katayama Hirofumi MZ
b69a7460db [MSPAINT] Fix filter string UNICODE_NULL problem
Follow-up to #5882.
Some ATL CString do not append the string if there is
a UNICODE_NULL in the middle.
CORE-19094
2023-11-04 19:50:36 +09:00
Katayama Hirofumi MZ
640d67d12a [MSPAINT] Adapt to Unicode and <strsafe.h> (#5882)
- TCHAR --> WCHAR
- LPTSTR --> LPWSTR
- LPCTSTR --> LPCWSTR
- CString --> CStringW
- TEXT("...") --> L"..."
- _T("...") --> L"..."
- ::SendMessage( --> ::SendMessageW(
- ::GetWindowText( --> ::GetWindowTextW(
- ::SetWindowText( --> ::SetWindowTextW(
- Replace _tcscat with StringCchCatW.
- Replace _tcslen with wcslen.
etc. CORE-19094
2023-11-04 19:25:45 +09:00
Katayama Hirofumi MZ
d7e1bd2705 [IMM32] Sort imm32.spec
CORE-19268
2023-11-04 05:59:53 +09:00
Katayama Hirofumi MZ
4aa1bcb72b [IMM32][SDK] Implement software keyboard, Part 1 (#5865)
- Add dll/win32/imm32/softkbd.c source file.
- Half-implement ImmCreateSoftKeyboard function.
- Move ImmShowSoftKeyboard, and ImmDestroySoftKeyboard functions.
- Modify ImmCreateSoftKeyboard prototype.
CORE-19268
2023-11-04 05:58:17 +09:00
Katayama Hirofumi MZ
d7ece626cb [MSPAINT] Fix Copy-To-File feature (#5877)
The Copy-To-File feature had some bugs that the user couldn't save.
- Modify SelectionModel::GetSelectionContents.
- Delete SelectionModel::CopyBitmap, SelectionModel::LockBitmap,
  and SelectionModel::UnlockBitmap functions.
CORE-19186
2023-11-04 05:56:10 +09:00
Katayama Hirofumi MZ
e627c3b00e [W32TIME] Remember date/time sync settings (#5866)
Based on KRosUser's patch.
- In the W32TmServiceMain function, the
  time check loop does check the registry value.
CORE-19292
2023-11-03 22:56:58 +09:00
Katayama Hirofumi MZ
eb4d13c823 [IMM32][SDK] Implement CtfImm(Hide,Restore)ToolbarWnd (#5863)
- Add Imm32GetFn helper function.
- Implement CtfImmHideToolbarWnd and
  CtfImmRestoreToolbarWnd functions.
- Add them to <imm32_undoc.h>.
CORE-19268
2023-11-03 22:45:51 +09:00
Katayama Hirofumi MZ
a114169c4d [MSPAINT] Refactor mouse moving code on canvas (#5878)
Move some mouse moving code to toolsModel.
CORE-19094
2023-11-03 22:41:06 +09:00
Katayama Hirofumi MZ
a6418c848c [MSPAINT] Simplify tool creation (#5876)
Reduce code and binary size. This will reduce 512 bytes in binary.
- Don't use cache for tool creation.
CORE-19094
2023-11-03 16:49:13 +09:00
Katayama Hirofumi MZ
37f56d2448 [MSPAINT] Commonize OnFinishDraw and OnCancelDraw (#5875)
Reduce code and binary size a bit. This will reduce 1024 bytes in binary.
Unify ToolBase::OnFinishDraw and ToolBase::OnCancelDraw to ToolBase::OnEndDraw.
CORE-19094
2023-11-03 16:20:03 +09:00
Joachim Henze
32b883ef2f [NOTEPAD] de-DE.rc: Fix CMD_HELP_ABOUT_NOTEPAD, all rc: strip bloat-spaces before \n and ? 2023-11-03 02:19:34 +01:00
Katayama Hirofumi MZ
17530af261 [MMSYS] Improve Japanese (ja-JP) translation
CORE-18706
2023-11-03 08:53:36 +09:00
Serge Gautherie
c6c6c62cb5 [PORTCLS] Remove meaningless YDEBUG (#5858)
Addendum to b77ebc4 (r54584).
Follow-up of #5818.
2023-11-02 13:14:12 +01:00
Katayama Hirofumi MZ
dabb3f4d61 [IMM32][SDK] Add CtfAImmIsIME, CtfImmSetAppCompatFlags etc. (#5862)
- Add CtfAImmIsIME, CtfImmIsCiceroStartedInThread and CtfImmSetAppCompatFlags functions.
- Implement CtfImmDispatchDefImeMessage function.
- Modify imm32.spec.
- Add the prototypes of ImmGetAppCompatFlags, CtfAImmIsIME, CtfImmIsCiceroStartedInThread,
  CtfImmSetAppCompatFlags, and CtfImmDispatchDefImeMessage into <imm32_undoc.h>.
CORE-19268
2023-11-02 08:16:12 +09:00
Egor Ananyin
64997887eb [NTUSER] Fix system menu mouse handing (#5822)
Add a check for the system menu opened from the app icon.
Fixes CORE-19258
2023-11-01 23:11:46 +00:00
Andrei Miloiu
c1b12b3f46 [SHELL32] Update Romanian (ro-RO) translation (#5838) 2023-11-01 16:56:50 +01:00
Justin Miller
0a951f1112 [BOOTDATA] Add SMP Entry (#5859)
[HALX86] Enable SMP Hal for x86
[BOOTDATA] add livecd and set entrys
2023-11-01 06:43:44 -07:00
Whindmar Saksit
5d1be078f8 [TASKMGR] Hold Shift to bypass MessageBox confirmation (#5845)
Allow the user to hold shift to automatically answer IDYES when killing/debugging a process or changing the priority.
2023-11-01 13:43:33 +01:00
Serge Gautherie
31876ba8c2 [DSOUND_NEW][HDAUDBUS] Replace meaningless YDEBUG (#5857)
and move debug.h after all includes. Addendum to 60b0afc3a (PR #5818)

dsound_new: Addendum to 5974fe1 (r45584).
hdaudbus: Addendum to cf7fc81 (r68311).
2023-11-01 13:39:05 +01:00
Katayama Hirofumi MZ
b3194e320c [IMM32][SDK] Add CtfAImmActivate/Deactivate functions (#5835)
- Add dll/win32/imm32/CtfImeTable.h for CTF
  IME functions.
- Implementing Imm32CheckAndApplyAppCompat,
  Imm32LoadCtfIme, and
  Imm32EnumCreateCtfICProc helper functions.
- Add CtfAImmActivate and CtfAImmDeactivate
  functions.
- s/CI_TFSDISABLED/CI_TSFDISABLED/
CORE-19268
2023-10-31 22:45:28 +09:00
Katayama Hirofumi MZ
25b7447818 [SETUPLIB][NTUSER] Toggle input language/layout on Alt+Shift / Ctrl+Shift (#5839)
- Respect the toggle key settings.
- Change the hot key settings in 
  base/setup/lib/mui.c.
- Revert IntDefWindowProc function about
  Alt+Shift handling.
- Delete some code in
  co_IntProcessKeyboardMessage for Alt+Shift
  handling.
- Add IntGetNextKL, IntLanguageToggle, and
  IntCheckLanguageToggle helper functions.
- Modify ProcessKeyEvent and
  UserGetLanguageToggle functions to
  support [Left Alt]+Shift and Ctrl+Shift.
- Improve WM_INPUTLANGCHANGEREQUEST
  handling.
- Message handling shouldn't access kbswitch
  directly.
CORE-10667
2023-10-31 22:37:49 +09:00
Katayama Hirofumi MZ
8a049d0b68 [SHELL32][SDK] Implement CopyStreamUI (#5848)
- Modify shell32.spec.
- Add CopyStreamUI prototype to <undocshell.h>.
CORE-19278
2023-10-31 22:32:02 +09:00
Serge Gautherie
60b0afc3af [BDASUP][KMIXER][MMIXER][STREAM] Replace meaningless YDEBUG (#5818)
bdasup: Addendum to 40c15ec (r46632).
kmixer: Addendum to 3e489bf (r42143).
mmixer: Addendum to c42d9f2 (r44872).
stream: Addendum to 4a0debf (r41662).
Serge plans a follow up that will remove all other remaining YDEBUG in the source tree.
The ones covered here he considered to be the most trivial ones.
2023-10-31 12:04:24 +00:00
Katayama Hirofumi MZ
6d7aaaade0 [MSPAINT] Delete needless ImageModel::ResetToPrevious
CORE-19094
2023-10-31 11:13:54 +09:00
Katayama Hirofumi MZ
ad12c6cdea [NTUSER] Disable SC_MOVE if WS_MAXIMIZE or WS_MINIMIZE (#5855)
Based on KRosUser's scmove.patch.
- Check also WS_MINIMIZE window style to
  determine to disable SC_MOVE system command.
CORE-19272
2023-10-31 06:50:00 +09:00
Katayama Hirofumi MZ
00f192fa94 [SHELL32] Improve file properties dialog (#5852)
Based on KRosUser's patches.
- Add missing version strings "Comments" and
  "LegalTrademarks".
- Add version strings "PrivateBuild" and
  "SpecialBuild" if necessary.
- Trim the version string for pretty display.
CORE-19270, CORE-19114, CORE-19275
2023-10-30 15:34:03 +09:00
Katayama Hirofumi MZ
87f94aa10c [KBSWITCH] Update layout list on WM_NOTIFYICONMSG
The layout list was not updated correctly.
CORE-10667
2023-10-30 10:40:27 +09:00
Katayama Hirofumi MZ
aed376e00f [MSPAINT] Fix ImageModel::PushImageForUndo bug
CORE-19274
2023-10-30 07:41:57 +09:00
Hermès Bélusca-Maïto
bdae8cf966 [SHLWAPI_APITEST] Fix MSVC compilation warning C4309
SHPropertyBag.cpp(161): warning C4309: 'initializing': truncation of constant value

See https://stackoverflow.com/questions/33333448/warning-c4309-what-does-it-mean-and-can-it-be-ignored-in-this-case
for some details.
2023-10-28 18:19:04 +02:00
Hermès Bélusca-Maïto
46ab34662d [BROWSEUI] Some parenthesizing clarification around "xxx & YYY" expressions in conditionals 2023-10-28 17:56:55 +02:00
Hermès Bélusca-Maïto
64f40e7f30 [BROWSEUI] Fix MSVC compilation warning C4805
internettoolbar.cpp(714): warning C4805: '!=': unsafe mix of type 'bool' and type 'BOOL' in operation
2023-10-28 17:50:26 +02:00
Hermès Bélusca-Maïto
c9c6902f08 [USETUP] Further simplify partition creation UI code (#5837)
- Use the same keypress 'C' to create either primary or logical partitions.
  Their type is automatically determined, whether they are created in
  general unpartitioned space, or space within an extended partition.

- Extensively adapt the translations to reflect these changes.
2023-10-28 17:08:42 +02:00
Hermès Bélusca-Maïto
ebcf3cf38e [USETUP] Blur the boundaries between MBR "Primary" and "Logical" partitions (#5837)
Do not do that yet for extended partitions (containers).

This is possible, because when creating partitions, we do that on
unpartitioned space that is already "tagged" as either being "logical"
or not, and the partition style is inherited from that.

The resulting code is simpler, yet working as it should.
This will also help in the future for supporting other platforms, where
the concept of "primary", "extended" and "logical" partitions do not
exist (basically all platforms except BIOS-based PC-AT).
2023-10-28 17:08:41 +02:00
Hermès Bélusca-Maïto
9ed4bf1ed7 [USETUP] Show the partition description (and its disk) being formatted and checked (#5837)
And improve some strings -- Translations need to be rechecked!
2023-10-28 17:08:40 +02:00
Hermès Bélusca-Maïto
06e4f13653 [USETUP] Simplify partition creation UI code (#5837)
Unify CREATE_{PRIMARY,EXTENDED,LOGICAL}_PARTITION_PAGE
(i.e. Create{Primary,Extended,Logical}PartitionPage() functions)
into a single CREATE_PARTITION_PAGE (i.e. CreatePartitionPage()).

A lot of code was duplicated there (display, size input, etc.) just
for calling ultimately the Create{Primary,Extended,Logical}Partition()
helper functions.

This will also help in the future for supporting other platforms, where
the concept of "primary", "extended" and "logical" partitions do not
exist (basically all platforms except BIOS-based PC-AT).
2023-10-28 17:08:39 +02:00
Hermès Bélusca-Maïto
1899a09399 [USETUP] Simplify display of partitions being formatted (#5837) 2023-10-28 17:08:39 +02:00
Hermès Bélusca-Maïto
3d4f001084 [USETUP] Rename some MUI string identifiers (#5837)
STRING_CHOOSENEWPARTITION --> STRING_CHOOSE_NEW_PARTITION
STRING_FORMATTINGDISK     --> STRING_FORMATTINGPART
STRING_HDDSIZE            --> STRING_HDPARTSIZE
STRING_HDINFOPARTCREATE_1 --> STRING_HDDISK1
STRING_HDINFOPARTDELETE_1 --> STRING_HDDISK2
STRING_HDDINFO_{1,2}      --> STRING_HDDINFO{1,2}

Move STRING_NEWPARTITION just before STRING_PARTFORMAT
and renumber the STRING_* identifiers.
2023-10-28 17:08:38 +02:00
Katayama Hirofumi MZ
128e7f5aea [SHELL32][SDK] Implement SHStartNetConnectionDialogA (#5847)
and add SHStartNetConnectionDialog prototype to <shlobj.h>.
2023-10-28 22:29:05 +09:00
Katayama Hirofumi MZ
a52c713755 [SHELL32][SDK] Follow-up of #5840 (ad5df2d)
Fix the parameters of Activate_RunDLL.
2023-10-28 21:31:11 +09:00
Katayama Hirofumi MZ
ad5df2d199 [SHELL32][SDK] Implement Activate_RunDLL (#5840)
- Add Activate_RunDLL function implementation.
- Add Activate_RunDLL prototype to <undocshell.h>.
2023-10-28 14:56:27 +09:00
Katayama Hirofumi MZ
2ccdd87809 [SHELL32][SDK] Implement ShortSizeFormatW (#5829)
- Implement ShortSizeFormatW.
- Add ShortSizeFormatW prototype into <undocshell.h>.
- Modify shell32.spec.
2023-10-28 14:55:25 +09:00
Katayama Hirofumi MZ
81e936486e [SHELL32] Implement ExtractIconResInfoA (#5846)
- Add ExtractIconResInfoA implementation.
- Add ExtractIconResInfo prototype to <undocshell.h>.
2023-10-28 11:38:29 +09:00
Katayama Hirofumi MZ
9dfb3e8e05 [SHELL32][SDK] Implement PathIsSlowA and SHSetFolderPathA (#5841)
- Implement PathIsSlowA and SHSetFolderPathA functions.
- Add PathIsSlow and SHSetFolderPath prototypes to <shlobj.h>.
- Fix some <shlobj.h>'s bugs.
- Improve SHOpenPropSheetA function.
2023-10-28 09:59:12 +09:00
Katayama Hirofumi MZ
dcc9a2d8f3 [SHELL32][SDK] Implement SHOpenPropSheetA (#5830)
- Add SHOpenPropSheetA and
  SHOpenPropSheetW prototypes to <shlobj.h>.
- Implement SHOpenPropSheetA function.
2023-10-27 19:34:02 +09:00
Katayama Hirofumi MZ
8f6b016963 [SHELL32] Fix copyto/moveto actions of Search Results (#5816)
- Extend CDefView::InvokeContextMenuCommand 2nd parameter to LPCSTR.
- Add CDefView::_DoCopyToMoveToFolder method.
- Use CDefView::_DoCopyToMoveToFolder for FCIDM_SHVIEW_COPYTO
  and FCIDM_SHVIEW_MOVETO command actions.
CORE-18426
2023-10-27 12:34:51 +09:00
Doug Lyons
4eace8d762 [IPHLPAPI] Silence obsolete FIXME in GetAdaptersAddresses (#5834) 2023-10-26 16:45:44 +00:00
Katayama Hirofumi MZ
995f56d1d3 [SHELL32][SDK] Implement IsSuspendAllowed (#5831)
- Add IsShutdownAllowed helper function.
- Add IsSuspendAllowed prototype to
  <undocshell.h>.
- Implement IsSuspendAllowed function.
2023-10-26 23:27:45 +09:00
Katayama Hirofumi MZ
be8a6f8af1 [REGEDIT] Improve error handling (#5833)
- Don't exit the main program on error.
- Improve output_message function.
- Use output_message instead of some
  error_exit function calls.
CORE-19188
2023-10-26 19:57:42 +09:00
Katayama Hirofumi MZ
fea414b9ed [REGEDIT] Use <strsafe.h> functions strictly Part 2 (#5832)
Follow-up to #5825. Use StringCchPrintfW instead of swprintf.
CORE-18876
2023-10-26 10:39:12 +09:00
Katayama Hirofumi MZ
8cef980ab9 [REGEDIT] Use <strsafe.h> functions strictly (#5825)
Use safer functions for buffer manipulation to avoid buffer overflow/overrun.
CORE-18876
2023-10-26 10:09:31 +09:00
Joachim Henze
9360423cc2 [SYSSETUP] syssetup.rc improve URLs (#5810)
Reformat those URLs in a way that allows new lines to be added, or
existing lines to be removed or changed,
without the need to touch any neighbor line.
This will also allow git blame to work much better in the future.

Fix outdated URLs:
http://www.icu-project.org -> http://icu.unicode.org
https://fedorahosted.org/liberation-fonts -> http://pagure.io/liberation-fonts

I checked: all of the URLs do still work as good as before.

* Update ext2fsd links in syssetup.rc and media/doc
2023-10-24 20:59:28 +00:00
Timo Kreuzer
d831bc4fab [NTOS:MM] Add ASSERTs for VAD table locking 2023-10-24 21:45:27 +03:00
Timo Kreuzer
23589e9bf1 [NTOS:MM] Lock kernel address space in MiInitSystemMemoryAreas
This is required to satisfy VAD locking rules.
2023-10-24 21:45:27 +03:00
Timo Kreuzer
07ad8c4c11 [NTOS:MM] Attach to the target process in MmMapViewOfSection
This is required to satisfy VAD locking rules.
2023-10-24 21:45:27 +03:00
Timo Kreuzer
601bb49c0d [NTOS:MM] Fix MmFreeMemoryArea
- Stay attached while deleting the VAD node
- Acquire the appropriate working set lock when deleting a VAD node
- Both are needed for locking correctness
2023-10-24 21:45:27 +03:00
Timo Kreuzer
de3958dc2b Revert "[NTOS:MM/x64] Temporarily release AddressCreationLock in MmCreateVirtualMappingUnsafeEx"
This reverts commit e685b25e35.
2023-10-24 21:45:27 +03:00
Timo Kreuzer
a662bedab8 [NTOS:MM] Fix bugs in MmAccessFault
- Acquire the appropriate working set lock when calling MmLocateMemoryAreaByAddress
- Do not access MemoryArea without holding the lock (otherwise it can be pulled away under our feet)
- Fix range check for paged pool
2023-10-24 21:45:27 +03:00
Timo Kreuzer
84d0586ca4 [NTOS:MM] Handle page table faults in MmArmAccessFault
These faults are handled by ARM³ and we don't need to check for a memory area. They can be recursive faults (e.g. from MiDeleteSystemPageableVm), so we might be holding the WS lock already. Passing it straight to ARM³ allows to acquire the WS lock below to look up the memory area.
2023-10-24 21:45:27 +03:00
Timo Kreuzer
a8b57f0a6b [NTOS:MM] Fix address space locking in MiProtectVirtualMemory 2023-10-24 21:45:27 +03:00
Timo Kreuzer
6d701b4b05 [NTOS:MM] Add ASSERTS to MmLockAddressSpace to guarantee lock ordering 2023-10-24 21:45:27 +03:00
Katayama Hirofumi MZ
ab199cc147 [MSPAINT] Show out-of-memory message (#5817)
- Improve ImageModel::PushImageForUndo.
- Use FormatMessage in newly added
  ShowOutOfMemory function.
- Call ShowOutOfMemory() when out of memory.
CORE-19227, CORE-19094
2023-10-25 02:35:49 +09:00
Hermès Bélusca-Maïto
501c2bdd63 [NTOS:LPC] Fix input parameter for ProbeAndCaptureUnicodeString (#5815)
Addendum to commit b3c55b9e6 (PR #4399).

Passing &CapturedObjectName as pointer to be probed and captured would
fail if e.g. PreviousMode == UserMode, since that pointer is always in
kernel space. Instead, pass the original user-mode pointer.

Bug caught by Timo Kreuzer ;)
2023-10-23 18:18:45 +02:00
Serge Gautherie
5b54477d47 [BDASUP][PORTCLS][SYSAUDIO][USB] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5811) 2023-10-23 18:16:59 +02:00
Thamatip Chitpong
7f5c59a0b3 [HOTPLUG] Add device properties dialog support (#5812)
Clicking at "Properties" button or right-click menu now opens properties dialog for the selected device.
2023-10-23 18:53:08 +07:00
Katayama Hirofumi MZ
6f86e11aa2 [SHELL32] Revert CDefView change at bc70af4
CORE-18426
2023-10-23 08:13:29 +09:00
Katayama Hirofumi MZ
bc70af4c13 [SHELL32] Use IS_INTRESOURCE in CCopyToMenu/CMoveToMenu::InvokeCommand
CORE-18426
2023-10-23 07:55:24 +09:00
Jesús Sanz del Rey
855008d97b [COMCTL32] Invalidate LVIS_CUT selected items too (#4218)
This fixes icons that should be drawn transparently not showing as such until window gets repainted.
For example, hidden shell folders that are not drawn transparently until the filebrowser window is resized...

CORE-16722
2023-10-21 18:51:54 +02:00
Serge Gautherie
c03b2ed9be [HDAUDBUS][KS][WDMAUD] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5792)
And promote/fix 2 DPRINTs as well.
2023-10-20 18:09:03 +02:00
Serge Gautherie
1fed9475cc [BOOTDATA] vfatfs.sys is packaged for xbox only (#5805)
Addendum to 14c3936 (0.4.15-dev-5090).
CORE-16373
2023-10-20 13:19:41 +02:00
Joachim Henze
ddd1d19b3f [TASKMGR] Get rid of cplusplus extern c (#5808)
The others in graphctrl.h and graph.h are being handled in the yet-uncommitted PR #5343.
2023-10-20 13:03:59 +02:00
Whindmar Saksit
ded91e310a [SHELL32] Enable Apply button when shortcut show mode is changed (#5807)
Basically this happens when the combobox selection changes.
2023-10-20 13:02:14 +02:00
Joachim Henze
63eaf2bd52 [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772)
Some of the Menu-controls are just dummies in the RC,
because those controls are dynamically replaced at runtime
based on which tab/propsheet is active in taskmgr.
They are replaced by the IDS_MENU_* strings then.

Deduplicating them has many advantages:
1.) It shrinks binary size:
    master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg  708.608 -> 696.832 bytes
2.) Translators don't get lured into translating dead stuff,
    assuming they translated the menu properly, while in fact they did not.
    This is *real*. Happened even to me multiple times already, although
    I am actually aware of the design.
3.) Some of them were offsync already between the dummy and the real thing.
4.) It reduces diff between en-US and other rc's.


* Aside of that improve alignment in some languages rcs in the "Shutdown"-menu-section,
* and improve a translation in de-DE, sq-AL, and zh-CN.
* [TASKMGR] id-ID.rc 2 accelerators in the same string is definitely wrong
* [TASKMGR] *.rc, make sure that warning is in all 30 langs, especially in en-US.rc
* [TASKMGR] for several translations add FIXME-comments regarding accelerator collisions
2023-10-19 10:19:20 +00:00
Hermès Bélusca-Maïto
171941ad18 [DESK] Add the current screensaver in the list if it isn't already present (#5766)
- Introduce AddScreenSaver[Item] helpers for adding screensavers in
  the list (either given by file path or by item structure).

- Rename "AddScreenSavers" to "EnumScreenSavers", and
  "ScreenSaverItem" type to "SCREEN_SAVER_ITEM".

- Ensure the stored "SCRNSAVE.EXE" value is NULL-terminated.

- Add the current screensaver, specified by the "SCRNSAVE.EXE" registry
  value, in the list if it isn't already present; otherwise select it
  in the list.

- Make the filename comparison case-insensitive.
2023-10-18 21:46:15 +02:00
Hermès Bélusca-Maïto
b3a25bcf8b [DESK] Reimplement InstallScreenSaverW to behave similarly to Windows' one (#5766)
CORE-6812 ; see also commit ff0951356 (r66688)

This function "just" changes the per-user SCRNSAVE.EXE registry value
to point to the new specified file, changes the SPI values and opens
the desk.cpl "Screensaver" property tab for letting the user change
the new selected screensaver properties.

In particular, it does *NOT* copy the specified file to System32 or
anything else (and doesn't verify that it is a valid PE executable).

Our previous implementation did none of that, and was also relying on
some private setupapi functions.

We now behave closer to Windows' desk.cpl.

Additionally:

- ReactOS-specific feature (compile-time define) disabled by default:
  Verify that the specified file actually exists, before changing
  the screensaver.
- Use NDEBUG, disabling DPRINT by default;
- Improve InstallScreenSaver[A,W] spec entries;
- Remove NUM_APPLETS define and use _countof() instead.
2023-10-18 21:45:39 +02:00
Hermès Bélusca-Maïto
fd1e5d53a5 [DESK] Cleanup some functions. 2023-10-18 21:30:10 +02:00
Stanislav Motylkov
0af84ce12d [NVNET] Remove NdisEqualMemory hack by linking with memcmp library
Fix suggested by Hermès Bélusca-Maïto. CORE-15872
2023-10-18 20:18:02 +03:00
Dmitry Borisov
59d8a77df6 [DC21X4] Add driver for DECchip 21x4-compatible network adapters (#5614)
These adapters were common in DEC Alpha boxes and they are really rare
nowadays. The 21140 chip is emulated in Connectix / Microsoft Virtual PC
and Hyper-V Gen 1 VM.

This is an experimental driver, not yet tested on real hardware.

CORE-8724
2023-10-18 20:12:36 +03:00
Timo Kreuzer
a8e8add0c0 [KERNEL32] Export more Vista functions 2023-10-18 15:55:41 +03:00
Timo Kreuzer
e0545dab15 [CMAKE] Improve configure script to work with newer CMake versions (#5742)
This change allows to properly pass parameters to newer CMake versions. Currently the script passes "VSSolution" and similar on to CMake, which are ignored, but newer CMake will complain. Allows to configure a VSSolution with CMake 3.27.4.
2023-10-17 13:17:35 +03:00
Timo Kreuzer
d9cb169920 [XDK] Fix / improve some definitions 2023-10-17 13:02:30 +03:00
Timo Kreuzer
7b38f80119 [STLPORT] Make stl thread-safe
Define _STLP_THREADS to make stl thread safe.
Also remove defined(__BUILDING_STLPORT) from the preprocessor conditions for which STLPInterlockedExchangePointer is defined, because that function is used in _threads.h, which can get included by apps using the stl through stl headers.
2023-10-17 13:01:24 +03:00
Katayama Hirofumi MZ
97e53c6963 [MSPAINT] Implement mouse middle button dragging (#5804)
- Handle WM_MBUTTONDOWN and
  WM_MBUTTONUP messages.
- Implement dragging by mouse middle button.
- Add IDC_HANDDRAG cursor resource.
CORE-19094
2023-10-17 15:58:34 +09:00
Timo Kreuzer
40d444919e [SDK] Move definition of MyInt128 into stubs.h 2023-10-17 09:41:18 +03:00
Timo Kreuzer
a27b8009e0 [SDK] Do not include windef.h into stubs.h
This prevents pulling in function declarations that are incompatible with the generated stubs.
2023-10-17 09:41:18 +03:00
Timo Kreuzer
3b7c7d8e68 [CMAKE] Don't use precompiled headers for autogenerated stub files 2023-10-17 09:41:18 +03:00
Katayama Hirofumi MZ
f49919ce5d [MSPAINT] Simplify canvas mouse message handling (#5803)
- Unify some mouse message handlers of
  CCanvasWindow.
- Add CCanvasWindow::m_nMouseDownMsg 
  member.
CORE-19094
2023-10-17 13:48:19 +09:00
Katayama Hirofumi MZ
8f1eb03ad2 [MSPAINT] Improve Zoom tool (#5798)
- Delete global zoomTo function.
- Add CCanvasWindow::zoomTo and
  CCanvasWindow::getNewZoomRect functions.
- Rename CCanvasWindow::updateScrollInfo as
  CCanvasWindow::updateScrollRange.
- Rename CCanvasWindow::resetScrollPos as
  CCanvasWindow::updateScrollPos.
- Draw the proper zoom rectangle on mouse move.
- Revert the active tool on click when the tool
  was Zoom.
CORE-19094
2023-10-17 07:25:50 +09:00
Egor Ananyin
e2d3aa7f4a [NTUSER] Remove a wrong check in MENU_MouseMove (#5736)
This check doesn't seem to be correct in modern ReactOS. Furthermore, it
actually hadn't been working for a long time until it was uncovered by
the recent system menu changes.

Reverts a hack introduced in 17a315285 (r72517), fixes CORE-19170.
The initial bug described in CORE-2338 is not observed.
2023-10-16 19:10:52 +03:00
Serge Gautherie
13a145b6d8 [USERENV] SetUserEnvironmentVariable(): Remove use of uninit' ShortName
Addendum to 96fe018 (r72066).
2023-10-16 19:02:27 +03:00
Katayama Hirofumi MZ
8669679499 [ATL][ATL_APITEST] Add some missing CRect methods (#5800)
- Strengthen "atltest.h".
- Strengthen atl_apitest:atltypes testcase.
- Implement some missing CRect methods.
2023-10-16 21:57:57 +09:00
Katayama Hirofumi MZ
d955b9321b [ATL] s/throw()/noexcept/ (#5799)
Mechanically replace throw() with noexcept.
2023-10-16 15:40:17 +09:00
Katayama Hirofumi MZ
fd1e158480 [MSPAINT] Calculate intersection to reduce bits transfer (#5795)
Drawing lines smoothly on big image.
- In CCanvasWindow::DoDraw, calculate the
  intersection to reduce bits transfer.
- Improve SmoothDrawTool in handling Shift key.
CORE-19094, CORE-19237
2023-10-16 09:09:40 +09:00
Hermès Bélusca-Maïto
5c2ec83fa7 [USETUP] Decouple bootloader install choice page from its actual installation (#5786)
This allows to move this choice sooner in the process, thus having all
the user key presses at first, then all the actual installation going
without any key presses needed anymore... (that is, unless you wanted
to install the bootloader on a removable device. Then it will prompt
you there!)

- Additional "cosmetic"/future-proof changes: Rename all instances
  of "floppy" in the bootloader install variables to "RemovableDisk"
  because it would be great to have this install choice later.

- Layout adjustments in the translated bootloader pages.

- Skip bootloader installation on upgrades. The idea here is that if
  we were able to find a ReactOS installation to upgrade, this means
  we were able to find a valid bootloader + boot entry.
  See also PR #5633.

  This logic may be slightly improved in the future to detect whether
  the underlying bootloader is FreeLdr and if so, only update its files.
  But this is for the future.
2023-10-14 16:29:43 +02:00
Katayama Hirofumi MZ
1c4bf2d702 [MSPAINT] Don't include useless <mapicode.h>
CORE-19094
2023-10-13 18:07:55 +09:00
Katayama Hirofumi MZ
1183e797b4 [MSPAINT] Reset scroll position in some situations (#5789)
In some situations, the scroll position should be reset.
- Add CCanvasWindow::resetScrollPos method.
- Reset the scroll position on loading a file.
- Reset the scroll position on mirroring/rotating
  the image.
CORE-19094
2023-10-12 22:59:17 +09:00
Katayama Hirofumi MZ
9a51c8e6c6 [MSPAINT][NOTEPAD][REGEDIT] Don't use CRTDBG for these apps (#5788)
Don't include <crtdbg.h>.
Don't use _CrtSetDbgFlag.
2023-10-12 22:53:02 +09:00
Katayama Hirofumi MZ
70d5c864bc [MSPAINT] Do type-cast (float) for xDpi and yDpi
CORE-19094
2023-10-12 19:43:29 +09:00
Katayama Hirofumi MZ
409df2355e [MSPAINT] Do type-cast (BYTE) for lfItalic and lfUnderline
CORE-19094
2023-10-12 19:38:41 +09:00
Katayama Hirofumi MZ
4306e261ee [MSPAINT] Do type-cast (BOOL) for TB_ISBUTTONCHECKED return
CORE-19094
2023-10-12 19:31:22 +09:00
Katayama Hirofumi MZ
bc28675a44 [MSPAINT] s/WINBOOL/BOOL/
CORE-19094
2023-10-12 19:13:20 +09:00
Justin Miller
ff3dadf89d [FREELDR] Enable UEFI boot for x86 and amd64 (#5267)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>

- Allow to boot NT kernel on UEFI systems with our 2 primary supported architectures
- Implement remaining code needed to pass execution to x86 and amd64 kernels

CORE-11954
2023-10-11 12:45:08 -07:00
Oleg Dubinskiy
a6b281c228 [KS] KsRead/WriteFile: finish IRP initialization and properly setup I/O stack location for it (#5784)
- Initialize the rest of IRP data which is not initialized by IoBuildSynchronousFsdRequest.
- Setup an IO_STACK_LOCATION structure for the IRP before calling the driver's read/write routine.
- Do this for both KsReadFile and KsWriteFile functions in our Kernel Streaming driver (ks.sys).
This fixes several problems when calling these functions from outside, so now they are working correctly, as expected.
Discovered during my audio investigations.
CORE-19232
2023-10-10 13:30:00 -07:00
Alexey Strukov
8451230753 [DEVMGR] Allow to copy text from Details page of device properties (#5775)
In driver properties, in details tab, add a "Copy" popup menu for listview.
This will allow to copy driver's information to buffer.
2023-10-10 21:22:54 +02:00
Katayama Hirofumi MZ
62eeb158a5 [MSPAINT] Improve Zoom tool (#5781)
- Delete CCanvasWindow::drawZoomFrame.
- Invalidate the canvas on mouse move when
  the active tool is Zoom tool.
- Add ZoomTool::OnDrawOverlayOnCanvas to
  draw the zoom rectangle without flickering.
- Improve the zoom trackbar position.
- Display the zoom rate on changing the value
  of the zoom trackbar.
- Reverse the direction of the zoom trackbar.
- Don't draw the focus rectangle.
CORE-19215, CORE-19216
2023-10-10 10:59:29 +09:00
Katayama Hirofumi MZ
0c164f081a [MSPAINT] Check out of image in updating status bar (#5779)
Check out of the image by using ::PtInRect and CCanvasWindow::GetImageRect.
If out, then don't show the status bar text.
CORE-19219
2023-10-09 08:39:31 +09:00
Katayama Hirofumi MZ
611d89eb8b [MSPAINT] Add border width to tool box (#5780)
Make tool box pixel-perfect. Add two border widths to the tool box.
CORE-19217
2023-10-09 08:37:31 +09:00
Timo Kreuzer
63aef3e1fc [T2EMBED] Improve spec file
- Only export stdcall annotated functions on x86
- Turn annotated stubs / forwarders into normal exports
- Note: MSVC removes decorated exports / forwarders, as soon as the undecorated version is exported, even when _declspec(dllexport) is used, no idea how to fix that.
2023-10-09 02:34:30 +03:00
Katayama Hirofumi MZ
8d8f4d328c [MSPAINT] Zoom tool shouldn't use undo buffer (#5778)
Remove PushImageForUndo call in Zoom tool. CORE-19214
2023-10-09 08:07:02 +09:00
Hermès Bélusca-Maïto
11b706429c [WSHTCPIP] Remove unneeded headers + Fix bugs.
- Mismatch NTSTATUS/DWORD for win32 errors;
- Close handle returned from openTcpFile() with closeTcpFile().
2023-10-08 17:11:26 +02:00
Hermès Bélusca-Maïto
9021a14f4a [NDK] Fix weird "ntstatus.s" statement (#5771)
Spotted by Serge Gautherie.
2023-10-08 17:11:25 +02:00
Joachim Henze
42c93e3cbb [TASKMGR] *.rc: Fix accelerator collisions &Priority <-> &Properties (#5758)
We had collisions in many languages.
For most languages (which are derived from en-US) we should use
&Priority
P&roperties

We introduced the collisions during 0.4.15-dev'ing when
MENUITEM ID_PROCESS_PAGE_PROPERTIES
and
MENUITEM ID_PROCESS_PAGE_OPENFILELOCATION
were added.


We verified Win7-en and Win2k3-en to behave as proposed in this PR (R for properties, P for priority).
But *french* Windows (I believe Hermes picture was from WinVista-fr or Win7-fr or Win10-fr maybe) does it differently.

the existing de-DE also has been double-checked to exactly match MS with the accelerators in that menu.
2023-10-07 23:03:47 +00:00
Hermès Bélusca-Maïto
ce08851758 [DESK] Use MultiByteToWideChar instead of the private pSetupMultiByteToUnicode function (#5765)
This avoids having desk.cpl depend on a private function that may change
or disappear, and increase the probability of being able to use that CPL
across different Windows versions.

(Note: this pSetupMultiByteToUnicode was one of those whose name changed
between Windows 2000 and XP+)
2023-10-07 22:17:58 +02:00
Hermès Bélusca-Maïto
e4608f7450 [DESK][SHELLBTRFS] Fix typo in WIN32_NO_STATUS 2023-10-07 22:15:12 +02:00
Hermès Bélusca-Maïto
d0b43a399f [NETID] Simplify IsUserAdmin() helper implementation (#5763)
Addendum to commit 8c4b0c914.

Base ourselves on pSetupIsUserAdmin() and other similar functions in our
codebase. Note that what we are actually interested here, is whether the
current thread runs with Administrator privileges.

(As noticed by contributor 'whindsaks', "Not only is this code simpler,
it now will correctly handle deny-only SIDs in the token!")
2023-10-07 21:52:36 +02:00
Timo Kreuzer
e685b25e35 [NTOS:MM/x64] Temporarily release AddressCreationLock in MmCreateVirtualMappingUnsafeEx
This is a hack, because the kernel mode path can incur a recursive page fault with the AddressCreationLock acquired, which would lead to a recursive acquisition, once we do proper locking in MmAccessFault.
To properly fix this the PDE must be made valid, similar to the user mode path, but that is not that simple...
2023-10-07 10:58:30 +03:00
Oleg Dubinskiy
d96b3cd45c [KS] Fix bug in KsStreamIo (#4663)
Properly set output buffer length in IO Stack Location of the current IRP, since it is passed to KsProbeStreamIrp when calling KsStreamIo, so it fails if the length isn't set properly.

Don't set an input buffer length and the buffer itself, since it isn't passed anywhere, so setting it makes no sense. Moreover, MSDN says that for IOCTL_KS_READ/WRITE_STREAM, only output buffer (and its length) is needed to be set, but not an input one. So it indeed is more correct.

It fixes buffer overflow in KsProbeStreamIrp when attempting to perform the streaming via KsStreamIo. I discovered this bug during my audio refactoring from PR #4660.
2023-10-06 12:36:09 +02:00
Hermès Bélusca-Maïto
2a5fd78f1b [APPHELP_APITEST] Fix build, addendum to commit a8755711b 2023-10-05 21:32:38 +02:00
Hermès Bélusca-Maïto
a8755711b9 [APPHELP_APITEST] Deduplicate the IsUserAdmin() helper. 2023-10-05 20:58:57 +02:00
Hermès Bélusca-Maïto
f1cff6ef27 [DESK] Remove deprecated code.
This mostly reverts commit 221f21c62 (r29328), that was a hack for
building with MSVC. We can nowadays correctly link with the shell32
SHCreatePropSheetExtArrayEx() export.
2023-10-05 20:58:28 +02:00
Katayama Hirofumi MZ
1a90009bb9 [MSPAINT] Update scroll info on loading file (#5761)
The scroll info was not updated when the file is loading.
- Rename CCanvasWindow::Update as CCanvasWindow::updateScrollInfo.
- Update scroll info on ImageModel::NotifyImageChanged.
- Improve ImageModel::ClearHistory.
CORE-19094
2023-10-05 20:01:41 +09:00
Katayama Hirofumi MZ
3579ea7888 [MSPAINT] Fix assertion failure on text tool (#5762)
Kill the assertion failure on choosing text tool.
Check whether textEditWindow is not null by using IsWindowVisible.
CORE-19094
2023-10-05 19:51:36 +09:00
George Bișoc
d72025649b [NTOS:SE] Mute the access denied DPRINTs
They can be spammy. Also clarify these debug prints, because some people
think that "failed to grant access rights" means there's something wrong
in the core access check functions.
2023-10-04 18:04:30 +02:00
George Bișoc
09bfd96f3b [NTOS:SE] HACK: Temporarily add the Local group SID to the system token
Temporarily add the local group to the system token so that Virtualbox
GA services can properly set up network drives for shared folders.

What happens is that a security descriptor has a DACL with only one ACE
that grants access to Local SID (presumably coming from Vbox?)
but the client token is that of the service which is a SYSTEM token.
Perhaps we are not impersonating the right user or whatever else.

This is only a temporary placebo, until a proper solution is found.

CORE-18250
2023-10-04 18:04:30 +02:00
George Bișoc
fefb1b7745 [NTDLL_APITEST] Write NtAccessCheck testcase that tests for empty generic mapping scenario
See b79aadd50bb7d5d6f08532284941c0334514c477 for further information.
2023-10-04 18:04:29 +02:00
George Bișoc
4b4638dc55 [NTOS:SE] HACK: Temporarily grant access to the client if empty generic mapping was passed
Certain apps such as AIM installer passes an empty generic mapping (this can
be understood with their generic masks set to 0) and our code tries to map
the access right from an ACE with the mapping provided by AccessCheck.

This can lead to a bug where we would not be able to decode the generic right
from an ACE as we need a proper generic mapping in order to do so. A mask
right that is not decoded it cannot be used to mask out the remaining rights,
further resulting into a denied access right.

What Windows does instead is they are mapping the ACE's rights in another place,
presumably when setting security data to an object, and they are using the
generic mapping passed by the kernel.

What we can do for the time being is to temporarily grant access to the client,
but only if they are an administrator.

CORE-18576
2023-10-04 18:04:29 +02:00
George Bișoc
95c104f29a [TCPIP] Setup a security descriptor for the IP and TCP device objects
Grant access to such objects to system, admins and network services.
2023-10-04 18:04:17 +02:00
Ratin Gao
be5c889cdf [NTDLL:LDR] SAL improvements and fixes
- Convert some notations to SAL2
- "Name" parameter in LdrGetProcedureAddress/LdrpGetProcedureAddress should be optional
- "DllCharacteristics" parameter in LdrGetDllHandle should be optional
2023-10-04 12:26:18 +03:00
Joachim Henze
46b4b5581d [TASKMGR] Favor _countof(), no functional change intended (#5757)
Taskmgr used a mixture: Sometimes _countof(), sometimes ARRAYSIZE()
and sometimes it calculated the count plain by sizeof(var)/sizeof(TYPE).
Harmonize everywhere to _countof() as it is the shortest solution.

Fix some formatting sins, like placing comments before else-statement.
Shorten the length of some very long line
intentionally *without introducing additional linebreaks* !

Shorten vertical length of some functions to increase their chance to
fit on the screen without scrolling.

Fix wrong indentation level in TaskManagerWndProc().

*.rc: Remove superfluous and redundant comment in all langs

No functional change intended.
2023-10-03 21:00:10 +02:00
Timo Kreuzer
410b1030c0 [NTOS:KE/x64] Implement detection of more KF_* feature flags
- Detect KF_SSSE3, KF_SSE4_1, KF_SSE4_2, KF_RDRAND, KF_BRANCH, KF_SLAT, KF_GENUINE_INTEL, KF_AUTHENTICAMD, KF_ACNT2, KF_SMEP, KF_SMAP, KF_RDWRFSGSBASE, KF_XSAVEOPT, KF_XSAVES, KF_HUGEPAGE, KF_RDTSCP
2023-10-03 19:45:44 +03:00
Timo Kreuzer
1a7ab2fe68 [NTOS:KE/x64] Use structures for CPUID 2023-10-03 19:45:44 +03:00
Timo Kreuzer
6048ebeff9 [SDK] Add CPUID and MSR definitions for x86/x64
- Import definitions from edk2 (see https://github.com/tianocore/edk2/tree/master/MdePkg/Include/Register)
- Add additional unions as well as AMD SVM CPUID
2023-10-03 19:45:44 +03:00
Timo Kreuzer
70f6ed8ee3 [NTOS:KE/x64] Improve CPU feature detection
- Use 64 bit feature flags (with a hack in the PRCB)
- Improve setting up SharedUserData->ProcessorFeatures
2023-10-03 19:45:44 +03:00
Timo Kreuzer
47c1dcd023 [NDK] Update kernel feature bits constants
- Move them into architecture specific headers.
- Add missing constants based on https://www.geoffchappell.com/studies/windows/km/ntoskrnl/structs/kprcb/featurebits.htm
- Yes, they are 64 bits
2023-10-03 19:45:44 +03:00
Timo Kreuzer
b66441d581 [XDK] Add missing PF_* processor feature definitions 2023-10-03 19:45:44 +03:00
George Bișoc
50f367fa58 [NTOS:CM] Use COMPUTE_HASH_CHAR to compute the conv hash key
We have a dedicated macro definition for that so just use it.
2023-10-03 11:01:21 +02:00
Whindmar Saksit
34066e475a GetDetailsOf does not support column flags (#5755)
GetDetailsOf does not support the column flags used by CompareIDs.
As a side effect, also fixes LPARAM to UINT truncation on 64-bit.
2023-10-03 10:43:44 +02:00
1988 changed files with 97675 additions and 32494 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1,2 +1 @@
custom: ['https://reactos.org/donate/', 'https://www.paypal.me/ReactOS']
liberapay: ReactOS

44
.github/labeler.yml vendored
View File

@@ -1,29 +1,45 @@
# Labelling by the files touched
ATL:
- sdk/lib/atl/**
- changed-files:
- any-glob-to-any-file:
- sdk/lib/atl/**
drivers:
- drivers/**
- sdk/lib/drivers/**
- any: ["win32ss/drivers/**", "!win32ss/drivers/font/**"]
- changed-files:
- any-glob-to-any-file:
- drivers/**
- sdk/lib/drivers/**
- all-globs-to-any-file:
- win32ss/drivers/**
- '!win32ss/drivers/font/**'
freeldr:
- boot/freeldr/**
- changed-files:
- any-glob-to-any-file:
- boot/freeldr/**
"kernel&hal":
- hal/**
- ntoskrnl/**
- changed-files:
- any-glob-to-any-file:
- hal/**
- ntoskrnl/**
ROSTESTS:
- modules/rostests/**
- changed-files:
- any-glob-to-any-file:
- modules/rostests/**
shell:
- base/shell/explorer/**
- base/shell/rshell/**
- dll/shellext/**
- dll/win32/browseui/**
- dll/win32/shell32/**
- changed-files:
- any-glob-to-any-file:
- base/shell/explorer/**
- base/shell/rshell/**
- dll/shellext/**
- dll/win32/browseui/**
- dll/win32/shell32/**
Win32SS:
- win32ss/**
- changed-files:
- any-glob-to-any-file:
- win32ss/**

View File

@@ -26,7 +26,7 @@ jobs:
wget https://gist.githubusercontent.com/zefklop/b2d6a0b470c70183e93d5285a03f5899/raw/build_rosbe_ci.sh
- name: Get RosBE
id: get_rosbe
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: RosBE-CI
key: RosBE-CI-${{runner.os}}-${{steps.get_rosbe_spec.outputs.march-sha}}-${{steps.get_rosbe_spec.outputs.git-sha}}-${{hashfiles('./build_rosbe_ci.sh')}}
@@ -46,16 +46,16 @@ jobs:
sudo ./llvm.sh $LLVM_VERSION
echo "D_CLANG_VERSION=-DCLANG_VERSION=$LLVM_VERSION" >> $GITHUB_ENV
- name: Source checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: src
- name: Set up cache for ccache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ccache
key: ccache-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
key: ccache-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-${{github.sha}}
restore-keys: |
ccache-${{matrix.compiler}}-${{matrix.arch}}-
ccache-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-
- name: Set ccache settings
run: |
echo "CCACHE_BASEDIR=${{github.workspace}}" >> $GITHUB_ENV
@@ -74,7 +74,7 @@ jobs:
- name: Print ccache statistics
run: ccache -s
- name: Upload ISOs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-${{github.sha}}
path: |
@@ -129,17 +129,17 @@ jobs:
arch: amd64
toolset: ${{matrix.toolset}}
- name: Source checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: src
- name: Configure
run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DDLL_EXPORT_VERSION=${{matrix.dllver}}
run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DDLL_EXPORT_VERSION=${{matrix.dllver}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1
- name: Build
run: cmake --build build -- -k0
- name: Generate ISOs
run: cmake --build build --target bootcd --target livecd
- name: Upload ISOs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reactos-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-${{github.sha}}
path: |
@@ -147,7 +147,7 @@ jobs:
build/livecd.iso
- name: Upload debug symbols
if: ${{ matrix.config == 'Debug' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reactos-syms-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-${{github.sha}}
path: build/msvc_pdb
@@ -183,7 +183,7 @@ jobs:
arch: amd64_arm64
toolset: ${{matrix.toolset}}
- name: Source checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: src
- name: Configure
@@ -204,7 +204,7 @@ jobs:
if: ${{ matrix.arch == 'arm64' }}
run: cmake --build build --target calc magnify mstsc notepad osk regedit taskmgr winmine wordpad base/applications/screensavers/all -- -k0
- name: Upload compiled binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reactos-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: |
@@ -227,7 +227,7 @@ jobs:
!**/*.tlb
- name: Upload debug symbols
if: ${{ matrix.config == 'Debug' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reactos-syms-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: build/msvc_pdb
@@ -268,7 +268,7 @@ jobs:
- name: Add LLVM to PATH
run: echo "${env:LLVM_PATH}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Source checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: src
- name: Configure
@@ -278,7 +278,7 @@ jobs:
- name: Generate ISOs
run: cmake --build build --target bootcd --target livecd
- name: Upload ISOs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reactos-clang-cl-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: |
@@ -286,34 +286,33 @@ jobs:
build/livecd.iso
- name: Upload debug symbols
if: ${{ matrix.config == 'Debug' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reactos-syms-clang-cl-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: build/msvc_pdb
# Disable MSBuild for the moment being until a proper fix is provided -- see CORE-18911
# build-msbuild-i386:
# name: MSBuild (i386)
# runs-on: windows-2019
# steps:
# - name: Install Flex and Bison
# run: |
# curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
# 7z x flexbison.7z -O${{github.workspace}}\bin
# echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# - name: Add CL to PATH
# uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: amd64_x86
# - uses: actions/checkout@v3
# with:
# path: src
# - name: Configure
# run: |
# mkdir build
# cd build
# cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
# - name: Build
# run: cmake --build ${{github.workspace}}\build --target bootcd --target livecd
build-msbuild-i386:
name: MSBuild (i386)
runs-on: windows-2019
steps:
- name: Install Flex and Bison
run: |
curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
7z x flexbison.7z -O${{github.workspace}}\bin
echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Add CL to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- uses: actions/checkout@v4
with:
path: src
- name: Configure
run: |
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
- name: Build
run: cmake --build ${{github.workspace}}\build --target bootcd --target livecd

View File

@@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true

View File

@@ -14,11 +14,10 @@ jobs:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 120

View File

@@ -336,14 +336,12 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to
add_subdirectory(sdk/include/reactos/mc)
add_subdirectory(sdk/include/asm)
if(NO_ROSSYM)
if(ARCH MATCHES "64$")
include(sdk/cmake/baseaddress64.cmake)
elseif(NO_ROSSYM)
include(sdk/cmake/baseaddress_dwarf.cmake)
elseif(MSVC)
if (ARCH STREQUAL "amd64")
include(sdk/cmake/baseaddress_msvc_x64.cmake)
else()
include(sdk/cmake/baseaddress_msvc.cmake)
endif()
include(sdk/cmake/baseaddress_msvc.cmake)
else()
include(sdk/cmake/baseaddress.cmake)
endif()

View File

@@ -6,6 +6,7 @@ add_subdirectory(charmap)
add_subdirectory(clipbrd)
add_subdirectory(cmdutils)
add_subdirectory(control)
add_subdirectory(ctfmon)
add_subdirectory(drwtsn32)
add_subdirectory(dxdiag)
add_subdirectory(extrac32)

View File

@@ -1,4 +1,11 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS CACLS
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
@@ -34,7 +41,7 @@ Abrevieri:\n\
OI - Moștenire obiecte.\n\
ACE moștenită de fișiere.\n\
IO - Moștenire simplă.\n\
ACE neaplicată dosarelor/fișierelor curente.\n"
ACE neaplicată folderelor/fișierelor curente.\n"
IDS_ABBR_CI "(CI)"
IDS_ABBR_OI "(OI)"
IDS_ABBR_IO "(IO)"

View File

@@ -15,6 +15,7 @@
#include <htmlhelp.h>
#endif
#include <limits.h>
#include <strsafe.h>
/* RESOURCES */
#include "resource.h"

View File

@@ -4,7 +4,7 @@
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2009 Petru Dimitriu <petrimetri@gmail.com>
* Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2022 Andrei Miloiu <miloiuandrei@gmail.com>
* Copyright 2022-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -13,7 +13,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
IDD_DIALOG_SCIENTIFIC DIALOGEX CW_USEDEFAULT16, 0, 316, 163
STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Minicalculator"
CAPTION "Calculator"
MENU IDR_MENU_SCIENTIFIC_1
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
@@ -161,7 +161,7 @@ END
IDD_DIALOG_STANDARD DIALOGEX CW_USEDEFAULT16, 0, 169, 128
STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Minicalculator"
CAPTION "Calculator"
MENU IDR_MENU_STANDARD
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
@@ -226,7 +226,7 @@ END
IDD_DIALOG_CONVERSION DIALOGEX CW_USEDEFAULT16, 0, 320, 130
STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Minicalculator"
CAPTION "Calculator"
MENU IDR_MENU_STANDARD
FONT 8, "MS Shell Dlg"
BEGIN
@@ -413,7 +413,7 @@ END
/* About */
STRINGTABLE
BEGIN
IDS_CALC_NAME "Minicalculator ReactOS"
IDS_CALC_NAME "Calculator ReactOS"
IDS_AUTHOR "Scris de Carlo Bramini"
END

View File

@@ -429,8 +429,8 @@ END
/* Angles */
STRINGTABLE
BEGIN
IDS_ANGLE_ARCMINUTES "Minute of arc"
IDS_ANGLE_ARCSECONDS "Second of arc"
IDS_ANGLE_ARCMINUTES "Угловая минута"
IDS_ANGLE_ARCSECONDS "Угловая секунда"
IDS_ANGLE_DEGREES "градус"
IDS_ANGLE_GRADIANS "град"
IDS_ANGLE_RADIANS "радиан"

View File

@@ -19,7 +19,7 @@
*/
#include <windef.h>
#include <winuser.h>
#include <winuser.rh>
#include "resource.h"

View File

@@ -27,7 +27,7 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base)
switch (base) {
case IDC_RADIO_HEX:
_stprintf(buffer, _T("%I64X"), rpn->i);
StringCchPrintf(buffer, size, _T("%I64X"), rpn->i);
break;
case IDC_RADIO_DEC:
/*
@@ -40,11 +40,11 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base)
/* calculate the width of integer number */
width = (rpn->f==0) ? 1 : (int)log10(fabs(rpn->f))+1;
if (calc.sci_out == TRUE || width > MAX_LD_WIDTH || width < -MAX_LD_WIDTH)
_stprintf(buffer, _T("%#.*e"), MAX_LD_WIDTH-1, rpn->f);
StringCchPrintf(buffer, size, _T("%#.*e"), MAX_LD_WIDTH-1, rpn->f);
else {
TCHAR *ptr, *dst;
ptr = buffer + _stprintf(buffer, _T("%#*.*f"), width, ((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, rpn->f);
StringCchPrintfEx(buffer, size, &ptr, NULL, 0, _T("%#*.*f"), width, ((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, rpn->f);
/* format string ensures there is a '.': */
dst = _tcschr(buffer, _T('.'));
while (--ptr > dst)
@@ -61,7 +61,7 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base)
#undef MAX_LD_WIDTH
break;
case IDC_RADIO_OCT:
_stprintf(buffer, _T("%I64o"), rpn->i);
StringCchPrintf(buffer, size, _T("%I64o"), rpn->i);
break;
case IDC_RADIO_BIN:
if (rpn->i == 0) {

View File

@@ -107,7 +107,7 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base)
}
mpz_clear(zz);
mpf_clear(ff);
_sntprintf(buffer, SIZEOF(calc.buffer), _T("%hs"), temp);
StringCchPrintf(buffer, size, _T("%hs"), temp);
}
void convert_text2number_2(calc_number_t *a)

View File

@@ -254,10 +254,10 @@ static void UpdateNumberIntl(void)
{
/* Get current user defaults */
if (!GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, calc.sDecimal, SIZEOF(calc.sDecimal)))
_tcscpy(calc.sDecimal, _T("."));
StringCbCopy(calc.sDecimal, sizeof(calc.sDecimal), _T("."));
if (!GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, calc.sThousand, SIZEOF(calc.sThousand)))
_tcscpy(calc.sThousand, _T(","));
StringCbCopy(calc.sThousand, sizeof(calc.sThousand), _T(","));
/* get the string lengths */
calc.sDecimal_len = _tcslen(calc.sDecimal);
@@ -342,7 +342,7 @@ static void save_config(void)
switch (osvi.dwPlatformId) {
case VER_PLATFORM_WIN32s:
case VER_PLATFORM_WIN32_WINDOWS:
_stprintf(buf, _T("%lu"), calc.layout);
StringCbPrintf(buf, sizeof(buf), _T("%lu"), calc.layout);
WriteProfileString(_T("SciCalc"), _T("layout"), buf);
WriteProfileString(_T("SciCalc"), _T("UseSep"), (calc.usesep==TRUE) ? _T("1") : _T("0"));
break;
@@ -496,16 +496,16 @@ static void update_lcd_display(HWND hwnd)
TCHAR tmp[MAX_CALC_SIZE * 2 + 2];
if (calc.buffer[0] == _T('\0'))
_tcscpy(tmp, _T("0"));
StringCbCopy(tmp, sizeof(tmp), _T("0"));
else
_tcscpy(tmp, calc.buffer);
StringCbCopy(tmp, sizeof(tmp), calc.buffer);
/* Add final '.' in decimal mode (if it's missing), but
* only if it's a result: no append if it prints "ERROR".
*/
if (calc.base == IDC_RADIO_DEC && !calc.is_nan) {
if (_tcschr(tmp, _T('.')) == NULL)
_tcscat(tmp, _T("."));
StringCbCat(tmp, sizeof(tmp), _T("."));
}
/* if separator mode is on, let's add an additional space */
if (calc.usesep && !calc.sci_in && !calc.sci_out && !calc.is_nan) {
@@ -573,13 +573,14 @@ static void update_parent_display(HWND hWnd)
if (!n)
str[0] = _T('\0');
else
_stprintf(str,_T("(=%d"), n);
StringCbPrintf(str, sizeof(str), _T("(=%d"), n);
SetDlgItemText(hWnd, IDC_TEXT_PARENT, str);
}
static void build_operand(HWND hwnd, DWORD idc)
{
unsigned int i = 0, n;
size_t cbPtr;
if (idc == IDC_BUTTON_DOT) {
/* if dot is the first char, it's added automatically */
@@ -617,12 +618,14 @@ static void build_operand(HWND hwnd, DWORD idc)
if (idc != IDC_STATIC)
calc.esp = (calc.esp * 10 + (key2code[i].key-'0')) % LOCAL_EXP_SIZE;
if (calc.ptr == calc.buffer)
_stprintf(calc.ptr, _T("0.e%+d"), calc.esp);
StringCbPrintf(calc.ptr, sizeof(calc.buffer), _T("0.e%+d"), calc.esp);
else {
/* adds the dot at the end if the number has no decimal part */
if (!_tcschr(calc.buffer, _T('.')))
*calc.ptr++ = _T('.');
_stprintf(calc.ptr, _T("e%+d"), calc.esp);
cbPtr = sizeof(calc.buffer) - ((BYTE*)calc.ptr - (BYTE*)calc.buffer);
StringCbPrintf(calc.ptr, cbPtr, _T("e%+d"), calc.esp);
}
update_lcd_display(hwnd);
return;
@@ -637,7 +640,11 @@ static void build_operand(HWND hwnd, DWORD idc)
return;
break;
}
calc.ptr += _stprintf(calc.ptr, _T("%C"), key2code[i].key);
cbPtr = sizeof(calc.buffer) - ((BYTE*)calc.ptr - (BYTE*)calc.buffer);
StringCbPrintfEx(calc.ptr, cbPtr, &calc.ptr, NULL, STRSAFE_FILL_ON_FAILURE,
_T("%C"), key2code[i].key);
update_lcd_display(hwnd);
}
@@ -850,11 +857,11 @@ static void update_memory_flag(HWND hWnd, BOOL mem_flag)
SetDlgItemText(hWnd, IDC_TEXT_MEMORY, mem_flag ? _T("M") : _T(""));
}
static void update_n_stats_items(HWND hWnd, TCHAR *buffer)
static void update_n_stats_items(HWND hWnd, TCHAR *buffer, size_t cbBuffer)
{
unsigned int n = SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_GETCOUNT, 0, 0);
_stprintf(buffer, _T("n=%u"), n);
StringCbPrintf(buffer, cbBuffer, _T("n=%u"), n);
SetDlgItemText(hWnd, IDC_TEXT_NITEMS, buffer);
}
@@ -905,7 +912,7 @@ static char *ReadConversion(const char *formula)
str[len+1] = ')';
str[len+2] = '\0';
_tcscpy(calc.source, (*calc.buffer == _T('\0')) ? _T("0") : calc.buffer);
StringCbCopy(calc.source, sizeof(calc.source), (*calc.buffer == _T('\0')) ? _T("0") : calc.buffer);
/* clear display content before proceeding */
calc.ptr = calc.buffer;
@@ -942,13 +949,13 @@ static INT_PTR CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
if (n == LB_ERR)
return TRUE;
SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_DELETESTRING, (WPARAM)n, 0);
update_n_stats_items(hWnd, buffer);
update_n_stats_items(hWnd, buffer, sizeof(buffer));
delete_stat_item(n);
return TRUE;
case IDC_BUTTON_CAD:
SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_RESETCONTENT, 0, 0);
clean_stat_list();
update_n_stats_items(hWnd, buffer);
update_n_stats_items(hWnd, buffer, sizeof(buffer));
return TRUE;
}
break;
@@ -964,7 +971,7 @@ static INT_PTR CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
buffer, SIZEOF(buffer),
((statistic_t *)lp)->base);
SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_ADDSTRING, 0, (LPARAM)buffer);
update_n_stats_items(hWnd, buffer);
update_n_stats_items(hWnd, buffer, sizeof(buffer));
return TRUE;
}
return FALSE;
@@ -986,11 +993,13 @@ static void CopyMemToClipboard(void *ptr)
if(OpenClipboard(NULL)) {
HGLOBAL clipbuffer;
TCHAR *buffer;
size_t cbBuffer;
EmptyClipboard();
clipbuffer = GlobalAlloc(GMEM_DDESHARE, (_tcslen(ptr)+1)*sizeof(TCHAR));
cbBuffer = (_tcslen(ptr) + 1) * sizeof(TCHAR);
clipbuffer = GlobalAlloc(GMEM_DDESHARE, cbBuffer);
buffer = (TCHAR *)GlobalLock(clipbuffer);
_tcscpy(buffer, ptr);
StringCbCopy(buffer, cbBuffer, ptr);
GlobalUnlock(clipbuffer);
#ifdef UNICODE
SetClipboardData(CF_UNICODETEXT,clipbuffer);
@@ -1056,9 +1065,8 @@ static char *handle_sequence_input(HWND hwnd, sequence_t *seq)
}
} else
if (ch == '$') {
calc.ptr =
_tcscpy(calc.buffer, calc.source) +
_tcslen(calc.source);
StringCbCopyEx(calc.buffer, sizeof(calc.buffer), calc.source, &calc.ptr, NULL,
STRSAFE_FILL_ON_FAILURE);
} else {
for (x=0; x<SIZEOF(key2code); x++) {
if (!(key2code[x].mask & BITMASK_IS_ASCII) ||

View File

@@ -2,7 +2,7 @@
* FILE: base/applications/charmap/lang/ro-RO.rc
* ReactOS Project (https://reactos.org)
* TRANSLATORS: Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -46,7 +46,7 @@ CAPTION "Despre"
FONT 8, "MS Shell Dlg", 0, 0
STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
LTEXT "Hartă de caractere v0.1\nDrept de autor (C) 2007 Ged Murphy (gedmurphy@reactos.org)\nTraducere de Ștefan Fulea (stefan.fulea@mail.com)", IDC_STATIC, 48, 7, 210, 36
LTEXT "Plan caractere v0.1\nDrept de autor (C) 2007 Ged Murphy (gedmurphy@reactos.org)\nTraducere de Ștefan Fulea (stefan.fulea@mail.com)", IDC_STATIC, 48, 7, 210, 36
PUSHBUTTON "Î&nchide", IDOK, 105, 162, 44, 15
ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 254, 107, WS_VISIBLE | WS_VSCROLL |
@@ -57,7 +57,7 @@ STRINGTABLE
BEGIN
IDS_LICENSE "Această aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html"
IDS_ABOUT "&Despre…"
IDS_TITLE "Hartă de caractere"
IDS_TITLE "Plan caractere"
IDS_UNICODE "Unicode"
IDS_ALL "Toate"
END

View File

@@ -54,5 +54,5 @@ BEGIN
IDS_ABOUT "&О программе..."
IDS_TITLE "Таблица символов"
IDS_UNICODE "Unicode"
IDS_ALL "All"
IDS_ALL "Все"
END

View File

@@ -93,7 +93,7 @@ extern void LoadSettings(void)
lstatus = RegQueryValueEx(hKey, _T("Advanced"), NULL, &type, (LPBYTE)&dwAdvancedChecked, &size);
if (lstatus == ERROR_SUCCESS && type == REG_DWORD && dwAdvancedChecked != FALSE)
{
SendDlgItemMessage(hCharmapDlg, IDC_CHECK_ADVANCED, BM_CLICK, MF_CHECKED, 0);
SendDlgItemMessage(hCharmapDlg, IDC_CHECK_ADVANCED, BM_CLICK, 0, 0);
}
RegCloseKey(hKey);

View File

@@ -1,4 +1,11 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS Clipboard
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
ID_ACCEL ACCELERATORS
@@ -11,7 +18,7 @@ BEGIN
POPUP "&Fișier"
BEGIN
MENUITEM "&Deschidere…", CMD_OPEN
MENUITEM "Păst&rare ca…", CMD_SAVE_AS
MENUITEM "S&alvează ca…", CMD_SAVE_AS
MENUITEM SEPARATOR
MENUITEM "I&eșire", CMD_EXIT
END

View File

@@ -1,4 +1,10 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS AT utility
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -33,7 +39,7 @@ timp Specifică timpul de lansare a comenzii.\n\
IDS_JOBS_LIST "ID stare Zi Oră Comanda\n"
IDS_NO_ENTRIES "Nu există comenzi planificate.\n"
IDS_CONFIRM_QUESTION "Sigur doriți continuarea acestei operații? (D|N) [N]: "
IDS_CONFIRM_QUESTION "Sigur doriți continuarea acestei operații? (D/N) [N]: "
IDS_CONFIRM_INVALID "\nAcesta nu este un răspuns valid.\n"
IDS_CONFIRM_YES "D"
IDS_CONFIRM_NO "N"

View File

@@ -31,7 +31,7 @@ id Порядковый номер запланированно
IDS_CONFIRM_YES "Y"
IDS_CONFIRM_NO "N"
IDS_DELETE_ALL "This operation will delete all scheduled jobs.\n"
IDS_DELETE_ALL "Эта операция удалит все запланированные задачи.\n"
IDS_NEW_JOB "Добавлено новое задание с ID = %lu\n"
IDS_JOBS_LIST "Статус ID День Время Команда\n"
IDS_NO_ENTRIES "В списке нет запланированных задач.\n"

View File

@@ -3,6 +3,7 @@
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2014 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -23,6 +24,6 @@ ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] fișier ...\n\
Tastați ATTRIB fără argumente pentru afișarea atributelor pentru\n\
toate fișierele.\n"
STRING_CONSOLE_ERROR "Eroare necunoscută: %d\n"
STRING_FILE_NOT_FOUND "File not found - '%s'\n"
STRING_FILE_NOT_FOUND "Fișierul nu a fost găsit - '%s'\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Formatul argumentului este eronat - %s\n"
END

View File

@@ -26,6 +26,6 @@ ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] файл ...\n\
/D Обработка и файлов, и папок.\n\n\
Команда ATTRIB без параметров выводит атрибуты всех файлов.\n"
STRING_CONSOLE_ERROR "Неизвестная ошибка: %d\n"
STRING_FILE_NOT_FOUND "File not found - '%s'\n"
STRING_FILE_NOT_FOUND "Файл не найден - '%s'\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Неверный формат параметра - %s\n"
END

View File

@@ -9,7 +9,7 @@ COMP [/L] [/A] [данные1] [данные2]\n\n\
/A Вывод различий в формате ASCII (по умолчанию: шестнадцатиричный).\n\
/L Вывод номеров строк, в которых обнаружены различия.\n"
IDS_INVALIDSWITCH "Недопустимый ключ - /%c\n"
IDS_BADSYNTAX "Не верный формат командной строки\n"
IDS_BADSYNTAX "Неверный формат командной строки\n"
IDS_FILEERROR "Не удалось найти/открыть файл: %s\n"
IDS_COMPARING "Сравнение %s и %s...\n"
IDS_FILESIZEERROR "Не удалось определить размер файла: %s\n"

View File

@@ -2,7 +2,7 @@
* PROJECT: ReactOS FC Command
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2022 Andrei Miloiu <miloiuandrei@gmail.com>
* TRANSLATORS: Copyright 2022-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -39,7 +39,7 @@ FC /B [discul1:][calea1]numele fișierului1 [drive2:][path2]numele fișierului2\
IDS_OUT_OF_MEMORY "FC: Fără memorie\n"
IDS_CANNOT_READ "FC: nu poate fi citit din %ls\n"
IDS_INVALID_SWITCH "FC: Comutator nevalidh\n"
IDS_CANNOT_OPEN "FC: nu poate fi deschis %ls - Nu există un astfel de fișier sau dosar\n"
IDS_CANNOT_OPEN "FC: nu poate fi deschis %ls - Nu există un astfel de fișier sau folder\n"
IDS_NEEDS_FILES "FC: Număr insuficient de specificații pentru fișiere\n"
IDS_CANT_USE_WILDCARD "Semnele speciale ('*' și '?') nu sunt acceptate deocamdată\n"
IDS_DIFFERENT "FC: Fișierele %ls și %ls sunt diferite\n"

View File

@@ -30,9 +30,9 @@ FC /B [диск1:][путь1]имя_файла1 [диск2:][путь2]имя_ф
IDS_LONGER_THAN "FC: %ls длиннее, чем %ls\n"
IDS_COMPARING "Сравнение файлов %ls и %ls\n"
IDS_OUT_OF_MEMORY "FC: Недостаточно памяти\n"
IDS_CANNOT_READ "FC: не удаётся прочитать %ls\n"
IDS_CANNOT_READ "FC: Не удаётся прочитать %ls\n"
IDS_INVALID_SWITCH "FC: Недопустимый ключ\n"
IDS_CANNOT_OPEN "FC: не удаётся открыть %ls - файл либо папка не существует\n"
IDS_CANNOT_OPEN "FC: Не удаётся открыть %ls - файл либо папка не существует\n"
IDS_NEEDS_FILES "FC: Недостаточное количество имён файлов\n"
IDS_CANT_USE_WILDCARD "Подстановочные знаки ('*' и '?') пока не поддерживаются\n"
IDS_DIFFERENT "FC: Файлы %ls и %ls различны\n"

View File

@@ -1,9 +1,9 @@
/*
* FILE: base/applications/cmdutils/find/lang/ro-RO.rc
* ReactOS Project (https://reactos.org)
* TRANSLATOR: Fulea Ștefan (PM on ReactOS Forum at fulea.stefan)
* CHANGE LOG: 2011-08-20 initial translation
* 2011-10-17 diacritics change, other minor changes
* PROJECT: ReactOS Find Command
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -16,8 +16,9 @@ FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""șir"" [fișier...]\n\
/C Numără liniile ce conțin șirul.\n\
/N Numără rândurile afișate, începând cu 1.\n\
/I Ignoră diferențele între majuscule și minuscule.\n\
/OFF[LINE] Do not skip files that have the offline attribute set."
/OFF[LINE] Nu omite fișierele care au configurate atributul\n\
offline (deconectat)."
IDS_NO_SUCH_FILE "FIND: Fișierul «%s» nu există!\n"
IDS_CANNOT_OPEN "FIND: Fișierul «%s» nu poate fi deschis!\n"
IDS_INVALID_SWITCH "FIND: Invalid switch\n"
IDS_INVALID_SWITCH "FIND: Comutare nevalidă\n"
END

View File

@@ -8,11 +8,11 @@ FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""строка"" [[диск:][путь]и
/C Вывод только общего числа строк, содержащих заданную строку.\n\
/N Вывод номеров отображаемых строк.\n\
/I Поиск без учета регистра символов.\n\
/OFF[LINE] Do not skip files that have the offline attribute set.\n\
/OFF[LINE] Не пропускать файлы, у которых установлен атрибут offline.\n\
""строка"" Искомая строка.\n\
[диск:][путь]имя_файла\n\
Один или несколько файлов, в которых выполняется поиск."
IDS_NO_SUCH_FILE "FIND: %s: Файл не существует.\n"
IDS_CANNOT_OPEN "FIND: %s: Невозможно открыть файл.\n"
IDS_INVALID_SWITCH "FIND: Invalid switch\n"
IDS_INVALID_SWITCH "FIND: Недопустимый ключ\n"
END

View File

@@ -1,8 +1,9 @@
/*
* FILE: base/applications/cmdutils/help/lang/ro-RO.rc
* ReactOS Project (https://reactos.org)
* AUTHOR: Magnus Olsen, 2005
* TRANSLATOR: Ștefan Fulea (stefan dot fulea at mail dot com)
* PROJECT: ReactOS help utility
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2014-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -21,7 +22,7 @@ HELP [comandă]\n\n\
help comandă\n\
comandă /? Pentru mai multe informații referitoare la o anume comandă.\n\n\
? Enumeră toate comenzile disponibile (fără descriere).\n\
ALIAS Instituie, destituie sau afișează alias.\n\
ALIAS Setează, șterge sau afișează aliasuri.\n\
ASSOC Modifică asocierile extensiilor de fișiere.\n\
ATTRIB Afișează sau modifică atributele fișierelor.\n\
BEEP Semnalizează utilizând difuzorul intern.\n\

View File

@@ -1,20 +1,25 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS Label Command
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
// STRING_LABEL_HELP "Afișează sau modifică eticheta unei unități (de stocare).\n\nLABEL [unitate:][etichetă]\n"
STRING_LABEL_HELP "Creates, changes or deletes the volume label of a disk.\n\n\
LABEL [drive:][label]\n\n\
drive: Specifies the drive letter of a drive.\n\
label Specifies the label of the drive."
STRING_LABEL_TEXT1 "Volumul unității %c: este etichetat ca %s\n"
STRING_LABEL_TEXT2 "Volumul unității %c: nu este etichetat.\n"
STRING_LABEL_HELP "Crează, schimbă sau șterge denumirea unui disc.\n\n\
LABEL [disc:][denumire]\n\n\
disc: Specifică litera unui disc.\n\
denumire Specifică denumirea unui disc."
STRING_LABEL_TEXT1 "Volumul discului %c: este %s\n"
STRING_LABEL_TEXT2 "Volumul discului %c: nu are denumire.\n"
STRING_LABEL_TEXT3 "Numărul de serie al volumului este %04X-%04X\n"
STRING_LABEL_TEXT4 "Introduceți eticheta unității (opțională, de 32 caractere), apoi ENTER "
STRING_LABEL_PROMPT "Delete current volume label (Y/N)? "
STRING_LABEL_OPTIONS "YN"
STRING_ERROR_INVALID_DRIVE "Specificarea unității este eronată\n"
STRING_ERROR_INVALID_LABEL "Invalid volume label\n"
STRING_LABEL_TEXT4 "Denumirea volumului (32 de caractere, ENTER dacă dacă nu există)?"
STRING_LABEL_PROMPT "Ștergeți denumirea actuală a volumului (D/N)? "
STRING_LABEL_OPTIONS "DN"
STRING_ERROR_INVALID_DRIVE "Specificarea discului este nevalidă\n"
STRING_ERROR_INVALID_LABEL "Denumirea volumului e nevalidă\n"
END

View File

@@ -1,60 +1,65 @@
/*
* FILE: base/applications/cmdutils/more/lang/ro-RO.rc
* ReactOS Project (https://reactos.org)
* TRANSLATOR: Fulea Ștefan (PM on ReactOS Forum at fulea.stefan)
* CHANGE LOG: 2011-08-20 initial translation
* 2011-10-17 diacritics change, other minor changes
* PROJECT: ReactOS More Command
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Afișea date pe ecran, pagină-cu-pagină.\n\
IDS_USAGE "Afișarea datelor pe ecran, pagină cu pagină.\n\
\n\
MORE [/E [options]] < [drive:][path]filename\n\
command | MORE [/E [options]]\n\
MORE [/E [opțiuni]] < [disc:][cale]numele fișierului\n\
command | MORE [/E [opțiuni]\n\
\n\
[drive:][path]filename A file whose contents are to be displayed.\n\
command A command whose output is to be displayed.\n\
[disc:][cale]numele fișierului Un fișier al cărui conținut\n\
urmează să fie afișat.\n\
comandă O comandă a cărei ieșire\n\
urmează să fie afișată.\n\
\n\
When Extended Features are enabled, the following form is supported:\n\
MORE [/E] [options] [files]\n\
Atunci când Caracteristicile extinse sunt activate,\n\
următoarea formă este acceptată:\n\
MORE [/E] [opțiuni] [fișiere]\n\
\n\
Options:\n\
/E Enable Extended Features.\n\
The default state of the Extended Features is controlled by the default\n\
registry settings for CMD.EXE. For more details on how to change these\n\
settings, see the section ""Command Extensions"" in CMD.EXE help.\n\
Opțiuni:\n\
/E Activarea opțiunii Caracteristici extinse.\n\
Stadiul implicit al Caracteristicilor extinse e controlat de setările\n\
implicite de registru pentru programul CMD.EXE. Pentru mai multe detalii\n\
legate de cum pot fi schimbate aceste setări, vedeți secțiunea\n\
""Extensii de comenzi"" în secțiunea de ajutor a programului CMD.EXE.\n\
\n\
When Extended Features are enabled, the following options are available:\n\
/C Clear the screen before displaying a page.\n\
/P Expand Form-Feed characters.\n\
/S Shrink successive blank lines to a single line.\n\
/Tn Expand tabs to n spaces (default: 8).\n\
Atunci când opțiunea Caracteristici extinse e activată, sunt disponibile\n\
următoarele opțiuni:\n\
/C Curățarea ecranului înainte de a se afișa o pagină.\n\
/P Extinderea caracterelor Form-Feed (de alimentare de formulare).\n\
/S Reducerea liniilor goale succesive la o singură linie.\n\
/Tn Extinderea tab-urilor la n spații (implicit: 8).\n\
\n\
These options can be specified in the MORE environment variable.\n\
Aceste opțiuni pot fi specificate în variabila de mediu MORE.\n\
\n\
+n Start displaying the first file at line n.\n\
files List of files to display, separated by blanks.\n\
+n Începerea afișării primului fișier la linia n.\n\
fișiere Lista fișierelor de afișat, separate prin spații libere.\n\
\n\
When Extended Features are enabled, the following commands are available\n\
at the ""-- Continue --"" prompt:\n\
Atunci când opțiunea Caracteristici extinse e activată, sunt disponibile\n\
următoarele comenzi la panoul ""-- Continuă --"":\n\
\n\
P n Display the next n lines.\n\
S n Skip the next n lines.\n\
F Display the next file.\n\
Q Quit.\n\
= Show the line number.\n\
? Show the help line.\n\
<Space> Display the next page.\n\
<Enter> Display the next line.\n"
P n Afișarea următoarelor n linii.\n\
S n Omiterea următoarelor n linii.\n\
F Afișarea următorului fișier.\n\
Q Ieșire.\n\
= Afișarea numărului de linie.\n\
? Afișarea liniei de ajutor.\n\
<Space> Afișarea următoarei pagini.\n\
<Enter> Afișarea următoari linii.\n"
IDS_BAD_FLAG "Invalid argument - '%s'\n"
IDS_BAD_FLAG "Argument nevalid - '%s'\n"
IDS_FILE_ACCESS "Fișierul «%s» nu poate fi accesat!\n"
IDS_CONTINUE_PROMPT "-- Continuă%1%2%3 --%4"
IDS_CONTINUE_PERCENT " (%d%%)"
IDS_CONTINUE_LINE_AT " [Line: %d]"
IDS_CONTINUE_OPTIONS " [Options: psfq=<Space><Enter>]"
IDS_CONTINUE_LINES " Lines: "
IDS_CONTINUE_LINE_AT " [Linie: %d]"
IDS_CONTINUE_OPTIONS " [Opțiuni: psfq=<Space><Enter>]"
IDS_CONTINUE_LINES " Linii: "
END

View File

@@ -276,7 +276,12 @@ static BOOL parse_data_type(struct parser *parser, WCHAR **line)
/* "hex(xx):" is special */
val = wcstoul(*line, &end, 16);
#ifdef __REACTOS__
/* Up to 8 hex digits, "hex(000000002)" is invalid */
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE) || end - *line > 8)
#else
if (*end != ')' || *(end + 1) != ':' || (val == ~0u && errno == ERANGE))
#endif
return FALSE;
parser->data_type = val;

View File

@@ -1,100 +1,104 @@
/*
* Translators: Claudia Cotună
* Michael Stefaniuc
* Ștefan Fulea (stefan dot fulea at mail dot com)
* PROJECT: ReactOS Registry Console Tool
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2010 Claudia Cotună <special4ti@gmail.com>
* Copyright 2010 Michael Stefaniuc <mstefani@redhat.com>
* Copyright 2014-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Usage:\n\
REG [operation] [parameters]\n\n\
Supported operations:\n\
STRING_USAGE, "Utilizare:\n\
REG [operațiune] [parametri]\n\n\
Operațiuni suportate:\n\
ADD | COPY | DELETE | EXPORT | IMPORT | QUERY\n\n\
For help on a specific operation, type:\n\
REG [operation] /?\n\n"
Pentru ajutor la o operațiune specifică, tastați:\n\
REG [operațiune] /?\n\n"
STRING_ADD_USAGE, "REG ADD <key> [/v value_name | /ve] [/t type] [/s separator] [/d data] [/f]\n\n\
Adds a key to the registry or adds a new value to a given registry key.\n\n\
<key>\n\
The registry key to add or, if either [/v] or [/ve] is specified,\n\
the key in which to add the new registry data.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_ADD_USAGE, "REG ADD <cheie> [/v numele_valorii | /ve] [/t tip] [/s separator] [/d date] [/f]\n\n\
Adaugă o cheie la registru sau adaugă o valoare nouă la o cheie dată a registrului.\n\n\
<cheie>\n\
Cheia registrului de adăugat sau dacă e specificat fie [/v], fie [/ve],\n\
cheia în care urmează să fie adăugate noile date de registru.\n\n\
Format: ROOT\\Subcheie\n\n\
ROOT: O cheie de registru predefinită. Aceasta trebuie să fie una dintre următoarele:\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
/v <value_name>\n\
The name of the registry value to add.\n\n\
Subcheie: Calea completă către o cheie de registru de sub o anumită cheie dată ROOT.\n\n\
/v <numele_valorii>\n\
Numele valorii registrului de adăugat.\n\n\
/ve\n\
Add an unnamed registry value. This option modifies the (Default)\n\
registry value.\n\n\
/t <type>\n\
The type of data to add to the registry. If [/t] is specified,\n\
<type> must be one of the following:\n\n\
Adaugă o valoare de registru fără nume. Această opțiune modifică valoarea\n\
(Implicită) a registrului.\n\n\
/t <tip>\n\
Tipul de date ce urmează să fie adăugate în registru. Dacă [/t] e specificat,\n\
<tip> trebuie să fie una din următoarele:\n\n\
REG_SZ | REG_MULTI_SZ | REG_EXPAND_SZ\n\
REG_DWORD | REG_BINARY | REG_NONE\n\n\
If [/t] is not specified, the default data type is REG_SZ.\n\n\
Dacă [/t] nu e specificat, tipul implicit de date este REG_SZ.\n\n\
/s <separator>\n\
The character used to separate strings in REG_MULTI_SZ data.\n\
If [/s] is not specified, the default separator is \\0.\n\n\
/d <data>\n\
The data to add to the new registry value.\n\n\
Caracterul folosit ca să separe șiruri în datele REG_MULTI_SZ.\n\
Dacă [/s] nu e specificat, separatorul implicit este \\0.\n\n\
/d <date>\n\
Datele ce urmează să fie adăugate la noua valoare a registrului.\n\n\
/f\n\
Modify the registry without prompting for confirmation.\n\n"
Modifică regiștrul fără să fie cerută vreo confirmare.\n\n"
STRING_DELETE_USAGE, "REG DELETE <key> [/v value_name | /ve | /va] [/f]\n\n\
Deletes a registry key (including all subkeys and values), or deletes\n\
one or more values from a given registry key.\n\n\
<key>\n\
The registry key to delete or, if one of [/v], [/ve] or [/va] is\n\
specified, the registry key in which to delete one or more values.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_DELETE_USAGE, "REG DELETE <cheie> [/v numele_valorii | /ve | /va] [/f]\n\n\
Șterge o cheie de registru (incluzând toate subcheile și valorile) sau șterge\n\
una sau mai multe valori dintr-o cheie de registru dată.\n\n\
<cheie>\n\
Cheia de registru ce urmează să fie ștearsă sau dacă una din [/v], [/ve] sau [/va] e\n\
specificată, cheia de registru în care urmează să fie ștearsă/șterse una sau mai multe valori.\n\n\
Format: ROOT\\Subcheie\n\n\
ROOT: O cheie de registru predefinită. Aceasta trebuie să fie una dintre următoarele:\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
Subcheie: Calea completă a cheii de registru cu o cheie ROOT dată.\n\n\
/v <value_name>\n\
The name of the registry value to delete.\n\n\
Numele valorii de registru ce urmează să fie ștearsă\n\n\
/ve\n\
Delete an unnamed registry value. This option deletes the (Default)\n\
registry value.\n\n\
Șterge o valoare de registru nedenumită. Această opțiune șterge\n\
valoarea (Implicită) a registrului.\n\n\
/va\n\
Delete all values from a registry key.\n\n\
Șterge toate valorile dintr-o cheie de registru.\n\n\
/f\n\
Delete a registry key (including all subkeys and values) without\n\
prompting for confirmation.\n\n"
Șterge o cheie de registru (incluzând toate subcheile și valorile) fără\n\
să necesite confirmare.\n\n"
STRING_QUERY_USAGE, "REG QUERY <key> [/v value_name | /ve] [/s]\n\n\
Queries a specified registry key and lists all immediate subkeys, values\n\
and data within that key. Use [/s] to recursively query each subkey.\n\n\
<key>\n\
The registry key to query.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_QUERY_USAGE, "REG QUERY <cheie> [/v numele_valorii | /ve] [/s]\n\n\
Interoghează o cheie de registru specificată și listează toate subcheile, valorile și datele\n\
ce urmează imediat în acea cheie. Folosiți [/s] pentru a interoga recursiv fiecare subcheie.\n\n\
<cheie>\n\
Cheia de registru de interogat.\n\n\
Format: ROOT\\Subcheie\n\n\
ROOT: O cheie de registru predefinită. Aceasta trebuie să aibă una dintre următoarele:\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
/v <value_name>\n\
The name of the registry value to query. If neither [/v] nor [/ve] is\n\
specified, all values under <key> are listed.\n\n\
Subcheie: Calea completă către o cheie de registru de sub o anumită cheie dată ROOT.\n\n\
/v <numele_valorii>\n\
Numele valorii de registru ce urmează să fie interogată. Dacă nu se specifică nici [/v],\n\
nici [/ve], toate valorile de sub <cheie> sunt listate.\n\n\
/ve\n\
Query an unnamed registry value. This option queries the (Default)\n\
registry value.\n\n\
Interoghează o valoare de registru nedenumită. Această opțiune interoghează\n\
valoarea (Implicită) a registrului.\n\n\
/s\n\
List all registry entries under <key> and its subkeys.\n\n"
Listează toate intrările registrului de sub <cheie> și subcheile sale.\n\n"
STRING_SUCCESS, "Operația a fost îndeplinită cu succes\n"
STRING_SUCCESS, "Operațiunea a fost îndeplinită cu succes\n"
STRING_INVALID_KEY, "Eroare: Nume de cheie nevalid\n"
STRING_INVALID_CMDLINE, "Eroare: Parametri nevalizi pentru linia de comandă\n"
STRING_NO_REMOTE, "Eroare: Nu pot fi adăugate chei într-un calculator la distanță\n"
@@ -104,18 +108,18 @@ For help on a specific operation, type:\n\
STRING_MISSING_HEXDATA, "reg: Opțiunea [/d] trebuie să fie urmată de o valoare hexezecimală\n"
STRING_UNHANDLED_TYPE, "reg: Tip de dată nerecunoscut [/t 0x%1!x!, /d %2]\n"
STRING_OVERWRITE_VALUE, "Valoarea de registru «%1» deja există. Doriți s-o suprascrieți?"
STRING_YES, "Y"
STRING_YES, "D"
STRING_NO, "N"
STRING_ALL, "A"
STRING_YESNO, " (Yes|No)"
STRING_YESNOALL, " (Yes|No|All)"
STRING_CANCELLED, "Operația de registru a fost anulată\n"
STRING_ALL, "T"
STRING_YESNO, " (Da|Nu)"
STRING_YESNOALL, " (Da|Nu|Toate)"
STRING_CANCELLED, "Operațiunea de registru a fost anulată\n"
STRING_DEFAULT_VALUE, "(Implicită)"
STRING_DELETE_VALUE, "Sigur doriți ștergerea valorii de registru «%1»?"
STRING_DELETE_VALUEALL, "Sigur doriți ștergerea tuturor valorilor de registru din «%1»?"
STRING_DELETE_SUBKEY, "Sigur doriți ștergerea cheii de registru «%1»?"
STRING_INVALID_STRING, "reg: Opțiunea [/d] trebuie urmată de un șir valid\n"
STRING_VALUEALL_FAILED, "reg: Nu au putut fi șterse toate valorile de registru din «%1». A survenit o eroare neașteptată.\n"
STRING_VALUEALL_FAILED, "reg: Nu au putut fi șterse toate valorile de registru din «%1». A apărut o eroare neașteptată.\n"
STRING_MATCHES_FOUND, "Căutare efectuată. Numărul de potriviri găsite: %1!d!\n"
STRING_INVALID_SYNTAX, "reg: Sintaxă nerespectată. "
STRING_INVALID_OPTION, "reg: Opțiune nevalidă [%1]. "
@@ -123,65 +127,65 @@ For help on a specific operation, type:\n\
STRING_FUNC_HELP, "Tastați «REG %1 /?» pentru mai multe informații.\n"
STRING_VALUE_NOT_SET, "(valoare nealocată)"
STRING_IMPORT_USAGE, "REG IMPORT <file>\n\n\
Imports keys, values and data from a given file into the registry.\n\n\
<file>\n\
The name and path of the registry file to import.\n\n"
STRING_IMPORT_USAGE, "REG IMPORT <fișier>\n\n\
Importă chei, valori și date dintr-un fișier dat în regiștri.\n\n\
<fișier>\n\
Numele și calea fișierului de regiștri de importat.\n\n"
STRING_FILE_NOT_FOUND, "reg: Fișierul «%1» nu a putut fi găsit.\n"
STRING_ESCAPE_SEQUENCE, "reg: Secvența de sustracție [\\%1!c!] nu este recunoscută.\n"
STRING_ESCAPE_SEQUENCE, "reg: Secvența de ieșire [\\%1!c!] nu este recunoscută.\n"
STRING_EXPORT_USAGE, "REG EXPORT <key> <file> [/y]\n\n\
Exports a specified registry key (including all subkeys and values)\n\
to a file.\n\n\
<key>\n\
The registry key to export.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_EXPORT_USAGE, "REG EXPORT <cheie> <fișier> [/y]\n\n\
Exportă o cheie de registru specificată (incluzând toate subcheile și valorile)\n\
într-un fișier.\n\n\
<cheie>\n\
Cheia de registru ce urmează să fie exportată.\n\n\
Format: ROOT\\Subcheie\n\n\
ROOT: O cheie de registru predefinită. Aceasta trebuie să aibă una dintre următoarele:\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
<file>\n\
The name and path of the registry file that will be created.\n\
This file must have a .reg extension.\n\n\
Subcheie: Calea completă către o cheie de registru de sub o anumită cheie dată ROOT.\n\n\
<fișier>\n\
Numele și calea fișierului de regiștri ce urmează să fie creat.\n\
Fișierul trebuie să aibă extensia .reg.\n\n\
/y\n\
Overwrite <file> without prompting for confirmation.\n\n"
Suprascrieți <fișierul> fără să se necesite confirmarea.\n\n"
STRING_INVALID_SYSTEM_KEY, "reg: Cheia de sistem [%1] nu este una validă.\n"
STRING_OVERWRITE_FILE, "Fișierul «%1» deja există. Doriți suprascrierea lui?"
STRING_KEY_NONEXIST, "reg: Unable to find the specified registry key\n"
STRING_KEY_IMPORT_FAILED, "reg: Unable to import the registry key '%1'\n"
STRING_KEY_NONEXIST, "reg: Nu a putut fi găsită cheia de registru specificată\n"
STRING_KEY_IMPORT_FAILED, "reg: Nu a putut fi importată cheia de registru '%1'\n"
STRING_REG_VIEW_USAGE, " /reg:32\n\
Access the registry using the 32-bit view.\n\n\
Accesează regiștrii folosind vizualizatorul de 32 de biți.\n\n\
/reg:64\n\
Access the registry using the 64-bit view.\n\n"
STRING_ACCESS_DENIED, "reg: Unable to access or create the specified registry key\n"
Accesează regiștrii folosind vizualizatorul de 64 de biți.\n\n"
STRING_ACCESS_DENIED, "reg: Cheia de registru specificată nu a putut fi accesată sau creată\n"
STRING_COPY_USAGE, "REG COPY <key1> <key2> [/s] [/f]\n\n\
Copies the contents of a specified registry key to another location.\n\
By default, this operation only copies registry values. Use [/s] to\n\
recursively copy all subkeys and values.\n\n\
<key1>, <key2>\n\
Registry keys specifying the source (<key1>) and destination (<key2>)\n\
of the data. If <key2> does not exist, it is created.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_COPY_USAGE, "REG COPY <cheia1> <cheia2> [/s] [/f]\n\n\
Copiază conținutul unei chei de registru specificată în altă locație.\n\
Implicit, această operațiune copiază numai valorile de registru. Folosiți [/s] pentru\n\
a copia în mod recursiv toate subcheile și valorile.\n\n\
<cheia1>, <cheia2>\n\
Cheile de registru care specifică sursa (<cheia1>) și destinația (<cheia2>)\n\
a datelor. Dacă <cheia2> nu există, este creată.\n\n\
Format: ROOT\\Subcheie\n\n\
ROOT: O cheie de registru predefinită. Aceasta trebuie să aibă una dintre următoarele:\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
Subcheie: Calea completă către o cheie de registru de sub o anumită cheie dată ROOT.\n\n\
/s\n\
Copy all subkeys and values from <key1> to <key2>.\n\n\
Copiază toate subcheile și valorile din <cheia1> în <cheia2>.\n\n\
/f\n\
Overwrite all registry data in <key2> without prompting for confirmation.\n\
This option does not modify subkeys and values that only exist in <key2>.\n\n"
Suprascrie toate datele registrului în <cheia2> fără să se necesite confirmare.\n\
Această opțiune nu modifică subcheile și valorile ce există doar în <cheia2>.\n\n"
STRING_COPY_SRC_DEST_SAME, "reg: The source and destination keys cannot be the same\n"
STRING_COPY_CONFIRM, "The value '%1\\%2' already exists in the destination key. Do you want to overwrite it?"
STRING_COPY_SRC_DEST_SAME, "reg: Cheile sursă și destinație nu pot fi aceleași\n"
STRING_COPY_CONFIRM, "Valoarea '%1\\%2' există deja în cheia de destinație. Doriți să o suprascrieți?"
}

View File

@@ -1,4 +1,10 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS Taskkill Command
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -14,10 +20,10 @@ STRINGTABLE
STRING_CLOSE_PROC_SRCH, "Către fereastra procesului «%1» cu PID %2!u! a fost emis un mesaj de închidere.\n"
STRING_TERM_PID_SEARCH, "Procesul cu PID %1!u! a fost oprit în mod forțat.\n"
STRING_TERM_PROC_SEARCH, "Procesul «%1» cu PID %2!u! a fost oprit în mod forțat.\n"
STRING_SEARCH_FAILED, "Eroare: Procesul «%1» nu poate fi găsit.\n"
STRING_ENUM_FAILED, "Eroare: Procesele nu au putut fi enumerate.\n"
STRING_SEARCH_FAILED, "Eroare: Nu se poate găsi procesul «%1».\n"
STRING_ENUM_FAILED, "Eroare: Nu se poate enumera lista de procese.\n"
STRING_TERMINATE_FAILED, "Eroare: Procesul «%1» nu poate fi oprit.\n"
STRING_SELF_TERMINATION, "Eroare: Auto-terminarea nu este permisă.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
STRING_PARAM_TOO_MUCH, "Eroare: Sintaxă nevalidă. Opțiunea '%1' nu este permisă mai mult de '%2!d!' dată(dăți).\n"
STRING_INVALID_SYNTAX, "Eroare: Sintaxă nevalidă.\n"
}

View File

@@ -1,11 +1,17 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS Tree Walk Utility
* LICENSE: GPL-2.0 (https://spdx.org/licenses/GPL-2.0)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Afișează o structură de fișiere a unui director sau unități de stocare.\n\n\
TREE [unitate:][cale] [/F] [/A]\n\n\
TREE [disc:][cale] [/F] [/A]\n\n\
\t/F Afișează numele fișierelor din fiecare director.\n\
\t/A Folosește ASCII în loc de caractere extinse.\n"
IDS_NO_SUBDIRECTORIES "Nu există subdirectoare"

View File

@@ -407,8 +407,16 @@ static HRESULT WINAPI Host_DisconnectObject(IHost *iface, IDispatch *Object)
static HRESULT WINAPI Host_Sleep(IHost *iface, LONG Time)
{
#ifdef __REACTOS__
UNREFERENCED_PARAMETER(iface);
if (Time < 0)
return E_INVALIDARG;
Sleep(Time);
return S_OK;
#else
WINE_FIXME("(%d)\n", Time);
return E_NOTIMPL;
#endif
}
static HRESULT WINAPI Host_ConnectObject(IHost *iface, IDispatch *Object, BSTR Prefix)

View File

@@ -52,7 +52,7 @@ XCOPY источник [целевой_объект] [/I] [/S] [/Q] [/F] [/L] [/
/A Копирует только те файлы, для которых установлен атрибут ""архивный"".\n\
/M Копирует только те файлы, для которых установлен атрибут ""архивный"",\n\
при этом атрибут удаляется.\n\
[/K] Copy file attributes, without this attributes are not preserved.\n\
[/K] Копирует атрибуты файлов, без этого атрибуты не сохраняются.\n\
/D | /D:m-d-y Копирование файлов, измененных не ранее указанной даты.\n\
Если дата не указана, заменяются только конечные файлы,\n\
более старые, чем исходные.\n"

View File

@@ -2,5 +2,7 @@
add_rc_deps(control.rc ${CMAKE_CURRENT_SOURCE_DIR}/resources/config.ico)
add_executable(control control.c control.rc)
set_module_type(control win32gui UNICODE)
add_delay_importlibs(control ole32)
target_link_libraries(control uuid)
add_importlibs(control advapi32 shell32 user32 msvcrt kernel32)
add_cd_file(TARGET control DESTINATION reactos/system32 FOR all)

View File

@@ -4,12 +4,14 @@
* PURPOSE: ReactOS System Control Panel
* COPYRIGHT: Copyright 2004 Gero Kuehn (reactos.filter@gkware.com)
* Copyright 2008 Colin Finck (colin@reactos.org)
* Copyright 2014 Herm<EFBFBD>s B<EFBFBD>lusca-Ma<EFBFBD>to (hermes.belusca-maito@reactos.org)
* Copyright 2014 Hermès Bélusca-Maïto (hermes.belusca-maito@reactos.org)
*/
#include <stdio.h>
#define WIN32_NO_STATUS
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
@@ -17,6 +19,9 @@
#include <winreg.h>
#include <shellapi.h>
#include <strsafe.h>
#include <objbase.h>
#include <shobjidl.h>
#include <shlguid.h>
#include "resource.h"
@@ -34,6 +39,35 @@ VOID
WINAPI
Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow);
static BOOL
IsSwitch(LPCWSTR Switch, LPCWSTR Arg)
{
if (*Arg == '/' || *Arg == '-')
{
return !lstrcmpiW(Arg+1, Switch);
}
return FALSE;
}
static HRESULT
OpenControlPanelItem(LPCWSTR Name, LPCWSTR Page)
{
HRESULT hr = CoInitialize(0);
if (SUCCEEDED(hr))
{
IOpenControlPanel *pOCP;
hr = CoCreateInstance(&CLSID_OpenControlPanel, NULL, CLSCTX_INPROC_SERVER,
&IID_IOpenControlPanel, (void**)&pOCP);
if (SUCCEEDED(hr))
{
hr = IOpenControlPanel_Open(pOCP, Name, Page, NULL);
IOpenControlPanel_Release(pOCP);
}
CoUninitialize();
}
return hr;
}
static INT
OpenShellFolder(LPWSTR lpFolderCLSID)
{
@@ -73,11 +107,16 @@ wWinMain(HINSTANCE hInstance,
INT nCmdShow)
{
HKEY hKey;
LPWSTR *argv;
int argc;
/* Show the control panel window if no argument or "panel" was passed */
if (*lpCmdLine == 0 || !_wcsicmp(lpCmdLine, L"panel"))
return OpenShellFolder(L"");
/* Map legacy control panels */
if (!_wcsicmp(lpCmdLine, L"sticpl.cpl")) lpCmdLine = (LPWSTR) L"scannercamera";
/* Check one of the built-in control panel handlers */
if (!_wcsicmp(lpCmdLine, L"admintools")) return OpenShellFolder(L"\\::{D20EA4E1-3957-11d2-A40B-0C5020524153}");
else if (!_wcsicmp(lpCmdLine, L"color")) return RunControlPanel(L"desk.cpl,,2");
@@ -99,6 +138,28 @@ wWinMain(HINSTANCE hInstance,
else if (!_wcsicmp(lpCmdLine, L"userpasswords")) return RunControlPanel(L"nusrmgr.cpl"); /* Graphical User Account Manager */
else if (!_wcsicmp(lpCmdLine, L"userpasswords2")) return RUNDLL(L"netplwiz.dll,UsersRunDll"); /* Dialog based advanced User Account Manager */
/* https://learn.microsoft.com/en-us/windows/win32/shell/executing-control-panel-items#windows-vista-canonical-names */
argv = CommandLineToArgvW(lpCmdLine, &argc);
if (argv)
{
UINT argi = 0;
HRESULT hr = -1;
if (argc >= 2 && IsSwitch(L"name", argv[argi + 0]))
{
LPCWSTR pszPage = NULL;
if (argc >= 4 && IsSwitch(L"page", argv[argi + 2]))
{
pszPage = argv[argi + 3];
}
hr = OpenControlPanelItem(argv[argi + 1], pszPage);
}
LocalFree(argv);
if (hr != -1)
{
return SUCCEEDED(hr);
}
}
/* It is none of them, so look for a handler in the registry */
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
L"Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls",

View File

@@ -0,0 +1,100 @@
/*
* PROJECT: ReactOS CTF Monitor
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Cicero Tipbar (Language Bar) loader window
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include "precomp.h"
#include "CLoaderWnd.h"
#include "CRegWatcher.h"
BOOL CLoaderWnd::s_bUninitedSystem = FALSE;
BOOL CLoaderWnd::s_bWndClassRegistered = FALSE;
BOOL CLoaderWnd::Init()
{
if (s_bWndClassRegistered)
return TRUE; // Already registered
// Register a window class
WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
wc.cbSize = sizeof(wc);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.hInstance = g_hInst;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.lpfnWndProc = WindowProc;
wc.lpszClassName = TEXT("CiCTipBarClass");
if (!::RegisterClassEx(&wc))
return FALSE;
s_bWndClassRegistered = TRUE; // Remember
return TRUE;
}
HWND CLoaderWnd::CreateWnd()
{
m_hWnd = ::CreateWindowEx(0, TEXT("CiCTipBarClass"), NULL, WS_DISABLED,
0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
return m_hWnd;
}
LRESULT CALLBACK
CLoaderWnd::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_CREATE:
break;
case WM_DESTROY:
::PostQuitMessage(0);
break;
case WM_QUERYENDSESSION:
// NOTE: We don't support Win95/98/Me
#ifdef SUPPORT_WIN9X
if (!(g_dwOsInfo & CIC_OSINFO_NT) && (!g_fWinLogon || (lParam & ENDSESSION_LOGOFF)))
{
ClosePopupTipbar();
TF_UninitSystem();
CLoaderWnd::s_bUninitedSystem = TRUE;
}
#endif
return TRUE;
case WM_ENDSESSION:
if (wParam) // The session is being ended?
{
if (!s_bUninitedSystem)
{
// Un-initialize now
UninitApp();
TF_UninitSystem();
s_bUninitedSystem = TRUE;
}
}
else if (s_bUninitedSystem) // Once un-initialized?
{
// Re-initialize
TF_InitSystem();
if (!g_bOnWow64)
GetPopupTipbar(hwnd, !!g_fWinLogon);
s_bUninitedSystem = FALSE;
}
break;
case WM_SYSCOLORCHANGE:
case WM_DISPLAYCHANGE:
if (!g_bOnWow64) // Is the system x86/x64 native?
CRegWatcher::StartSysColorChangeTimer();
break;
default:
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
return 0;
}

View File

@@ -0,0 +1,26 @@
/*
* PROJECT: ReactOS CTF Monitor
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Cicero Tipbar (Language Bar) loader window
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
class CLoaderWnd
{
public:
HWND m_hWnd;
static BOOL s_bUninitedSystem;
static BOOL s_bWndClassRegistered;
CLoaderWnd() : m_hWnd(NULL) { }
~CLoaderWnd() { }
BOOL Init();
HWND CreateWnd();
protected:
static LRESULT CALLBACK
WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
};

View File

@@ -0,0 +1,14 @@
list(APPEND SOURCE
ctfmon.cpp
CLoaderWnd.cpp
CRegWatcher.cpp)
add_rc_deps(ctfmon.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/ctfmon.ico)
add_executable(ctfmon ${SOURCE} ctfmon.rc)
set_module_type(ctfmon win32gui UNICODE)
add_dependencies(ctfmon msctf msutb)
target_link_libraries(ctfmon uuid cicero)
add_importlibs(ctfmon msctf msutb advapi32 shell32 user32 msvcrt kernel32)
add_pch(ctfmon precomp.h SOURCE)
add_cd_file(TARGET ctfmon DESTINATION reactos/system32 FOR all)

View File

@@ -0,0 +1,369 @@
/*
* PROJECT: ReactOS CTF Monitor
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Registry watcher
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include "precomp.h"
#include "CRegWatcher.h"
// The event handles to use in watching
HANDLE CRegWatcher::s_ahWatchEvents[WATCHENTRY_MAX] = { NULL };
// The registry entries to watch
WATCHENTRY CRegWatcher::s_WatchEntries[WATCHENTRY_MAX] =
{
{ HKEY_CURRENT_USER, TEXT("Keyboard Layout\\Toggle") }, // WI_TOGGLE
{ HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\CTF\\TIP") }, // WI_MACHINE_TIF
{ HKEY_CURRENT_USER, TEXT("Keyboard Layout\\Preload") }, // WI_PRELOAD
{ HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run") }, // WI_RUN
{ HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\TIP") }, // WI_USER_TIF
{ HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Speech") }, // WI_USER_SPEECH
{ HKEY_CURRENT_USER, TEXT("Control Panel\\Appearance") }, // WI_APPEARANCE
{ HKEY_CURRENT_USER, TEXT("Control Panel\\Colors") }, // WI_COLORS
{ HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop\\WindowMetrics") }, // WI_WINDOW_METRICS
{ HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Speech") }, // WI_MACHINE_SPEECH
{ HKEY_CURRENT_USER, TEXT("Keyboard Layout") }, // WI_KEYBOARD_LAYOUT
{ HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\Assemblies") }, // WI_ASSEMBLIES
};
// The timer IDs: For delaying ignitions
UINT CRegWatcher::s_nSysColorTimerId = 0;
UINT CRegWatcher::s_nKbdToggleTimerId = 0;
UINT CRegWatcher::s_nRegImxTimerId = 0;
// %WINDIR%/IME/sptip.dll!TF_CreateLangProfileUtil
typedef HRESULT (WINAPI* FN_TF_CreateLangProfileUtil)(ITfFnLangProfileUtil**);
BOOL
CRegWatcher::Init()
{
// NOTE: We don't support Win95/98/Me
#ifdef SUPPORT_WIN9X
if (!(g_dwOsInfo & CIC_OSINFO_NT))
s_WatchEntries[WI_RUN].hRootKey = HKEY_LOCAL_MACHINE;
#endif
// Create some nameless events and initialize them
for (SIZE_T iEvent = 0; iEvent < _countof(s_ahWatchEvents); ++iEvent)
{
s_ahWatchEvents[iEvent] = ::CreateEvent(NULL, TRUE, FALSE, NULL);
InitEvent(iEvent, FALSE);
}
// Internat.exe is an enemy of ctfmon.exe
KillInternat();
UpdateSpTip();
return TRUE;
}
VOID
CRegWatcher::Uninit()
{
for (SIZE_T iEvent = 0; iEvent < _countof(s_ahWatchEvents); ++iEvent)
{
// Close the key
WATCHENTRY& entry = s_WatchEntries[iEvent];
if (entry.hKey)
{
::RegCloseKey(entry.hKey);
entry.hKey = NULL;
}
// Close the event handle
HANDLE& hEvent = s_ahWatchEvents[iEvent];
if (hEvent)
{
::CloseHandle(hEvent);
hEvent = NULL;
}
}
}
// advapi32!RegNotifyChangeKeyValue
typedef LONG (WINAPI *FN_RegNotifyChangeKeyValue)(HKEY, BOOL, DWORD, HANDLE, BOOL);
LONG WINAPI
DelayedRegNotifyChangeKeyValue(
HKEY hKey,
BOOL bWatchSubtree,
DWORD dwNotifyFilter,
HANDLE hEvent,
BOOL fAsynchronous)
{
static FN_RegNotifyChangeKeyValue s_fnRegNotifyChangeKeyValue = NULL;
if (!s_fnRegNotifyChangeKeyValue)
{
HINSTANCE hAdvApi32 = cicGetSystemModuleHandle(TEXT("advapi32.dll"), FALSE);
s_fnRegNotifyChangeKeyValue =
(FN_RegNotifyChangeKeyValue)GetProcAddress(hAdvApi32, "RegNotifyChangeKeyValue");
if (!s_fnRegNotifyChangeKeyValue)
return ERROR_CALL_NOT_IMPLEMENTED;
}
return s_fnRegNotifyChangeKeyValue(hKey, bWatchSubtree, dwNotifyFilter, hEvent, fAsynchronous);
}
BOOL
CRegWatcher::InitEvent(
_In_ SIZE_T iEvent,
_In_ BOOL bResetEvent)
{
// Reset the signal status
if (bResetEvent)
::ResetEvent(s_ahWatchEvents[iEvent]);
// Close once to re-open
WATCHENTRY& entry = s_WatchEntries[iEvent];
if (entry.hKey)
{
::RegCloseKey(entry.hKey);
entry.hKey = NULL;
}
// Open or create a registry key to watch registry key
LSTATUS error;
error = ::RegOpenKeyEx(entry.hRootKey, entry.pszSubKey, 0, KEY_READ, &entry.hKey);
if (error != ERROR_SUCCESS)
{
error = ::RegCreateKeyEx(entry.hRootKey, entry.pszSubKey, 0, NULL, 0,
KEY_ALL_ACCESS, NULL, &entry.hKey, NULL);
if (error != ERROR_SUCCESS)
return FALSE;
}
// Start registry watching
error = DelayedRegNotifyChangeKeyValue(entry.hKey,
TRUE,
REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_NAME,
s_ahWatchEvents[iEvent],
TRUE);
#ifndef NDEBUG
if (error != ERROR_SUCCESS)
OutputDebugStringA("RegNotifyChangeKeyValue failed\n");
#endif
return error == ERROR_SUCCESS;
}
VOID
CRegWatcher::UpdateSpTip()
{
// Post message 0x8002 to "SapiTipWorkerClass" windows
::EnumWindows(EnumWndProc, 0);
// Clear "ProfileInitialized" value
HKEY hKey;
LSTATUS error = ::RegOpenKeyEx(HKEY_CURRENT_USER,
TEXT("SOFTWARE\\Microsoft\\CTF\\Sapilayr"),
0, KEY_WRITE, &hKey);
if (error == ERROR_SUCCESS)
{
DWORD dwValue = 0, cbValue = sizeof(dwValue);
::RegSetValueEx(hKey, TEXT("ProfileInitialized"), NULL, REG_DWORD, (LPBYTE)&dwValue, cbValue);
::RegCloseKey(hKey);
}
// Get %WINDIR%/IME/sptip.dll!TF_CreateLangProfileUtil function
HINSTANCE hSPTIP = cicLoadSystemLibrary(TEXT("IME\\sptip.dll"), TRUE);
FN_TF_CreateLangProfileUtil fnTF_CreateLangProfileUtil =
(FN_TF_CreateLangProfileUtil)::GetProcAddress(hSPTIP, "TF_CreateLangProfileUtil");
if (fnTF_CreateLangProfileUtil)
{
// Call it
ITfFnLangProfileUtil *pProfileUtil = NULL;
HRESULT hr = fnTF_CreateLangProfileUtil(&pProfileUtil);
if ((hr == S_OK) && pProfileUtil) // Success!
{
// Register profile
hr = pProfileUtil->RegisterActiveProfiles();
if (hr == S_OK)
TF_InvalidAssemblyListCacheIfExist(); // Invalidate the assembly list cache
pProfileUtil->Release();
}
}
if (hSPTIP)
::FreeLibrary(hSPTIP);
}
VOID
CRegWatcher::KillInternat()
{
HKEY hKey;
WATCHENTRY& entry = s_WatchEntries[WI_RUN];
// Delete internat.exe from registry "Run" key
LSTATUS error = ::RegOpenKeyEx(entry.hRootKey, entry.pszSubKey, 0, KEY_ALL_ACCESS, &hKey);
if (error == ERROR_SUCCESS)
{
::RegDeleteValue(hKey, TEXT("internat.exe"));
::RegCloseKey(hKey);
}
// Kill the "Indicator" window (that internat.exe creates)
HWND hwndInternat = ::FindWindow(TEXT("Indicator"), NULL);
if (hwndInternat)
::PostMessage(hwndInternat, WM_CLOSE, 0, 0);
}
// Post message 0x8002 to every "SapiTipWorkerClass" window.
// Called from CRegWatcher::UpdateSpTip
BOOL CALLBACK
CRegWatcher::EnumWndProc(
_In_ HWND hWnd,
_In_ LPARAM lParam)
{
TCHAR ClassName[MAX_PATH];
UNREFERENCED_PARAMETER(lParam);
if (::GetClassName(hWnd, ClassName, _countof(ClassName)) &&
_tcsicmp(ClassName, TEXT("SapiTipWorkerClass")) == 0)
{
PostMessage(hWnd, 0x8002, 0, 0); // FIXME: Magic number
}
return TRUE;
}
VOID CALLBACK
CRegWatcher::SysColorTimerProc(
_In_ HWND hwnd,
_In_ UINT uMsg,
_In_ UINT_PTR idEvent,
_In_ DWORD dwTime)
{
UNREFERENCED_PARAMETER(hwnd);
UNREFERENCED_PARAMETER(uMsg);
UNREFERENCED_PARAMETER(idEvent);
UNREFERENCED_PARAMETER(dwTime);
// Cancel the timer
if (s_nSysColorTimerId)
{
::KillTimer(NULL, s_nSysColorTimerId);
s_nSysColorTimerId = 0;
}
TF_PostAllThreadMsg(15, 16);
}
VOID
CRegWatcher::StartSysColorChangeTimer()
{
// Call SysColorTimerProc 0.5 seconds later (Delayed)
if (s_nSysColorTimerId)
{
::KillTimer(NULL, s_nSysColorTimerId);
s_nSysColorTimerId = 0;
}
s_nSysColorTimerId = ::SetTimer(NULL, 0, 500, SysColorTimerProc);
}
VOID CALLBACK
CRegWatcher::RegImxTimerProc(
_In_ HWND hwnd,
_In_ UINT uMsg,
_In_ UINT_PTR idEvent,
_In_ DWORD dwTime)
{
UNREFERENCED_PARAMETER(hwnd);
UNREFERENCED_PARAMETER(uMsg);
UNREFERENCED_PARAMETER(idEvent);
UNREFERENCED_PARAMETER(dwTime);
// Cancel the timer
if (s_nRegImxTimerId)
{
::KillTimer(NULL, s_nRegImxTimerId);
s_nRegImxTimerId = 0;
}
TF_InvalidAssemblyListCache();
TF_PostAllThreadMsg(12, 16);
}
VOID CALLBACK
CRegWatcher::KbdToggleTimerProc(
_In_ HWND hwnd,
_In_ UINT uMsg,
_In_ UINT_PTR idEvent,
_In_ DWORD dwTime)
{
UNREFERENCED_PARAMETER(hwnd);
UNREFERENCED_PARAMETER(uMsg);
UNREFERENCED_PARAMETER(idEvent);
UNREFERENCED_PARAMETER(dwTime);
// Cancel the timer
if (s_nKbdToggleTimerId)
{
::KillTimer(NULL, s_nKbdToggleTimerId);
s_nKbdToggleTimerId = 0;
}
TF_PostAllThreadMsg(11, 16);
}
VOID
CRegWatcher::OnEvent(
_In_ SIZE_T iEvent)
{
InitEvent(iEvent, TRUE);
switch (iEvent)
{
case WI_TOGGLE:
{
// Call KbdToggleTimerProc 0.5 seconds later (Delayed)
if (s_nKbdToggleTimerId)
{
::KillTimer(NULL, s_nKbdToggleTimerId);
s_nKbdToggleTimerId = 0;
}
s_nKbdToggleTimerId = ::SetTimer(NULL, 0, 500, KbdToggleTimerProc);
break;
}
case WI_MACHINE_TIF:
case WI_PRELOAD:
case WI_USER_TIF:
case WI_MACHINE_SPEECH:
case WI_KEYBOARD_LAYOUT:
case WI_ASSEMBLIES:
{
if (iEvent == WI_MACHINE_SPEECH)
UpdateSpTip();
// Call RegImxTimerProc 0.2 seconds later (Delayed)
if (s_nRegImxTimerId)
{
::KillTimer(NULL, s_nRegImxTimerId);
s_nRegImxTimerId = 0;
}
s_nRegImxTimerId = ::SetTimer(NULL, 0, 200, RegImxTimerProc);
break;
}
case WI_RUN: // The "Run" key is changed
{
KillInternat(); // Deny internat.exe the right to live
break;
}
case WI_USER_SPEECH:
case WI_APPEARANCE:
case WI_COLORS:
case WI_WINDOW_METRICS:
{
StartSysColorChangeTimer();
break;
}
default:
{
break;
}
}
}

View File

@@ -0,0 +1,45 @@
/*
* PROJECT: ReactOS CTF Monitor
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Registry watcher
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
struct WATCHENTRY
{
HKEY hRootKey;
LPCTSTR pszSubKey;
HKEY hKey;
};
#define WATCHENTRY_MAX 12
struct CRegWatcher
{
static HANDLE s_ahWatchEvents[WATCHENTRY_MAX];
static WATCHENTRY s_WatchEntries[WATCHENTRY_MAX];
static UINT s_nSysColorTimerId, s_nKbdToggleTimerId, s_nRegImxTimerId;
static BOOL Init();
static VOID Uninit();
static BOOL InitEvent(_In_ SIZE_T iEvent, _In_ BOOL bResetEvent);
static VOID UpdateSpTip();
static VOID KillInternat();
static VOID StartSysColorChangeTimer();
static VOID OnEvent(_In_ SIZE_T iEvent);
protected:
static BOOL CALLBACK
EnumWndProc(_In_ HWND hWnd, _In_ LPARAM lParam);
static VOID CALLBACK
SysColorTimerProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ UINT_PTR idEvent, _In_ DWORD dwTime);
static VOID CALLBACK
KbdToggleTimerProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ UINT_PTR idEvent, _In_ DWORD dwTime);
static VOID CALLBACK
RegImxTimerProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ UINT_PTR idEvent, _In_ DWORD dwTime);
};

View File

@@ -0,0 +1,371 @@
/*
* PROJECT: ReactOS CTF Monitor
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Providing Language Bar front-end
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include "precomp.h"
#include "CRegWatcher.h"
#include "CLoaderWnd.h"
// kernel32!SetProcessShutdownParameters
typedef BOOL (WINAPI *FN_SetProcessShutdownParameters)(DWORD, DWORD);
FN_SetProcessShutdownParameters g_fnSetProcessShutdownParameters = NULL;
// kernel32!GetSystemWow64DirectoryA
typedef UINT (WINAPI *FN_GetSystemWow64DirectoryA)(LPSTR, UINT);
FN_GetSystemWow64DirectoryA g_fnGetSystemWow64DirectoryA = NULL;
// kernel32!GetSystemWow64DirectoryW
typedef UINT (WINAPI *FN_GetSystemWow64DirectoryW)(LPWSTR, UINT);
FN_GetSystemWow64DirectoryW g_fnGetSystemWow64DirectoryW = NULL;
HINSTANCE g_hInst = NULL; // The application instance
HINSTANCE g_hKernel32 = NULL; // The "kernel32.dll" instance
UINT g_uACP = CP_ACP; // The active codepage
BOOL g_fWinLogon = FALSE; // Is it a log-on process?
HANDLE g_hCicMutex = NULL; // The Cicero mutex
BOOL g_bOnWow64 = FALSE; // Is the app running on WoW64?
BOOL g_fNoRunKey = FALSE; // Don't write registry key "Run"?
BOOL g_fJustRunKey = FALSE; // Just write registry key "Run"?
DWORD g_dwOsInfo = 0; // The OS version info. See cicGetOSInfo
CLoaderWnd* g_pLoaderWnd = NULL; // Tipbar loader window
static VOID
ParseCommandLine(
_In_ LPCTSTR pszCmdLine)
{
g_fNoRunKey = g_fJustRunKey = FALSE;
for (LPCTSTR pch = pszCmdLine; *pch; ++pch)
{
// Skip space
while (*pch == TEXT(' '))
++pch;
if (*pch == TEXT('\0'))
return;
if ((*pch == TEXT('-')) || (*pch == TEXT('/')))
{
++pch;
switch (*pch)
{
case TEXT('N'): case TEXT('n'): // Found "/N" option
g_fNoRunKey = TRUE;
break;
case TEXT('R'): case TEXT('r'): // Found "/R" option
g_fJustRunKey = TRUE;
break;
case UNICODE_NULL:
return;
default:
break;
}
}
}
}
static VOID
WriteRegRun(VOID)
{
if (g_fNoRunKey) // If "/N" option is specified
return; // Don't write
// Open "Run" key
HKEY hKey;
LSTATUS error = ::RegCreateKey(HKEY_CURRENT_USER,
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),
&hKey);
if (error != ERROR_SUCCESS)
return;
// Write the module path
CicSystemModulePath ModPath;
if (ModPath.Init(TEXT("ctfmon.exe"), FALSE))
{
DWORD cbData = (ModPath.m_cchPath + 1) * sizeof(TCHAR);
::RegSetValueEx(hKey, TEXT("ctfmon.exe"), 0, REG_SZ, (BYTE*)ModPath.m_szPath, cbData);
}
::RegCloseKey(hKey);
}
static HRESULT
GetGlobalCompartment(
_In_ REFGUID guid,
_Inout_ ITfCompartment **ppComp)
{
*ppComp = NULL;
ITfCompartmentMgr *pCompMgr = NULL;
HRESULT hr = TF_GetGlobalCompartment(&pCompMgr);
if (FAILED(hr))
return hr;
if (!pCompMgr)
return E_FAIL;
hr = pCompMgr->GetCompartment(guid, ppComp);
pCompMgr->Release();
return hr;
}
static HRESULT
SetGlobalCompartmentDWORD(
_In_ REFGUID guid,
_In_ DWORD dwValue)
{
HRESULT hr;
VARIANT vari;
ITfCompartment *pComp;
hr = GetGlobalCompartment(guid, &pComp);
if (FAILED(hr))
return hr;
V_VT(&vari) = VT_I4;
V_I4(&vari) = dwValue;
hr = pComp->SetValue(0, &vari);
pComp->Release();
return hr;
}
static BOOL
CheckX64System(
_In_ LPTSTR lpCmdLine)
{
// Is the system x64?
SYSTEM_INFO SystemInfo;
::GetSystemInfo(&SystemInfo);
if (SystemInfo.wProcessorArchitecture != PROCESSOR_ARCHITECTURE_IA64 ||
SystemInfo.wProcessorArchitecture != PROCESSOR_ARCHITECTURE_AMD64)
{
return FALSE;
}
// Get GetSystemWow64DirectoryW function
g_hKernel32 = cicGetSystemModuleHandle(TEXT("kernel32.dll"), FALSE);
#ifdef UNICODE
g_fnGetSystemWow64DirectoryW =
(FN_GetSystemWow64DirectoryW)::GetProcAddress(g_hKernel32, "GetSystemWow64DirectoryW");
if (!g_fnGetSystemWow64DirectoryW)
return FALSE;
#else
g_fnGetSystemWow64DirectoryA =
(FN_GetSystemWow64DirectoryA)::GetProcAddress(g_hKernel32, "GetSystemWow64DirectoryA");
if (!g_fnGetSystemWow64DirectoryA)
return FALSE;
#endif
// Build WoW64 ctfmon.exe pathname
TCHAR szPath[MAX_PATH];
#ifdef UNICODE
UINT cchPath = g_fnGetSystemWow64DirectoryW(szPath, _countof(szPath));
#else
UINT cchPath = g_fnGetSystemWow64DirectoryA(szPath, _countof(szPath));
#endif
if (!cchPath && FAILED(StringCchCat(szPath, _countof(szPath), TEXT("\\ctfmon.exe"))))
return FALSE;
// Create a WoW64 ctfmon.exe process
PROCESS_INFORMATION pi;
STARTUPINFO si = { sizeof(si) };
si.wShowWindow = SW_SHOWMINNOACTIVE;
if (!::CreateProcess(szPath, lpCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
return FALSE;
::CloseHandle(pi.hThread);
::CloseHandle(pi.hProcess);
return TRUE;
}
static BOOL
InitApp(
_In_ HINSTANCE hInstance,
_In_ LPTSTR lpCmdLine)
{
g_hInst = hInstance; // Save the instance handle
g_bOnWow64 = cicIsWow64(); // Is the current process on WoW64?
cicGetOSInfo(&g_uACP, &g_dwOsInfo); // Get OS info
// Initialize Cicero
TFInitLib();
// Create a mutex for Cicero
g_hCicMutex = TF_CreateCicLoadMutex(&g_fWinLogon);
if (!g_hCicMutex)
return FALSE;
// Write to "Run" registry key for starting up
WriteRegRun();
// Call SetProcessShutdownParameters if possible
if (g_dwOsInfo & CIC_OSINFO_NT)
{
g_hKernel32 = cicGetSystemModuleHandle(TEXT("kernel32.dll"), FALSE);
g_fnSetProcessShutdownParameters =
(FN_SetProcessShutdownParameters)
::GetProcAddress(g_hKernel32, "SetProcessShutdownParameters");
if (g_fnSetProcessShutdownParameters)
g_fnSetProcessShutdownParameters(0xF0, SHUTDOWN_NORETRY);
}
// Start text framework
TF_InitSystem();
// Start watching registry if x86/x64 native
if (!g_bOnWow64)
CRegWatcher::Init();
// Create Tipbar loader window
g_pLoaderWnd = new(cicNoThrow) CLoaderWnd();
if (!g_pLoaderWnd || !g_pLoaderWnd->Init())
return FALSE;
if (g_pLoaderWnd->CreateWnd())
{
// Go to the bottom of the hell
::SetWindowPos(g_pLoaderWnd->m_hWnd, HWND_BOTTOM, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}
// Display Tipbar Popup if x86/x64 native and necessary
if (!g_bOnWow64)
GetPopupTipbar(g_pLoaderWnd->m_hWnd, g_fWinLogon);
// Do x64 stuffs
CheckX64System(lpCmdLine);
return TRUE;
}
VOID
UninitApp(VOID)
{
// Close Tipbar Popup
ClosePopupTipbar();
// Release Cicero
TFUninitLib();
// Close the mutex
::CloseHandle(g_hCicMutex);
g_hCicMutex = NULL;
// Quit watching registry if x86/x64 native
if (!g_bOnWow64)
CRegWatcher::Uninit();
}
static INT
DoMainLoop(VOID)
{
MSG msg;
if (g_bOnWow64) // Is the current process on WoW64?
{
// Just a simple message loop
while (::GetMessage(&msg, NULL, 0, 0))
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
return (INT)msg.wParam;
}
// Open the existing event by the name
HANDLE hSwitchEvent = ::OpenEvent(SYNCHRONIZE, FALSE, TEXT("WinSta0_DesktopSwitch"));
// The target events to watch
HANDLE ahEvents[WATCHENTRY_MAX + 1];
// Borrow some handles from CRegWatcher
CopyMemory(ahEvents, CRegWatcher::s_ahWatchEvents, WATCHENTRY_MAX * sizeof(HANDLE));
ahEvents[WI_DESKTOP_SWITCH] = hSwitchEvent; // Add it
// Another message loop
for (;;)
{
// Wait for target signal
DWORD dwWait = ::MsgWaitForMultipleObjects(_countof(ahEvents), ahEvents, 0, INFINITE,
QS_ALLINPUT);
if (dwWait == (WAIT_OBJECT_0 + _countof(ahEvents))) // Is input available?
{
// Do the events
while (::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_QUIT)
goto Quit;
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
}
else if (dwWait == (WAIT_OBJECT_0 + WI_DESKTOP_SWITCH)) // Desktop switch?
{
SetGlobalCompartmentDWORD(GUID_COMPARTMENT_SPEECH_OPENCLOSE, 0);
::ResetEvent(hSwitchEvent);
}
else // Do the other events
{
CRegWatcher::OnEvent(dwWait - WAIT_OBJECT_0);
}
}
Quit:
::CloseHandle(hSwitchEvent);
return (INT)msg.wParam;
}
// The main function for Unicode Win32
EXTERN_C INT WINAPI
_tWinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInst,
LPTSTR lpCmdLine,
INT nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInst);
UNREFERENCED_PARAMETER(nCmdShow);
// Parse command line
ParseCommandLine(lpCmdLine);
if (g_fJustRunKey) // If "/R" option is specified
{
// Just write registry and exit
WriteRegRun();
return 1;
}
// Initialize the application
if (!InitApp(hInstance, lpCmdLine))
return 0;
// The main loop
INT ret = DoMainLoop();
// Clean up the loader
if (g_pLoaderWnd)
{
delete g_pLoaderWnd;
g_pLoaderWnd = NULL;
}
// Un-initialize app and text framework
if (!CLoaderWnd::s_bUninitedSystem)
{
UninitApp();
TF_UninitSystem();
}
return ret;
}

View File

@@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS CTF Monitor
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Providing Language Bar front-end
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include <windef.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS CTF Monitor"
#define REACTOS_STR_INTERNAL_NAME "ctfmon"
#define REACTOS_STR_ORIGINAL_FILENAME "ctfmon.exe"
#include <reactos/version.rc>
IDI_MAIN ICON "res/ctfmon.ico"

View File

@@ -0,0 +1,47 @@
/*
* PROJECT: ReactOS CTF Monitor
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Providing Language Bar front-end
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
#define WIN32_NO_STATUS
#include <windows.h>
#include <shellapi.h>
#include <shlwapi.h>
#include <stdlib.h>
#include <tchar.h>
#include <strsafe.h>
#include <msctf.h>
#include <ctfutb.h>
#include <ctffunc.h>
#include <cicbase.h>
#include <cicutb.h>
#include "resource.h"
extern HINSTANCE g_hInst;
extern BOOL g_bOnWow64;
extern BOOL g_fWinLogon;
extern DWORD g_dwOsInfo;
VOID UninitApp(VOID);
typedef enum WATCH_INDEX
{
WI_TOGGLE = 0,
WI_MACHINE_TIF = 1,
WI_PRELOAD = 2,
WI_RUN = 3,
WI_USER_TIF = 4,
WI_USER_SPEECH = 5,
WI_APPEARANCE = 6,
WI_COLORS = 7,
WI_WINDOW_METRICS = 8,
WI_MACHINE_SPEECH = 9,
WI_KEYBOARD_LAYOUT = 10,
WI_ASSEMBLIES = 11,
WI_DESKTOP_SWITCH = 12,
} WATCH_INDEX;

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,4 @@
#pragma once
/* Icons */
#define IDI_MAIN 100

View File

@@ -1,7 +1,9 @@
/*
* FILE: base/applications/dxdiag/lang/ro-RO.rc
* ReactOS Project (https://reactos.org)
* TRANSLATOR: Ștefan Fulea (stefan dot fulea at mail dot com)
* PROJECT: ReactOS DX Diagnostic
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -15,7 +17,7 @@ BEGIN
CONTROL "Tab1", IDC_TAB_CONTROL, "SysTabControl32", WS_TABSTOP, 2, 2, 474, 250
PUSHBUTTON "&Manual…", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
DEFPUSHBUTTON "&Următorul compartiment", IDC_BUTTON_NEXT, 187, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Păstrare informații…", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "S&alvare informații…", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "Î&nchide", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
@@ -23,7 +25,7 @@ IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Acest instrument oferă informații detaliate despre componentele ReactX și modulele-pilot instalate în sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Acest instrument oferă informații detaliate despre componentele ReactX și drivere instalate în sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Dacă aveți la cunoștință careva probleme la o anumită categorie, mergeți la compartimentul corespunzător de mai sus. Altfel, puteți utiliza butonul „Următorul compartiment” de mai jos pentru a trece secvențial prin fiecare categorie.", IDC_STATIC, 5, 15, 443, 25
GROUPBOX "Informații despre sistem", IDC_STATIC, 5, 35, 452, 150, SS_RIGHT
LTEXT "Data/Ora curentă:", IDC_STATIC, 70, 50, 80, 10, SS_RIGHT
@@ -70,8 +72,8 @@ BEGIN
EDITTEXT IDC_STATIC_ADAPTER_MEM, 95, 50, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_MODE, 95, 60, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_MONITOR, 95, 70, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Modúl-pilot", IDC_STATIC, 260, 0, 197, 95
RTEXT "Modulul-pilot primar:", IDC_STATIC, 275, 10, 55, 10
GROUPBOX "Driver", IDC_STATIC, 260, 0, 197, 95
RTEXT "Driver primar:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Versiune:", IDC_STATIC, 275, 20, 55, 10
RTEXT "Dată:", IDC_STATIC, 275, 30, 55, 10
RTEXT "Semnăt. WHQL:", IDC_STATIC, 275, 40, 55, 10
@@ -118,7 +120,7 @@ BEGIN
EDITTEXT IDC_STATIC_DSOUND_PRODUCTID, 95, 40, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_DSOUND_TYPE, 95, 50, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_DSOUND_STANDARD, 95, 60, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Modúl-pilot", IDC_STATIC, 260, 0, 197, 95
GROUPBOX "Driver", IDC_STATIC, 260, 0, 197, 95
RTEXT "Nume:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Versiune:", IDC_STATIC, 275, 20, 55, 10
RTEXT "Dată:", IDC_STATIC, 275, 30, 55, 10
@@ -218,7 +220,7 @@ BEGIN
IDS_DEVICE_CONTROLLER "ID controlor"
IDS_DEVICE_MANUFACTURER "ID producător"
IDS_DEVICE_PRODUCT "ID produs"
IDS_DEVICE_FORCEFEEDBACK "Forțează reacția modulului-pilot"
IDS_DEVICE_FORCEFEEDBACK "Forțează reacția driverului"
IDS_NOT_APPLICABLE "n/a"
IDS_OPTION_YES "Da"
IDS_DIRECTPLAY_COL_NAME1 "Nume"

View File

@@ -1,17 +1,23 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS fltmc utility
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "\nComenzi valide:\n\
load Încarcă un modul-pilot de tip filtru\n\
unload Descarcă un modul-pilot de tip filtru\n\
load Încarcă un driver de tip filtru\n\
unload Descarcă un driver de tip filtru\n\
filters Afișează filtrele înregistrate acum în sistem\n\n\
volumes Afișează toate volumele\n\n"
IDS_USAGE_LOAD "Încarcă un modul-pilot de tip filtru\n"
IDS_USAGE_UNLOAD "Descarcă un modul-pilot de tip filtru\n"
IDS_USAGE_LOAD "Încarcă un driver de tip filtru\n"
IDS_USAGE_UNLOAD "Descarcă un driver de tip filtru\n"
IDS_USAGE_FILTERS "Afișează toate filtrele înregistrate\n"
IDS_USAGE_VOLUMES "Afișează toate volumele\n"
END
@@ -25,9 +31,9 @@ END
STRINGTABLE
BEGIN
IDS_ERROR_PRIV "Eșec la instituirea dreptului de încărcare pentru modulul-pilot (0x%X)\n"
IDS_ERROR_FILTERS "Eșec la afișarea filtrelor (0x%X)\n"
IDS_ERROR_LOAD "Eșec la încărcarea filtrului (0x%X)\n"
IDS_ERROR_UNLOAD "Eșec la descărcarea filtrului (0x%X)\n"
IDS_ERROR_VOLUMES "Eșec la afișarea volumelor (0x%X)\n"
IDS_ERROR_PRIV "Nu s-a putut seta dreptul de încărcare pentru driverul (0x%X)\n"
IDS_ERROR_FILTERS "Nu s-au putut afișa filtrele (0x%X)\n"
IDS_ERROR_LOAD "Nu s-a putut încărca filtrul (0x%X)\n"
IDS_ERROR_UNLOAD "Nu s-a putut descărca filtrul (0x%X)\n"
IDS_ERROR_VOLUMES "Nu s-au putut afișa volumele (0x%X)\n"
END

View File

@@ -11,7 +11,7 @@ BEGIN
IDS_USAGE_LOAD "Загружает драйвер фильтра\n"
IDS_USAGE_UNLOAD "Выгружает драйвер фильтра\n"
IDS_USAGE_FILTERS "Выводит список всех зарегистрированных фильтров\n"
IDS_USAGE_VOLUMES "Lists all volumes\n"
IDS_USAGE_VOLUMES "Выводит список всех томов\n"
END
STRINGTABLE
@@ -27,5 +27,5 @@ BEGIN
IDS_ERROR_FILTERS "Не удалось получить список фильтров (0x%X)\n"
IDS_ERROR_LOAD "Не удалось загрузить фильтр (0x%X)\n"
IDS_ERROR_UNLOAD "Не удалось выгрузить фильтр (0x%X)\n"
IDS_ERROR_VOLUMES "Failed to list the volumes (0x%X)\n"
IDS_ERROR_VOLUMES "Не удалось получить список томов (0x%X)\n"
END

View File

@@ -18,11 +18,11 @@ BEGIN
IDS_ERROR "Eroare"
IDS_ERROR_NOMEM "Nu e destulă memorie pentru a încheia operația."
IDS_ERROR_NOFONT "Fișierul «%1» este un fișier font deteriorat."
IDS_ERROR_NOCLASS "Clasa de ferestre nu a putut fi inițializa."
IDS_ERROR_NOCLASS "Nu s-a putut inițializa clasa de ferestre."
IDS_ERROR_ISINSTALLED "Acest font este deja instalat!"
IDS_ERROR_FONTCPY "Nu a putut fi copiat acest fișier de font!"
IDS_ERROR_OPENKEY "Nu a putut fi deschi această cheie de regiștrii a fonturilor!"
IDS_ERROR_REGISTER "Nu a putut fi înregistrat noul font!"
IDS_ERROR_FONTCPY "Nu s-a putut copia acest fișier de font!"
IDS_ERROR_OPENKEY "Nu s-a putut deschide această cheie de regiștrii a fonturilor!"
IDS_ERROR_REGISTER "Nu s-a putut înregistra noul font!"
IDS_SUCCESS "Succes"
IDS_COMPLETED "Instalarea fontului completă."
IDS_FILTER_LIST "Toate fonturile recunoscute (*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc)\0*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc\0\

View File

@@ -4,7 +4,7 @@
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2009 Petru Dimitriu <petrimetri@gmail.com>
* Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2022 Andrei Miloiu <miloiuandrei@gmail.com>
* Copyright 2022-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -25,7 +25,7 @@ BEGIN
AUTORADIOBUTTON "Fă&ră", IDC_OPT_NOSCORE, 107, 45, 60, 10
AUTOCHECKBOX "&Afișează timp", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP
AUTOCHECKBOX "&Bară de stare", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP
AUTOCHECKBOX "&Păstrează scorul", IDC_OPT_KEEPSCORE, 100, 66, 65, 10, WS_TABSTOP
AUTOCHECKBOX "Salvea&ză scorul", IDC_OPT_KEEPSCORE, 100, 66, 65, 10, WS_TABSTOP
DEFPUSHBUTTON "Con&firmă", IDOK, 35, 97, 50, 14
PUSHBUTTON "A&nulează", IDCANCEL, 101, 97, 50, 14
END
@@ -55,8 +55,8 @@ END
STRINGTABLE
BEGIN
IDS_SOL_NAME "Pasiență"
IDS_SOL_ABOUT "Pasiență de J Brown; Tradus de Petru Dimitriu\nCardLib versiunea 1.0"
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire de J Brown; Tradus de Petru Dimitriu\nCardLib versiunea 1.0"
IDS_SOL_QUIT "Abandonați jocul curent?"
IDS_SOL_WIN "Felicitări, ați câștigat!"
IDS_SOL_DEAL "O nouă rundă?"

View File

@@ -1,4 +1,10 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: Spider Solitaire
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -41,8 +47,8 @@ END
STRINGTABLE
BEGIN
IDS_SPI_NAME "Pasiență-păianjen"
IDS_SPI_ABOUT "Pasiență-păianjen de Gregor Schneider\nCardLib versiune 1.0"
IDS_SPI_NAME "Spider Solitaire"
IDS_SPI_ABOUT "Spider Solitaire de Gregor Schneider\nCardLib versiune 1.0"
IDS_SPI_QUIT "Abandonați jocul curent?"
IDS_SPI_WIN "Felicitări, ați câștigat!"
IDS_SPI_DEAL "O nouă rundă?"

View File

@@ -1,10 +1,16 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS WineMine
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_APPNAME "Genist"
IDS_APPNAME "WineMine"
IDS_NOBODY "Nimeni"
IDS_ABOUT "Drept de autor 2000 Joshua Thielen"
END

View File

@@ -15,11 +15,14 @@ WinMain(HINSTANCE hInst,
int ret = -1;
hModule = LoadLibraryA("hhctrl.ocx");
doWinMain = (DOWINMAIN*) GetProcAddress(hModule, "doWinMain");
if (hModule)
{
doWinMain = (DOWINMAIN*)GetProcAddress(hModule, "doWinMain");
if (doWinMain)
ret = doWinMain(hInst, cmdline);
ret = doWinMain(hInst, cmdline);
FreeLibrary(hModule);
FreeLibrary(hModule);
}
return ret;
}

View File

@@ -26,7 +26,12 @@ HKCR,"CLSID\%CLSID_Internet%\DefaultIcon",,0x00020000,"%SystemRoot%\system32\she
HKCR,"CLSID\%CLSID_Internet%\Shell",,,"open"
HKCR,"CLSID\%CLSID_Internet%\Shell\open",,,""
HKCR,"CLSID\%CLSID_Internet%\Shell\open\Command",,,"rundll32.exe url,OpenURL https://google.com"
HKCR,"CLSID\%CLSID_Internet%\ShellFolder",,2,"0x24"
HKCR,"CLSID\%CLSID_Internet%\ShellFolder","",,"@%SystemRoot%\system32\shell32.dll,-512"
HKCR,"CLSID\%CLSID_Internet%\ShellFolder","Attributes",0x10001,0x24
HKCR,"CLSID\%CLSID_Internet%\ShellFolder","HideAsDeletePerUser",,""
HKCR,"CLSID\%CLSID_Internet%\ShellFolder","HideFolderVerbs",,""
HKCR,"CLSID\%CLSID_Internet%\ShellFolder","HideOnDesktopPerUser",,""
HKCR,"CLSID\%CLSID_Internet%\ShellFolder","WantsParseDisplayName",,""
HKCR,"CLSID\%CLSID_InternetExplorerManager%\LocalServer32",,,"""%16422%\Internet Explorer\iexplore.exe"" -startmanager"

View File

@@ -145,16 +145,9 @@ static VOID UpdateLayoutList(HKL hKL OPTIONAL)
if (!hKL)
{
if (0 <= (g_nCurrentLayoutNum - 1) && (g_nCurrentLayoutNum - 1) < g_cKLs)
{
hKL = g_ahKLs[g_nCurrentLayoutNum - 1];
}
else
{
HWND hwndTarget = (g_hwndLastActive ? g_hwndLastActive : GetForegroundWindow());
DWORD dwTID = GetWindowThreadProcessId(hwndTarget, NULL);
hKL = GetKeyboardLayout(dwTID);
}
HWND hwndTarget = (g_hwndLastActive ? g_hwndLastActive : GetForegroundWindow());
DWORD dwTID = GetWindowThreadProcessId(hwndTarget, NULL);
hKL = GetKeyboardLayout(dwTID);
}
g_cKLs = GetKeyboardLayoutList(ARRAYSIZE(g_ahKLs), g_ahKLs);
@@ -737,6 +730,8 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
case WM_RBUTTONUP:
case WM_LBUTTONUP:
{
UpdateLayoutList(NULL);
GetCursorPos(&pt);
SetForegroundWindow(hwnd);

View File

@@ -1,6 +1,10 @@
/*
* Translators: Petru Dimitriu (petrimetri at gmail dot com)
* Ștefan Fulea (stefan dot fulea at mail dot com)
* PROJECT: ReactOS Magnifier
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011 Petru Dimitriu <petrimetri@gmail.com>
* Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -35,7 +39,7 @@ END
IDD_DIALOGOPTIONS DIALOGEX 0, 0, 153, 182
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configurare lupă"
CAPTION "Setările lupei"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Î&nchide", IDOK, 96, 161, 50, 14
@@ -44,7 +48,7 @@ BEGIN
COMBOBOX IDC_ZOOM, 72, 6, 63, 66, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Urmărire", IDC_STATIC, 7, 25, 139, 59
GROUPBOX "Prezentare", IDC_STATIC, 7, 87, 139, 57
CONTROL "Urmărește &cursorul șoricelului", IDC_FOLLOWMOUSECHECK, "Button",
CONTROL "Urmărește &cursorul mouse-ului", IDC_FOLLOWMOUSECHECK, "Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 18, 42, 114, 10
CONTROL "Urmărește f&ocalizarea tastaturii", IDC_FOLLOWKEYBOARDCHECK, "Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 18, 54, 114, 10

View File

@@ -28,8 +28,8 @@ BEGIN
BEGIN
MENUITEM "&Nou\tCtrl+N", IDM_FILE_NEW
MENUITEM "&Deschide\tCtrl+O", IDM_FILE_OPEN
MENUITEM "&Păstrează", IDM_FILE_SAVE
MENUITEM "Păst&rare în…", IDM_FILE_SAVEAS
MENUITEM "S&alvează", IDM_FILE_SAVE
MENUITEM "Sal&vează ca…", IDM_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "I&eșire\tAlt+F4", IDM_FILE_EXIT
END

View File

@@ -1,7 +1,9 @@
/*
* FILE: base/applications/mplay32/lang/ro-RO.rc
* ReactOS Project (https://reactos.org)
* TRANSLATOR: Ștefan Fulea (stefan dot fulea at mail dot com)
* PROJECT: ReactOS MPlay32
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -17,14 +19,14 @@ BEGIN
END
POPUP "&Lectură"
BEGIN
MENUITEM "Lecturează/&Pauză\tCtrl+P", IDC_PLAY
MENUITEM "Redare/&Pauză\tCtrl+P", IDC_PLAY
MENUITEM "&Oprește\tCtrl+S", IDC_STOP
MENUITEM SEPARATOR
MENUITEM "&Repetă\tCtrl+T", IDM_REPEAT
END
POPUP "&Afișare"
BEGIN
MENUITEM "&Mod fereastră-solitară", IDM_SWITCHVIEW
MENUITEM "&Mod o singură fereastră", IDM_SWITCHVIEW
END
POPUP "&Dispozitiv"
BEGIN
@@ -53,21 +55,21 @@ BEGIN
IDS_MODE_UNKNOWN "Nespecificat"
IDS_MODE_OPEN "Deschis"
IDS_MODE_STOP "Oprit"
IDS_MODE_PLAY "În lectură"
IDS_MODE_PLAY "În redare"
IDS_MODE_PAUSE "Întrerupt"
IDS_MODE_RECORD "Înregistrare"
IDS_MODE_SEEK "Derulare"
IDS_MODE_NOT_READY "Nepregătit"
IDS_ALL_TYPES_FILTER "Toate admisibile"
IDS_TOOLTIP_PLAY "Redare conținut multimedia"
IDS_TOOLTIP_STOP "Oprire lectură"
IDS_TOOLTIP_STOP "Oprire redare"
IDS_TOOLTIP_EJECT "Scoatere"
IDS_TOOLTIP_BACKWARD "Salt la precedent"
IDS_TOOLTIP_SEEKBACK "Derulare înapoi"
IDS_TOOLTIP_SEEKFORW "Derulare înainte"
IDS_TOOLTIP_FORWARD "Salt la următor"
IDS_TOOLTIP_PAUSE "Întrerupere"
IDS_APPTITLE "Lector multimedia"
IDS_PLAY "Lecturare"
IDS_APPTITLE "Player multimedia"
IDS_PLAY "Redare"
IDS_DEFAULTMCIERRMSG "Nu există descriere pentru această eroare."
END

View File

@@ -1,4 +1,4 @@
/* Translated by: Mateus de Lima (aka wavemaster) <mateusloliveira [@] hotmail.com> */
/* Translated by: Mateus de Lima (wavemaster) <mateusloliveira [@] hotmail.com> */
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN

View File

@@ -1,4 +1,10 @@
/* Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS System Configuration Tool
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -68,8 +74,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Moduri de pornire sistem", -1, 10, 10, 340, 150, 0, WS_EX_TRANSPARENT
CONTROL "Pornire n&ormală - încarcă toate serviciile și modulele-pilot", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 260, 10
CONTROL "Pornire de &diagnostic - încarcă doar modulele-pilot de bază", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 260, 10
CONTROL "Pornire n&ormală - încarcă toate serviciile și driverele", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 260, 10
CONTROL "Pornire de &diagnostic - încarcă doar driverele de bază", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 260, 10
CONTROL "Pornire s&electivă", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 260, 10
AUTOCHECKBOX "&Procesează fișierul SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 260, 10
AUTOCHECKBOX "Încarcă se&rviciile de sistem", IDC_CBX_SYSTEM_SERVICE, 30, 95, 260, 10

View File

@@ -8,19 +8,19 @@
<MSCONFIGTOOLS>
<TOOL _locID="About ReactOS" NAME="Despre ReactOS" PATH="%windir%\system32\winver.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Afișare informații de versiune a ReactOS."/>
<TOOL _locID="Action Center" NAME="Centru de acțiune" PATH="%windir%\System32\wscui.cpl" DEFAULT_OPT="" ADV_OPT="" HELP="Deschidere Centru de acțiune."/>
<TOOL _locID="Computer Management" NAME="Gestiune calculator" PATH="%windir%\System32\compmgmt.msc" DEFAULT_OPT="" ADV_OPT="" HELP="Inspectare și configurare sistem și componente."/>
<TOOL _locID="System Information" NAME="Informații de sistem" PATH="%windir%\System32\msinfo32.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Inspectare informații avansate despre configurația fizică și de program."/>
<TOOL _locID="Event Viewer" NAME="Observator de evenimente" PATH="%windir%\System32\eventvwr.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Monitorizarea și depanarea mesajelor."/>
<TOOL _locID="Computer Management" NAME="Gestiune calculator" PATH="%windir%\System32\compmgmt.msc" DEFAULT_OPT="" ADV_OPT="" HELP="Vizualizează și configurează setările de sistem și componentele."/>
<TOOL _locID="System Information" NAME="Informații de sistem" PATH="%windir%\System32\msinfo32.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Vizualizează informații avansate despre setările hardware și software."/>
<TOOL _locID="Event Viewer" NAME="Observator de evenimente" PATH="%windir%\System32\eventvwr.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Vizualizează monitorizarea și depanarea mesajelor."/>
<TOOL _locID="Programs" NAME="Programe" PATH="%windir%\System32\appwiz.cpl" DEFAULT_OPT="" ADV_OPT="" HELP="Lansare, adăugare sau eliminare de programe și componente ReactOS."/>
<TOOL _locID="System Properties" NAME="Proprietăți de sistem" PATH="%windir%\System32\control.exe" DEFAULT_OPT="system" ADV_OPT="" HELP="Afișare informații de bază despre configurația de sistem al calculatorului."/>
<TOOL _locID="Internet Options" NAME="Opțiuni de Internet" PATH="%windir%\System32\inetcpl.cpl" DEFAULT_OPT="" ADV_OPT="" HELP="Afișare opțiune de Internet."/>
<TOOL _locID="Internet Protocol Configuration" NAME="Configurație protocol de Internet" PATH="%windir%\System32\cmd.exe" DEFAULT_OPT="/k %windir%\system32\ipconfig.exe" ADV_OPT="/k %windir%\system32\ipconfig.exe /all" HELP="Afișare și configurare proprietăți ale adresei de rețea."/>
<TOOL _locID="Performance Monitor" NAME="Monitor de performanță" PATH="%windir%\System32\perfmon.exe" DEFAULT_OPT="" ADV_OPT="/sys" HELP="Monitorizare performanță pentru calculatoare locale sau la distanță."/>
<TOOL _locID="Resource Monitor" NAME="Monitor de resurse" PATH="%windir%\System32\resmon.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Monitorizare utilizare de resurse pentru calculatoare locale."/>
<TOOL _locID="Task Manager" NAME="Gestionar de activități" PATH="%windir%\System32\taskmgr.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Gestiune programelor și proceselor din calculatorul dumneavoastră."/>
<TOOL _locID="System Properties" NAME="Proprietăți de sistem" PATH="%windir%\System32\control.exe" DEFAULT_OPT="system" ADV_OPT="" HELP="Vizualizează informații de bază despre configurația de sistem al calculatorului dvs."/>
<TOOL _locID="Internet Options" NAME="Opțiuni de Internet" PATH="%windir%\System32\inetcpl.cpl" DEFAULT_OPT="" ADV_OPT="" HELP="Vizualizează opțiunile de Internet."/>
<TOOL _locID="Internet Protocol Configuration" NAME="Configurație protocol de Internet" PATH="%windir%\System32\cmd.exe" DEFAULT_OPT="/k %windir%\system32\ipconfig.exe" ADV_OPT="/k %windir%\system32\ipconfig.exe /all" HELP="Vizualizează și configurează setările adresei de rețea."/>
<TOOL _locID="Performance Monitor" NAME="Monitor de performanță" PATH="%windir%\System32\perfmon.exe" DEFAULT_OPT="" ADV_OPT="/sys" HELP="Monitorizarea performanței pentru calculatoare locale sau la distanță."/>
<TOOL _locID="Resource Monitor" NAME="Monitor de resurse" PATH="%windir%\System32\resmon.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Monitorizarea utilizării de resurse pentru calculatoare locale."/>
<TOOL _locID="Task Manager" NAME="Gestionar de activități" PATH="%windir%\System32\taskmgr.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Gestioanarea programelor și proceselor din calculatorul dumneavoastră."/>
<TOOL _locID="Command Prompt" NAME="Linie de comandă" PATH="%windir%\System32\cmd.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Lansare linie de comandă."/>
<TOOL _locID="Registry Editor" NAME="Editor de registru" PATH="%windir%\System32\regedt32.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Efectuare schimbări în registrul ReactOS."/>
<TOOL _locID="Remote Assistance" NAME="Asistență la distanță" PATH="%windir%\System32\msra.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Obținere (sau oferire) asistență prin Internet de la (sau către) un prieten."/>
<TOOL _locID="Registry Editor" NAME="Editor de registru" PATH="%windir%\System32\regedt32.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Efectuarea schimbărilor în registrul ReactOS."/>
<TOOL _locID="Remote Assistance" NAME="Asistență la distanță" PATH="%windir%\System32\msra.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Obținere (sau oferire) de asistență prin Internet de la (sau către) un prieten."/>
<TOOL _locID="System Restore" NAME="Restaurare sistem" PATH="%windir%\System32\rstrui.exe" DEFAULT_OPT="" ADV_OPT="" HELP="Restaurare a sistemului de operare la o stare anterioară."/>
</MSCONFIGTOOLS>

View File

@@ -1,4 +1,4 @@
/* Translated by: Mateus de Lima (aka wavemaster) <mateusloliveira [@] hotmail.com> */
/* Translated by: Mateus de Lima (wavemaster) <mateusloliveira [@] hotmail.com> */
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL

View File

@@ -1,4 +1,10 @@
/* Ștefan Fulea (stefan dot fulea at mail dot com) */
/*
* PROJECT: ReactOS System Configuration Tool
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -10,7 +16,7 @@ BEGIN
ICON IDI_APPICON, IDC_STATIC, 14, 14, 20, 20
LTEXT "Program de configurare al sistemului\nVersiune 1.0", IDC_STATIC, 42, 14, 182, 17, SS_NOPREFIX
// "Copyright (C) ReactOS Team 2005-"COPYRIGHT_YEAR"\n"
LTEXT "Drept de autor (C) Echipa ReactOS 2005-2015\n\
LTEXT "Drept de autor (C) Echipa ReactOS 2005-2023\n\
Christoph von Wittich (Christoph@ApiViewer.de)\n\
Gregor Schneider (Gregor.Schneider@reactos.org)\n\
Hermès BÉLUSCA - MAÏTO (hermes.belusca@sfr.fr)",
@@ -34,8 +40,8 @@ BEGIN
PUSHBUTTON "Lansează &Restaurare sistem", IDC_BTN_SYSTEM_RESTORE_START, 146, 156, 124, 14
PUSHBUTTON "E&xtindere fișier…", IDC_BTN_FILE_EXTRACTION, 275, 156, 85, 14
GROUPBOX "Moduri de pornire sistem", IDC_STATIC, 5, 5, 356, 145
LTEXT "Încarcă toate serviciile și modulele-pilot", IDC_STATIC, 25, 30, 322, 10
LTEXT "Încarcă doar modulele-pilot de bază", IDC_STATIC, 25, 58, 322, 10
LTEXT "Încarcă toate serviciile și driverele", IDC_STATIC, 25, 30, 322, 10
LTEXT "Încarcă doar driverele de bază", IDC_STATIC, 25, 58, 322, 10
END
IDD_SYSTEM_PAGE DIALOGEX 0, 0, 366, 175
@@ -82,7 +88,7 @@ BEGIN
LTEXT "&Limită de timp:", IDC_STATIC, 296, 91, 32, 10
EDITTEXT IDC_TXT_BOOT_TIMEOUT, 295, 102, 33, 12, ES_RIGHT | ES_NUMBER
LTEXT "secunde", IDC_STATIC, 330, 104, 31, 10
CONTROL "&Permanenizează configurația de inițializare", 292,
CONTROL "Fă toate s&etările de inițializare permanente", 292,
"Button", BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP, 295, 121, 66, 49
PUSHBUTTON "Șt&erge", IDC_BTN_DELETE, 295, 68, 66, 14
END

View File

@@ -3,6 +3,7 @@
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Japanese resource file
* TRANSLATORS: Copyright 2009 Tomoya Kitagawa <jptomoya@yahoo.co.jp>
* Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
@@ -11,31 +12,31 @@ IDM_EVENTVWR MENU
BEGIN
POPUP "ログ(&L)"
BEGIN
MENUITEM "Open...(&O)", IDM_OPEN_EVENTLOG
MENUITEM "Save Event Log as...(&E)", IDM_SAVE_EVENTLOG
MENUITEM "&Close", IDM_CLOSE_EVENTLOG
MENUITEM "開く(&O)...", IDM_OPEN_EVENTLOG
MENUITEM "イベントログに名前を付けて保存(&E)...", IDM_SAVE_EVENTLOG
MENUITEM "閉じる(&C)", IDM_CLOSE_EVENTLOG
MENUITEM SEPARATOR
MENUITEM "Clear all Events (&L)", IDM_CLEAR_EVENTS
MENUITEM "&Rename\tF2", IDM_RENAME_EVENTLOG
MENUITEM "Log Settings...(&T)", IDM_EVENTLOG_SETTINGS
MENUITEM "すべてのイベントをクリア(&L)", IDM_CLEAR_EVENTS
MENUITEM "名前の変更(&R)\tF2", IDM_RENAME_EVENTLOG
MENUITEM "ログ設定(&T)...", IDM_EVENTLOG_SETTINGS
MENUITEM SEPARATOR
MENUITEM "終了(&X)", IDM_EXIT
END
POPUP "表示(&V)"
BEGIN
MENUITEM "Newest first (&N)", IDM_LIST_NEWEST
MENUITEM "Oldest first (&O)", IDM_LIST_OLDEST
MENUITEM "新しい順(&N)", IDM_LIST_NEWEST
MENUITEM "古い順(&O)", IDM_LIST_OLDEST
MENUITEM SEPARATOR
MENUITEM "Details... (&D)\tEnter", IDM_EVENT_DETAILS
MENUITEM "詳細(&D)...\tEnter", IDM_EVENT_DETAILS
MENUITEM SEPARATOR
MENUITEM "更新(&R)\tF5", IDM_REFRESH
END
POPUP "オプション(&O)"
BEGIN
MENUITEM "Event details &view", IDM_EVENT_DETAILS_VIEW
MENUITEM "&Grid lines", IDM_LIST_GRID_LINES
MENUITEM "イベントの詳細表示(&V)", IDM_EVENT_DETAILS_VIEW
MENUITEM "グリッド線(&G)", IDM_LIST_GRID_LINES
MENUITEM SEPARATOR
MENUITEM "&Save settings on exit", IDM_SAVE_SETTINGS
MENUITEM "終了時に設定を保存(&S)", IDM_SAVE_SETTINGS
END
POPUP "ヘルプ(&H)"
BEGIN
@@ -49,12 +50,12 @@ IDM_EVENTWR_CTX MENU
BEGIN
POPUP ""
BEGIN
MENUITEM "&Open Event Log...", IDM_OPEN_EVENTLOG
MENUITEM "&Save Event Log as...", IDM_SAVE_EVENTLOG
MENUITEM "イベントログを開く(&O)...", IDM_OPEN_EVENTLOG
MENUITEM "イベントログに名前を付けて保存(&S)...", IDM_SAVE_EVENTLOG
MENUITEM SEPARATOR
MENUITEM "&Clear all Events", IDM_CLEAR_EVENTS
MENUITEM "&Rename\tF2", IDM_RENAME_EVENTLOG
MENUITEM "Log Se&ttings...", IDM_EVENTLOG_SETTINGS
MENUITEM "すべてのイベントをクリア(&C)", IDM_CLEAR_EVENTS
MENUITEM "名前の変更(&R)\tF2", IDM_RENAME_EVENTLOG
MENUITEM "ログ設定(&T)...", IDM_EVENTLOG_SETTINGS
END
END
@@ -113,40 +114,40 @@ END
IDD_LOGPROPERTIES_GENERAL DIALOGEX 0, 0, 252, 234
STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION
CAPTION "General"
CAPTION "一般設定"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Display name:", IDC_STATIC, 7, 9, 60, 8
LTEXT "表示名(&D):", IDC_STATIC, 7, 9, 60, 8
EDITTEXT IDC_DISPLAYNAME, 67, 7, 178, 12, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
LTEXT "&Log name:", IDC_STATIC, 7, 25, 60, 8
LTEXT "ログ名(&L):", IDC_STATIC, 7, 25, 60, 8
EDITTEXT IDC_LOGNAME, 67, 23, 178, 12, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
LTEXT "Log &file:", IDC_STATIC, 7, 41, 60, 8
LTEXT "ログファイル(&F):", IDC_STATIC, 7, 41, 60, 8
EDITTEXT IDC_LOGFILE, 67, 39, 178, 12, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
LTEXT "Size:", IDC_STATIC, 7, 57, 60, 8
LTEXT "サイズ(&S):", IDC_STATIC, 7, 57, 60, 8
EDITTEXT IDC_SIZE_LABEL, 67, 57, 178, 12, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
LTEXT "Created:", IDC_STATIC, 7, 69, 60, 8
LTEXT "作成日時(&C):", IDC_STATIC, 7, 69, 60, 8
EDITTEXT IDC_CREATED_LABEL, 67, 69, 178, 12, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
LTEXT "Modified:", IDC_STATIC, 7, 81, 60, 8
LTEXT "変更日時(&M):", IDC_STATIC, 7, 81, 60, 8
EDITTEXT IDC_MODIFIED_LABEL, 67, 81, 178, 12, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
LTEXT "Accessed:", IDC_STATIC, 7, 93, 60, 8
LTEXT "アクセス日時(&A):", IDC_STATIC, 7, 93, 60, 8
EDITTEXT IDC_ACCESSED_LABEL, 67, 93, 178, 12, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Log size", IDC_STATIC, 7, 106, 238, 99
LTEXT "&Maximum log size:", IDC_STATIC, 17, 122, 58, 8
GROUPBOX "ログサイズ", IDC_STATIC, 7, 106, 238, 99
LTEXT "最大ログサイズ(&M):", IDC_STATIC, 17, 122, 58, 8
EDITTEXT IDC_EDIT_MAXLOGSIZE, 80, 119, 40, 14, ES_LEFT | ES_NUMBER | WS_GROUP
CONTROL "", IDC_UPDOWN_MAXLOGSIZE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT |
UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 120, 119, 10, 14
LTEXT "KB", IDC_STATIC, 130, 122, 20, 8
LTEXT "When maximum log size is reached:", IDC_STATIC, 17, 140, 219, 8
CONTROL "&Overwrite events as needed", IDC_OVERWRITE_AS_NEEDED, "Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 17, 155, 219, 10
CONTROL "O&verwrite events older than", IDC_OVERWRITE_OLDER_THAN, "Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 17, 168, 102, 10
LTEXT "最大ログサイズに達したとき:", IDC_STATIC, 17, 140, 219, 8
CONTROL "必要に応じてイベントを上書きする(&O)", IDC_OVERWRITE_AS_NEEDED, "Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 17, 155, 219, 10
CONTROL "次のものより古いイベントを上書き(&V)", IDC_OVERWRITE_OLDER_THAN, "Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 17, 168, 102, 10
EDITTEXT IDC_EDIT_EVENTS_AGE, 122, 165, 35, 14, ES_LEFT | ES_NUMBER | WS_GROUP
CONTROL "", IDC_UPDOWN_EVENTS_AGE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT |
UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 157, 165, 10, 14
LTEXT "days", IDC_STATIC, 162, 168, 20, 8
CONTROL "Do &not overwrite events\n(clear log manually)", IDC_NO_OVERWRITE, "Button", BS_AUTORADIOBUTTON | BS_MULTILINE | WS_GROUP | WS_TABSTOP, 17, 180, 143, 20
PUSHBUTTON "&Restore Defaults", IDC_RESTOREDEFAULTS, 166, 183, 70, 14
AUTOCHECKBOX "Using a lo&w-speed connection", IDC_LOW_SPEED_CONNECTION, 7, 217, 167, 10
PUSHBUTTON "&Clear Log", ID_CLEARLOG, 195, 213, 50, 14
LTEXT "", IDC_STATIC, 162, 168, 20, 8
CONTROL "イベントを上書きしない(&N)\n(手動でログをクリアする)", IDC_NO_OVERWRITE, "Button", BS_AUTORADIOBUTTON | BS_MULTILINE | WS_GROUP | WS_TABSTOP, 17, 180, 143, 20
PUSHBUTTON "デフォルトに戻す(&R)", IDC_RESTOREDEFAULTS, 166, 183, 70, 14
AUTOCHECKBOX "低速の接続を使用する(&W)", IDC_LOW_SPEED_CONNECTION, 7, 217, 167, 10
PUSHBUTTON "ログをクリア(&C)", ID_CLEARLOG, 195, 213, 50, 14
END
STRINGTABLE
@@ -154,35 +155,35 @@ BEGIN
IDS_COPYRIGHT "Copyright (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)"
IDS_APP_TITLE "イベント ビューア"
IDS_APP_TITLE_EX "%s - %s Log on \\\\"
IDS_STATUS_MSG "%s has %lu event(s) (listed: %lu)"
IDS_LOADING_WAIT "イベント ログを読み込んでいます。 お待ちください..."
IDS_NO_ITEMS "There are no items to show in this view." // "No events in this log."
IDS_EVENTLOG_SYSTEM "System Logs"
IDS_EVENTLOG_APP "Application Logs"
IDS_EVENTLOG_USER "User Logs"
IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "イベント ID (%lu) (ソース %s 内) に関する説明が見つかりませんでした。 リモート コンピュータからメッセージを表示するために必要なレジストリ情報またはメッセージ DLL ファイルがローカル コンピュータにない可能性があります。\n\nThe following information is part of the event:\n\n"
IDS_STATUS_MSG "%s には %lu 個のイベントがあります (総数: %lu)"
IDS_LOADING_WAIT "イベント ログを読み込んでいます。お待ちください..."
IDS_NO_ITEMS "このビューで表示する項目がありません。" // "No events in this log."
IDS_EVENTLOG_SYSTEM "システム ログ"
IDS_EVENTLOG_APP "アプリ ログ"
IDS_EVENTLOG_USER "ユーザー ログ"
IDS_SAVE_FILTER "イベントログ (*.evt)\0*.evt\0"
IDS_CLEAREVENTS_MSG "このイベントをクリアする前に保存したいですか?"
IDS_RESTOREDEFAULTS "すべての設定をデフォルトに戻しますか?"
IDS_EVENTSTRINGIDNOTFOUND "イベント ID (%lu) (ソース %s 内) に関する説明が見つかりませんでした。 リモート コンピュータからメッセージを表示するために必要なレジストリ情報またはメッセージ DLL ファイルがローカル コンピュータにない可能性があります。\n\n次の情報はイベントの一部です:\n\n"
END
STRINGTABLE
BEGIN
/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */
IDS_USAGE "ReactOS Event Viewer\n\
IDS_USAGE "ReactOS イベント ビュア\n\
\n\
EventVwr [computer name] [/L:<event log file>] [/?]\n\
EventVwr [コンピューター名] [/L:<イベント ログ ファイル>] [/?]\n\
\n\
""computer name"" : Specifies the remote computer where to connect\n\
\tto retrieve the events to display. If no name is specified, the\n\
\tlocal computer is used.\n\
""コンピューター名"" : 表示するイベントを取得するために接続する\n\
\tリモートコンピューターを指定します。名前が未指定の場合は\n\
\tローカル コンピューターが使われます。\n\
\n\
/L:<event log file> : Specifies which event log file to open.\n\
\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\
/L:<イベント ログ ファイル> : 開きたいイベント ログ ファイルを指定\n\
\tします。.evt 形式≦NT 5.2)のファイルのみをサポートしています。\n\
\n\
/? : Displays this help message.\n\
/? : このヘルプメッセージを表示します。\n\
"
IDS_EVENTLOGFILE "Event Log File"
IDS_EVENTLOGFILE "イベント ログ ファイル"
END
STRINGTABLE
@@ -198,37 +199,37 @@ END
STRINGTABLE
BEGIN
IDS_BYTES_FORMAT "bytes" // "%s bytes"
IDS_BYTES_FORMAT "バイト" // "%s bytes"
// "%1!ls! (%2!ls! bytes)"
END
STRINGTABLE
BEGIN
IDS_COLUMNTYPE "Type"
IDS_COLUMNDATE "Date"
IDS_COLUMNTIME "Time"
IDS_COLUMNSOURCE "Source"
IDS_COLUMNCATEGORY "Category"
IDS_COLUMNEVENT "Event"
IDS_COLUMNUSER "User"
IDS_COLUMNCOMPUTER "Computer"
IDS_COLUMNTYPE "タイプ"
IDS_COLUMNDATE "日付"
IDS_COLUMNTIME "時間"
IDS_COLUMNSOURCE "ソース"
IDS_COLUMNCATEGORY "カテゴリ"
IDS_COLUMNEVENT "イベント"
IDS_COLUMNUSER "ユーザー"
IDS_COLUMNCOMPUTER "コンピューター"
END
STRINGTABLE
BEGIN
IDS_COPY "Event Type: %s\r\n\
Event Source: %s\r\n\
Event Category: %s\r\n\
Event ID: %s\r\n\
Date: %s\r\n\
Time: %s\r\n\
User: %s\r\n\
Computer: %s\r\n\
Description:\r\n%s"
IDS_COPY "イベントの種類: %s\r\n\
イベントのソース: %s\r\n\
イベントのカテゴリ: %s\r\n\
イベント ID: %s\r\n\
日付: %s\r\n\
時刻: %s\r\n\
ユーザー: %s\r\n\
コンピューター: %s\r\n\
説明:\r\n%s"
END
STRINGTABLE
BEGIN
IDS_NONE "None"
IDS_NOT_AVAILABLE "N/A"
IDS_NONE "なし"
IDS_NOT_AVAILABLE "利用不可"
END

View File

@@ -4,6 +4,7 @@
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2009 Petru Dimitriu <petrimetri@gmail.com>
* Copyright 2011-2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -13,12 +14,12 @@ BEGIN
POPUP "&Jurnal"
BEGIN
MENUITEM "&Deschidere…", IDM_OPEN_EVENTLOG
MENUITEM "&Păstrare jurnal de evenimente ca…", IDM_SAVE_EVENTLOG
MENUITEM "&Salvează jurnal de evenimente ca…", IDM_SAVE_EVENTLOG
MENUITEM "Î&nchide", IDM_CLOSE_EVENTLOG
MENUITEM SEPARATOR
MENUITEM "Înlăt&ură toate evenimentele", IDM_CLEAR_EVENTS
MENUITEM "&Redenumire\tF2", IDM_RENAME_EVENTLOG
MENUITEM "&Configurare jurnal…", IDM_EVENTLOG_SETTINGS
MENUITEM "&Setări pentru jurnal…", IDM_EVENTLOG_SETTINGS
MENUITEM SEPARATOR
MENUITEM "I&eșire", IDM_EXIT
END
@@ -36,7 +37,7 @@ BEGIN
MENUITEM "Afișează detalii de e&venimente", IDM_EVENT_DETAILS_VIEW
MENUITEM "Afișează linii de g&rilaj", IDM_LIST_GRID_LINES
MENUITEM SEPARATOR
MENUITEM "&Păstrează configurația la ieșire", IDM_SAVE_SETTINGS
MENUITEM "&Salvează setările la ieșire", IDM_SAVE_SETTINGS
END
POPUP "Aj&utor"
BEGIN
@@ -50,12 +51,12 @@ IDM_EVENTWR_CTX MENU
BEGIN
POPUP ""
BEGIN
MENUITEM "&Open Event Log...", IDM_OPEN_EVENTLOG
MENUITEM "&Save Event Log as...", IDM_SAVE_EVENTLOG
MENUITEM "&Deschide jurnalul de evenimente...", IDM_OPEN_EVENTLOG
MENUITEM "Salv&ează jurnalul de evenimente ca...", IDM_SAVE_EVENTLOG
MENUITEM SEPARATOR
MENUITEM "&Clear all Events", IDM_CLEAR_EVENTS
MENUITEM "&Rename\tF2", IDM_RENAME_EVENTLOG
MENUITEM "Log Se&ttings...", IDM_EVENTLOG_SETTINGS
MENUITEM "Șter&ge toate evenimentele", IDM_CLEAR_EVENTS
MENUITEM "&Redenumește\tF2", IDM_RENAME_EVENTLOG
MENUITEM "Setări de &jurnal...", IDM_EVENTLOG_SETTINGS
END
END
@@ -129,7 +130,7 @@ BEGIN
EDITTEXT IDC_CREATED_LABEL, 67, 69, 178, 12, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
LTEXT "Modificat:", IDC_STATIC, 7, 81, 60, 8
EDITTEXT IDC_MODIFIED_LABEL, 67, 81, 178, 12, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
LTEXT "Accessat:", IDC_STATIC, 7, 93, 60, 8
LTEXT "Accesat:", IDC_STATIC, 7, 93, 60, 8
EDITTEXT IDC_ACCESSED_LABEL, 67, 93, 178, 12, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Dimensiune jurnal", IDC_STATIC, 7, 106, 238, 99
LTEXT "Dimensiune ma&ximă pentru jurnal:", IDC_STATIC, 17, 122, 58, 8
@@ -162,8 +163,8 @@ BEGIN
IDS_EVENTLOG_APP "Jurnale de aplicație"
IDS_EVENTLOG_USER "Jurnale de utilizator"
IDS_SAVE_FILTER "Jurnal de evenimente (*.evt)\0*.evt\0"
IDS_CLEAREVENTS_MSG "Doriți păstrarea acestui jurnal de evenimente înainte de a-l închide?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_CLEAREVENTS_MSG "Doriți să salvați acest jurnal de evenimente înainte de a-l închide?"
IDS_RESTOREDEFAULTS "Doriți să restaurați toate setările pentru acest jurnal la valorile lor implicite?"
IDS_EVENTSTRINGIDNOTFOUND "Descrierea evenimentului cu ID-ul ( %lu ) în sursa ( %s ) nu a fost găsită. Este posibil ca în calculatorul local să nu existe informațiile de registru necesare sau fișierele dll de mesaje să afișeze mesaje de la un calculator din rețea.\n\nInformații aferente evenimentului:\n\n"
END

View File

@@ -1,6 +1,10 @@
/*
* Translators: Petru Dimitriu (petrimetri at gmail dot com)
* Ștefan Fulea (stefan dot fulea at mail dot com)
* PROJECT: ReactOS Service Manager
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011 Petru Dimitriu <petrimetri@gmail.com>
* Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -108,7 +112,7 @@ BEGIN
LTEXT "Autentificat ca:", IDC_STATIC, 7, 7, 238, 8
AUTORADIOBUTTON "&Cont de sistem local", IDC_LOGON_SYSTEMACCOUNT, 7, 22, 238, 10, BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "Acest c&ont:", IDC_LOGON_THISACCOUNT, 7, 52, 60, 10, BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE
AUTOCHECKBOX "Per&mite serviciului să interacționeze cu aplicațiile de birou", IDC_LOGON_INTERACTIVE, 18, 34, 227, 10, WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP | BS_TOP | BS_MULTILINE
AUTOCHECKBOX "Per&mite serviciului să interacționeze cu aplicațiile de desktop", IDC_LOGON_INTERACTIVE, 18, 34, 227, 10, WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP | BS_TOP | BS_MULTILINE
EDITTEXT IDC_LOGON_ACCOUNTNAME, 72, 50, 103, 14, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Spe&cificare…", IDC_LOGON_SEARCH, 185, 50, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
LTEXT "&Parolă:", IDC_LOGON_PW1TEXT, 18, 71, 33, 8, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP
@@ -133,7 +137,7 @@ BEGIN
COMBOBOX IDC_SECOND_FAILURE, 104, 39, 141, 147, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST
LTEXT "Alt&e căderi:", IDC_STATIC, 7, 58, 92, 8
COMBOBOX IDC_SUBSEQUENT_FAILURES, 104, 56, 141, 147, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST
LTEXT "&Ropornire contor după:", IDC_STATIC, 7, 75, 72, 8
LTEXT "&Repornire contor după:", IDC_STATIC, 7, 75, 72, 8
EDITTEXT IDC_RESET_TIME, 104, 73, 40, 13, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER
LTEXT "zile", IDC_STATIC, 150, 75, 95, 8
LTEXT "Repornire ser&viciu după:", IDC_RESTART_TEXT1, 7, 92, 92, 8
@@ -332,7 +336,7 @@ BEGIN
IDS_NO_ACTION "Nici o acțiune"
IDS_RESTART_SERVICE "Repornește serviciul"
IDS_RUN_PROGRAM "Execută un program"
IDS_RESTART_COMPUTER "Ropornește calculatorul"
IDS_RESTART_COMPUTER "Repornește calculatorul"
END
STRINGTABLE

View File

@@ -25,10 +25,9 @@ list(APPEND SOURCE
toolbox.cpp
toolsettings.cpp
toolsmodel.cpp
winproc.cpp
precomp.h)
file(GLOB mspaint_rc_deps icons/*.*)
file(GLOB mspaint_rc_deps img/*.*)
add_rc_deps(rsrc.rc ${mspaint_rc_deps})
add_executable(mspaint ${SOURCE} rsrc.rc)
set_module_type(mspaint win32gui UNICODE)

View File

@@ -69,7 +69,7 @@ public:
return TRUE;
}
HRESULT LoadDx(LPCTSTR pszFileName, float *pxDpi, float *pyDpi) throw()
HRESULT LoadDx(LPCWSTR pszFileName, float *pxDpi, float *pyDpi) throw()
{
using namespace Gdiplus;
@@ -111,7 +111,7 @@ public:
return (status == Ok ? S_OK : E_FAIL);
}
HRESULT SaveDx(LPCTSTR pszFileName, REFGUID guidFileType = GUID_NULL,
HRESULT SaveDx(LPCWSTR pszFileName, REFGUID guidFileType = GUID_NULL,
float xDpi = 0, float yDpi = 0) throw()
{
using namespace Gdiplus;
@@ -141,7 +141,7 @@ public:
CLSID clsid;
if (::IsEqualGUID(guidFileType, GUID_NULL))
{
CString strExt(PathFindExtension(pszFileName));
CStringW strExt(PathFindExtensionW(pszFileName));
clsid = FindCodecForExtension(strExt, pEncoders, cEncoders);
}
else
@@ -300,23 +300,23 @@ protected:
// CImage::FindCodecForExtension is private. We have to duplicate it at here...
static CLSID
FindCodecForExtension(LPCTSTR dotext, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
FindCodecForExtension(LPCWSTR dotext, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
{
for (UINT i = 0; i < nCodecs; ++i)
{
CString strSpecs(pCodecs[i].FilenameExtension);
CStringW strSpecs(pCodecs[i].FilenameExtension);
int ichOld = 0, ichSep;
for (;;)
{
ichSep = strSpecs.Find(TEXT(';'), ichOld);
ichSep = strSpecs.Find(L';', ichOld);
CString strSpec;
CStringW strSpec;
if (ichSep < 0)
strSpec = strSpecs.Mid(ichOld);
else
strSpec = strSpecs.Mid(ichOld, ichSep - ichOld);
int ichDot = strSpec.ReverseFind(TEXT('.'));
int ichDot = strSpec.ReverseFind(L'.');
if (ichDot >= 0)
strSpec = strSpec.Mid(ichDot);

View File

@@ -13,12 +13,11 @@ CCanvasWindow canvasWindow;
CCanvasWindow::CCanvasWindow()
: m_drawing(FALSE)
, m_hitSelection(HIT_NONE)
, m_hitCanvasSizeBox(HIT_NONE)
, m_ptOrig { -1, -1 }
{
m_ahbmCached[0] = m_ahbmCached[1] = NULL;
::SetRectEmpty(&m_rcResizing);
m_rcResizing.SetRectEmpty();
}
CCanvasWindow::~CCanvasWindow()
@@ -29,68 +28,44 @@ CCanvasWindow::~CCanvasWindow()
::DeleteObject(m_ahbmCached[1]);
}
VOID CCanvasWindow::drawZoomFrame(INT mouseX, INT mouseY)
{
// FIXME: Draw the border of the area that is to be zoomed in
CRect rc;
GetImageRect(rc);
ImageToCanvas(rc);
HDC hdc = GetDC();
DrawXorRect(hdc, &rc);
ReleaseDC(hdc);
}
RECT CCanvasWindow::GetBaseRect()
{
CRect rcBase;
GetImageRect(rcBase);
ImageToCanvas(rcBase);
::InflateRect(&rcBase, GRIP_SIZE, GRIP_SIZE);
rcBase.InflateRect(GRIP_SIZE, GRIP_SIZE);
return rcBase;
}
VOID CCanvasWindow::ImageToCanvas(POINT& pt)
{
pt.x = Zoomed(pt.x);
pt.y = Zoomed(pt.y);
Zoomed(pt);
pt.x += GRIP_SIZE - GetScrollPos(SB_HORZ);
pt.y += GRIP_SIZE - GetScrollPos(SB_VERT);
}
VOID CCanvasWindow::ImageToCanvas(RECT& rc)
{
rc.left = Zoomed(rc.left);
rc.top = Zoomed(rc.top);
rc.right = Zoomed(rc.right);
rc.bottom = Zoomed(rc.bottom);
Zoomed(rc);
::OffsetRect(&rc, GRIP_SIZE - GetScrollPos(SB_HORZ), GRIP_SIZE - GetScrollPos(SB_VERT));
}
VOID CCanvasWindow::CanvasToImage(POINT& pt, BOOL bZoomed)
VOID CCanvasWindow::CanvasToImage(POINT& pt)
{
pt.x -= GRIP_SIZE - GetScrollPos(SB_HORZ);
pt.y -= GRIP_SIZE - GetScrollPos(SB_VERT);
if (bZoomed)
return;
pt.x = UnZoomed(pt.x);
pt.y = UnZoomed(pt.y);
UnZoomed(pt);
}
VOID CCanvasWindow::CanvasToImage(RECT& rc, BOOL bZoomed)
VOID CCanvasWindow::CanvasToImage(RECT& rc)
{
::OffsetRect(&rc, GetScrollPos(SB_HORZ) - GRIP_SIZE, GetScrollPos(SB_VERT) - GRIP_SIZE);
if (bZoomed)
return;
rc.left = UnZoomed(rc.left);
rc.top = UnZoomed(rc.top);
rc.right = UnZoomed(rc.right);
rc.bottom = UnZoomed(rc.bottom);
UnZoomed(rc);
}
VOID CCanvasWindow::GetImageRect(RECT& rc)
{
::SetRect(&rc, 0, 0, imageModel.GetWidth(), imageModel.GetHeight());
rc = { 0, 0, imageModel.GetWidth(), imageModel.GetHeight() };
}
HITTEST CCanvasWindow::CanvasHitTest(POINT pt)
@@ -101,31 +76,88 @@ HITTEST CCanvasWindow::CanvasHitTest(POINT pt)
return getSizeBoxHitTest(pt, &rcBase);
}
VOID CCanvasWindow::getNewZoomRect(CRect& rcView, INT newZoom, CPoint ptTarget)
{
CRect rcImage;
GetImageRect(rcImage);
ImageToCanvas(rcImage);
// Calculate the zoom rectangle
INT oldZoom = toolsModel.GetZoom();
GetClientRect(rcView);
LONG cxView = rcView.right * oldZoom / newZoom, cyView = rcView.bottom * oldZoom / newZoom;
rcView.SetRect(ptTarget.x - cxView / 2, ptTarget.y - cyView / 2,
ptTarget.x + cxView / 2, ptTarget.y + cyView / 2);
// Shift the rectangle if necessary
INT dx = 0, dy = 0;
if (rcView.left < rcImage.left)
dx = rcImage.left - rcView.left;
else if (rcImage.right < rcView.right)
dx = rcImage.right - rcView.right;
if (rcView.top < rcImage.top)
dy = rcImage.top - rcView.top;
else if (rcImage.bottom < rcView.bottom)
dy = rcImage.bottom - rcView.bottom;
rcView.OffsetRect(dx, dy);
rcView.IntersectRect(&rcView, &rcImage);
}
VOID CCanvasWindow::zoomTo(INT newZoom, LONG left, LONG top)
{
POINT pt = { left, top };
CanvasToImage(pt);
toolsModel.SetZoom(newZoom);
ImageToCanvas(pt);
pt.x += GetScrollPos(SB_HORZ);
pt.y += GetScrollPos(SB_VERT);
updateScrollRange();
updateScrollPos(pt.x, pt.y);
Invalidate(TRUE);
}
VOID CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
{
// This is the target area we have to draw on
CRect rcCanvasDraw;
rcCanvasDraw.IntersectRect(&rcClient, &rcPaint);
// We use a memory bitmap to reduce flickering
HDC hdcMem0 = ::CreateCompatibleDC(hDC);
m_ahbmCached[0] = CachedBufferDIB(m_ahbmCached[0], rcClient.right, rcClient.bottom);
HGDIOBJ hbm0Old = ::SelectObject(hdcMem0, m_ahbmCached[0]);
// Fill the background on hdcMem0
::FillRect(hdcMem0, &rcPaint, (HBRUSH)(COLOR_APPWORKSPACE + 1));
::FillRect(hdcMem0, &rcCanvasDraw, (HBRUSH)(COLOR_APPWORKSPACE + 1));
// Draw the sizeboxes if necessary
RECT rcBase = GetBaseRect();
if (!selectionModel.m_bShow && !::IsWindowVisible(textEditWindow))
drawSizeBoxes(hdcMem0, &rcBase, FALSE, &rcPaint);
drawSizeBoxes(hdcMem0, &rcBase, FALSE, &rcCanvasDraw);
// Calculate image size
CRect rcImage;
GetImageRect(rcImage);
SIZE sizeImage = { imageModel.GetWidth(), imageModel.GetHeight() };
// Calculate the target area on the image
CRect rcImageDraw = rcCanvasDraw;
CanvasToImage(rcImageDraw);
rcImageDraw.IntersectRect(&rcImageDraw, &rcImage);
// Consider rounding down by zooming
rcImageDraw.right += 1;
rcImageDraw.bottom += 1;
// hdcMem1 <-- imageModel
HDC hdcMem1 = ::CreateCompatibleDC(hDC);
m_ahbmCached[1] = CachedBufferDIB(m_ahbmCached[1], sizeImage.cx, sizeImage.cy);
HGDIOBJ hbm1Old = ::SelectObject(hdcMem1, m_ahbmCached[1]);
BitBlt(hdcMem1, 0, 0, sizeImage.cx, sizeImage.cy, imageModel.GetDC(), 0, 0, SRCCOPY);
::BitBlt(hdcMem1, rcImageDraw.left, rcImageDraw.top, rcImageDraw.Width(), rcImageDraw.Height(),
imageModel.GetDC(), rcImageDraw.left, rcImageDraw.top, SRCCOPY);
// Draw overlay #1 on hdcMem1
toolsModel.OnDrawOverlayOnImage(hdcMem1);
@@ -166,21 +198,19 @@ VOID CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
toolsModel.OnDrawOverlayOnCanvas(hdcMem0);
// Draw new frame on hdcMem0 if any
if (m_hitCanvasSizeBox != HIT_NONE && !::IsRectEmpty(&m_rcResizing))
if (m_hitCanvasSizeBox != HIT_NONE && !m_rcResizing.IsRectEmpty())
DrawXorRect(hdcMem0, &m_rcResizing);
// Transfer the bits (hDC <-- hdcMem0)
::BitBlt(hDC,
rcPaint.left, rcPaint.top,
rcPaint.right - rcPaint.left, rcPaint.bottom - rcPaint.top,
hdcMem0, rcPaint.left, rcPaint.top, SRCCOPY);
::BitBlt(hDC, rcCanvasDraw.left, rcCanvasDraw.top, rcCanvasDraw.Width(), rcCanvasDraw.Height(),
hdcMem0, rcCanvasDraw.left, rcCanvasDraw.top, SRCCOPY);
// Clean up hdcMem0
::SelectObject(hdcMem0, hbm0Old);
::DeleteDC(hdcMem0);
}
VOID CCanvasWindow::Update(HWND hwndFrom)
VOID CCanvasWindow::updateScrollRange()
{
CRect rcClient;
GetClientRect(&rcClient);
@@ -211,10 +241,16 @@ VOID CCanvasWindow::Update(HWND hwndFrom)
SetScrollInfo(SB_VERT, &si);
}
VOID CCanvasWindow::updateScrollPos(INT x, INT y)
{
SetScrollPos(SB_HORZ, x);
SetScrollPos(SB_VERT, y);
}
LRESULT CCanvasWindow::OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (m_hWnd)
Update(m_hWnd);
updateScrollRange();
return 0;
}
@@ -229,7 +265,7 @@ VOID CCanvasWindow::OnHVScroll(WPARAM wParam, INT fnBar)
{
case SB_THUMBTRACK:
case SB_THUMBPOSITION:
si.nPos = HIWORD(wParam);
si.nPos = (SHORT)HIWORD(wParam);
break;
case SB_LINELEFT:
si.nPos -= 5;
@@ -244,9 +280,9 @@ VOID CCanvasWindow::OnHVScroll(WPARAM wParam, INT fnBar)
si.nPos += si.nPage;
break;
}
si.nPos = max(min(si.nPos, si.nMax), si.nMin);
SetScrollInfo(fnBar, &si);
Update(m_hWnd);
Invalidate(FALSE); // FIXME: Flicker
Invalidate();
}
LRESULT CCanvasWindow::OnHScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
@@ -261,32 +297,29 @@ LRESULT CCanvasWindow::OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
return 0;
}
LRESULT CCanvasWindow::OnLRButtonDown(BOOL bLeftButton, UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
LRESULT CCanvasWindow::OnButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
HITTEST hitSelection = SelectionHitTest(pt);
m_nMouseDownMsg = nMsg;
BOOL bLeftButton = (nMsg == WM_LBUTTONDOWN);
if (nMsg == WM_MBUTTONDOWN)
{
m_ptOrig = pt;
SetCapture();
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_HANDDRAG)));
return 0;
}
HITTEST hitSelection = selectionModel.hitTest(pt);
if (hitSelection != HIT_NONE)
{
selectionModel.m_nSelectionBrush = 0; // Selection Brush is OFF
if (bLeftButton)
{
CanvasToImage(pt);
if (::GetKeyState(VK_CONTROL) < 0) // Ctrl+Click is Selection Clone
{
imageModel.SelectionClone();
}
else if (::GetKeyState(VK_SHIFT) < 0) // Shift+Dragging is Selection Brush
{
selectionModel.m_nSelectionBrush = 1; // Selection Brush is ON
}
StartSelectionDrag(hitSelection, pt);
}
else
{
canvasWindow.ClientToScreen(&pt);
mainWindow.TrackPopupMenu(pt, 0);
}
m_drawing = TRUE;
CanvasToImage(pt);
SetCapture();
toolsModel.OnButtonDown(bLeftButton, pt.x, pt.y, FALSE);
Invalidate();
return 0;
}
@@ -297,14 +330,14 @@ LRESULT CCanvasWindow::OnLRButtonDown(BOOL bLeftButton, UINT nMsg, WPARAM wParam
{
case TOOL_BEZIER:
case TOOL_SHAPE:
toolsModel.OnCancelDraw();
canvasWindow.Invalidate();
toolsModel.OnEndDraw(TRUE);
Invalidate();
break;
case TOOL_FREESEL:
case TOOL_RECTSEL:
toolsModel.OnFinishDraw();
canvasWindow.Invalidate();
toolsModel.OnEndDraw(FALSE);
Invalidate();
break;
default:
@@ -315,83 +348,63 @@ LRESULT CCanvasWindow::OnLRButtonDown(BOOL bLeftButton, UINT nMsg, WPARAM wParam
return 0;
}
CanvasToImage(pt, TRUE);
CanvasToImage(pt);
if (hit == HIT_INNER)
{
m_drawing = TRUE;
UnZoomed(pt);
SetCapture();
toolsModel.OnButtonDown(bLeftButton, pt.x, pt.y, FALSE);
Invalidate(FALSE);
Invalidate();
return 0;
}
if (bLeftButton)
{
m_hitCanvasSizeBox = hit;
UnZoomed(pt);
m_ptOrig = pt;
SetCapture();
}
return 0;
}
LRESULT CCanvasWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return OnLRButtonDown(TRUE, nMsg, wParam, lParam, bHandled);
}
LRESULT CCanvasWindow::OnRButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return OnLRButtonDown(FALSE, nMsg, wParam, lParam, bHandled);
}
LRESULT CCanvasWindow::OnLRButtonDblClk(BOOL bLeftButton, UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
LRESULT CCanvasWindow::OnButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
CanvasToImage(pt);
m_drawing = FALSE;
ReleaseCapture();
::ReleaseCapture();
m_nMouseDownMsg = 0;
toolsModel.OnButtonDown(bLeftButton, pt.x, pt.y, TRUE);
toolsModel.OnButtonDown(nMsg == WM_LBUTTONDBLCLK, pt.x, pt.y, TRUE);
toolsModel.resetTool();
Invalidate(FALSE);
Invalidate();
return 0;
}
LRESULT CCanvasWindow::OnLButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return OnLRButtonDblClk(TRUE, nMsg, wParam, lParam, bHandled);
}
LRESULT CCanvasWindow::OnRButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return OnLRButtonDblClk(FALSE, nMsg, wParam, lParam, bHandled);
}
LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
CanvasToImage(pt);
if (m_hitSelection != HIT_NONE)
if (m_nMouseDownMsg == WM_MBUTTONDOWN)
{
SelectionDragging(pt);
INT x = GetScrollPos(SB_HORZ) - (pt.x - m_ptOrig.x);
INT y = GetScrollPos(SB_VERT) - (pt.y - m_ptOrig.y);
SendMessage(WM_HSCROLL, MAKEWPARAM(SB_THUMBPOSITION, x), 0);
SendMessage(WM_VSCROLL, MAKEWPARAM(SB_THUMBPOSITION, y), 0);
m_ptOrig = pt;
return 0;
}
CanvasToImage(pt);
if (toolsModel.GetActiveTool() == TOOL_ZOOM)
Invalidate();
if (!m_drawing || toolsModel.GetActiveTool() <= TOOL_AIRBRUSH)
{
if (toolsModel.GetActiveTool() == TOOL_ZOOM)
{
Invalidate(FALSE);
UpdateWindow();
CanvasToImage(pt);
drawZoomFrame(pt.x, pt.y);
}
TRACKMOUSEEVENT tme = { sizeof(tme) };
tme.dwFlags = TME_LEAVE;
tme.hwndTrack = m_hWnd;
@@ -400,86 +413,19 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
if (!m_drawing)
{
CString strCoord;
strCoord.Format(_T("%ld, %ld"), pt.x, pt.y);
::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
CRect rcImage;
GetImageRect(rcImage);
CStringW strCoord;
if (rcImage.PtInRect(pt))
strCoord.Format(L"%ld, %ld", pt.x, pt.y);
::SendMessageW(g_hStatusBar, SB_SETTEXT, 1, (LPARAM)(LPCWSTR)strCoord);
}
}
if (m_drawing)
if (m_drawing || toolsModel.IsSelection())
{
// values displayed in statusbar
LONG xRel = pt.x - g_ptStart.x;
LONG yRel = pt.y - g_ptStart.y;
switch (toolsModel.GetActiveTool())
{
// freesel, rectsel and text tools always show numbers limited to fit into image area
case TOOL_FREESEL:
case TOOL_RECTSEL:
case TOOL_TEXT:
if (xRel < 0)
xRel = (pt.x < 0) ? -g_ptStart.x : xRel;
else if (pt.x > imageModel.GetWidth())
xRel = imageModel.GetWidth() - g_ptStart.x;
if (yRel < 0)
yRel = (pt.y < 0) ? -g_ptStart.y : yRel;
else if (pt.y > imageModel.GetHeight())
yRel = imageModel.GetHeight() - g_ptStart.y;
break;
// while drawing, update cursor coordinates only for tools 3, 7, 8, 9, 14
case TOOL_RUBBER:
case TOOL_PEN:
case TOOL_BRUSH:
case TOOL_AIRBRUSH:
case TOOL_SHAPE:
{
CString strCoord;
strCoord.Format(_T("%ld, %ld"), pt.x, pt.y);
::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
break;
}
default:
break;
}
// rectsel and shape tools always show non-negative numbers when drawing
if (toolsModel.GetActiveTool() == TOOL_RECTSEL || toolsModel.GetActiveTool() == TOOL_SHAPE)
{
if (xRel < 0)
xRel = -xRel;
if (yRel < 0)
yRel = -yRel;
}
if (wParam & MK_LBUTTON)
{
toolsModel.OnMouseMove(TRUE, pt.x, pt.y);
Invalidate(FALSE);
if ((toolsModel.GetActiveTool() >= TOOL_TEXT) || toolsModel.IsSelection())
{
CString strSize;
if ((toolsModel.GetActiveTool() >= TOOL_LINE) && (GetAsyncKeyState(VK_SHIFT) < 0))
yRel = xRel;
strSize.Format(_T("%ld x %ld"), xRel, yRel);
::SendMessage(g_hStatusBar, SB_SETTEXT, 2, (LPARAM) (LPCTSTR) strSize);
}
}
if (wParam & MK_RBUTTON)
{
toolsModel.OnMouseMove(FALSE, pt.x, pt.y);
Invalidate(FALSE);
if (toolsModel.GetActiveTool() >= TOOL_TEXT)
{
CString strSize;
if ((toolsModel.GetActiveTool() >= TOOL_LINE) && (GetAsyncKeyState(VK_SHIFT) < 0))
yRel = xRel;
strSize.Format(_T("%ld x %ld"), xRel, yRel);
::SendMessage(g_hStatusBar, SB_SETTEXT, 2, (LPARAM) (LPCTSTR) strSize);
}
}
toolsModel.DrawWithMouseTool(pt, wParam);
return 0;
}
@@ -531,28 +477,28 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
cyImage = min(MAXWORD, cyImage);
// Display new size
CString strSize;
strSize.Format(_T("%d x %d"), cxImage, cyImage);
::SendMessage(g_hStatusBar, SB_SETTEXT, 2, (LPARAM) (LPCTSTR) strSize);
CStringW strSize;
strSize.Format(L"%d x %d", cxImage, cyImage);
::SendMessageW(g_hStatusBar, SB_SETTEXT, 2, (LPARAM)(LPCWSTR)strSize);
// Dragging now... Fix the position...
CRect rcResizing = { 0, 0, cxImage, cyImage };
switch (m_hitCanvasSizeBox)
{
case HIT_UPPER_LEFT:
::OffsetRect(&rcResizing, cxDelta, cyDelta);
rcResizing.OffsetRect(cxDelta, cyDelta);
break;
case HIT_UPPER_CENTER:
::OffsetRect(&rcResizing, 0, cyDelta);
rcResizing.OffsetRect(0, cyDelta);
break;
case HIT_UPPER_RIGHT:
::OffsetRect(&rcResizing, 0, cyDelta);
rcResizing.OffsetRect(0, cyDelta);
break;
case HIT_MIDDLE_LEFT:
::OffsetRect(&rcResizing, cxDelta, 0);
rcResizing.OffsetRect(cxDelta, 0);
break;
case HIT_LOWER_LEFT:
::OffsetRect(&rcResizing, cxDelta, 0);
rcResizing.OffsetRect(cxDelta, 0);
break;
default:
break;
@@ -564,24 +510,22 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
return 0;
}
LRESULT CCanvasWindow::OnLRButtonUp(BOOL bLeftButton, UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
LRESULT CCanvasWindow::OnButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
CanvasToImage(pt);
::ReleaseCapture();
BOOL bLeftButton = (m_nMouseDownMsg == WM_LBUTTONDOWN);
m_nMouseDownMsg = 0;
if (m_drawing)
{
m_drawing = FALSE;
toolsModel.OnButtonUp(bLeftButton, pt.x, pt.y);
Invalidate(FALSE);
::SendMessage(g_hStatusBar, SB_SETTEXT, 2, (LPARAM)_T(""));
return 0;
}
else if (m_hitSelection != HIT_NONE && bLeftButton)
{
EndSelectionDrag(pt);
::SendMessageW(g_hStatusBar, SB_SETTEXT, 2, (LPARAM)L"");
return 0;
}
@@ -621,27 +565,17 @@ LRESULT CCanvasWindow::OnLRButtonUp(BOOL bLeftButton, UINT nMsg, WPARAM wParam,
default:
break;
}
::SetRectEmpty(&m_rcResizing);
m_rcResizing.SetRectEmpty();
g_imageSaved = FALSE;
m_hitCanvasSizeBox = HIT_NONE;
toolsModel.resetTool(); // resets the point-buffer of the polygon and bezier functions
Update(NULL);
updateScrollRange();
Invalidate(TRUE);
return 0;
}
LRESULT CCanvasWindow::OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return OnLRButtonUp(TRUE, nMsg, wParam, lParam, bHandled);
}
LRESULT CCanvasWindow::OnRButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return OnLRButtonUp(FALSE, nMsg, wParam, lParam, bHandled);
}
LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (CWaitCursor::IsWaiting())
@@ -650,6 +584,12 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
return 0;
}
if (m_nMouseDownMsg == WM_MBUTTONDOWN)
{
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_HANDDRAG)));
return 0;
}
POINT pt;
::GetCursorPos(&pt);
ScreenToClient(&pt);
@@ -657,17 +597,17 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
CRect rcClient;
GetClientRect(&rcClient);
if (!::PtInRect(&rcClient, pt))
if (!rcClient.PtInRect(pt))
{
bHandled = FALSE;
return 0;
}
HITTEST hitSelection = SelectionHitTest(pt);
HITTEST hitSelection = selectionModel.hitTest(pt);
if (hitSelection != HIT_NONE)
{
if (!setCursorOnSizeBox(hitSelection))
::SetCursor(::LoadCursor(NULL, IDC_SIZEALL));
::SetCursor(::LoadCursorW(NULL, (LPCWSTR)IDC_SIZEALL));
return 0;
}
@@ -675,27 +615,27 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
GetImageRect(rcImage);
ImageToCanvas(rcImage);
if (::PtInRect(&rcImage, pt))
if (rcImage.PtInRect(pt))
{
switch (toolsModel.GetActiveTool())
{
case TOOL_FILL:
::SetCursor(::LoadIcon(g_hinstExe, MAKEINTRESOURCE(IDC_FILL)));
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_FILL)));
break;
case TOOL_COLOR:
::SetCursor(::LoadIcon(g_hinstExe, MAKEINTRESOURCE(IDC_COLOR)));
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_COLOR)));
break;
case TOOL_ZOOM:
::SetCursor(::LoadIcon(g_hinstExe, MAKEINTRESOURCE(IDC_ZOOM)));
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_ZOOM)));
break;
case TOOL_PEN:
::SetCursor(::LoadIcon(g_hinstExe, MAKEINTRESOURCE(IDC_PEN)));
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_PEN)));
break;
case TOOL_AIRBRUSH:
::SetCursor(::LoadIcon(g_hinstExe, MAKEINTRESOURCE(IDC_AIRBRUSH)));
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_AIRBRUSH)));
break;
default:
::SetCursor(::LoadCursor(NULL, IDC_CROSS));
::SetCursor(::LoadCursorW(NULL, (LPCWSTR)IDC_CROSS));
}
return 0;
}
@@ -708,12 +648,13 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
LRESULT CCanvasWindow::OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (wParam == VK_ESCAPE && ::GetCapture() == m_hWnd)
if (wParam == VK_ESCAPE)
{
// Cancel dragging
OnEndDraw(TRUE);
::ReleaseCapture();
m_nMouseDownMsg = 0;
m_hitCanvasSizeBox = HIT_NONE;
::SetRectEmpty(&m_rcResizing);
m_rcResizing.SetRectEmpty();
Invalidate(TRUE);
}
@@ -724,19 +665,19 @@ LRESULT CCanvasWindow::OnCancelMode(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
{
// Cancel dragging
m_hitCanvasSizeBox = HIT_NONE;
::SetRectEmpty(&m_rcResizing);
m_rcResizing.SetRectEmpty();
Invalidate(TRUE);
return 0;
}
LRESULT CCanvasWindow::OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return ::SendMessage(GetParent(), nMsg, wParam, lParam);
return ::SendMessageW(GetParent(), nMsg, wParam, lParam);
}
LRESULT CCanvasWindow::OnCaptureChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
::SendMessage(g_hStatusBar, SB_SETTEXT, 2, (LPARAM)_T(""));
::SendMessageW(g_hStatusBar, SB_SETTEXT, 2, (LPARAM)L"");
return 0;
}
@@ -757,72 +698,10 @@ LRESULT CCanvasWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
return 0;
}
VOID CCanvasWindow::cancelDrawing()
VOID CCanvasWindow::OnEndDraw(BOOL bCancel)
{
selectionModel.ClearColorImage();
selectionModel.ClearMaskImage();
m_hitSelection = HIT_NONE;
m_drawing = FALSE;
toolsModel.OnCancelDraw();
Invalidate(FALSE);
}
VOID CCanvasWindow::finishDrawing()
{
toolsModel.OnFinishDraw();
m_drawing = FALSE;
Invalidate(FALSE);
}
HITTEST CCanvasWindow::SelectionHitTest(POINT ptImage)
{
if (!selectionModel.m_bShow)
return HIT_NONE;
RECT rcSelection = selectionModel.m_rc;
Zoomed(rcSelection);
::OffsetRect(&rcSelection, GRIP_SIZE - GetScrollPos(SB_HORZ), GRIP_SIZE - GetScrollPos(SB_VERT));
::InflateRect(&rcSelection, GRIP_SIZE, GRIP_SIZE);
return getSizeBoxHitTest(ptImage, &rcSelection);
}
VOID CCanvasWindow::StartSelectionDrag(HITTEST hit, POINT ptImage)
{
m_hitSelection = hit;
selectionModel.m_ptHit = ptImage;
selectionModel.TakeOff();
SetCapture();
Invalidate(FALSE);
}
VOID CCanvasWindow::SelectionDragging(POINT ptImage)
{
if (selectionModel.m_nSelectionBrush)
{
imageModel.SelectionClone(selectionModel.m_nSelectionBrush == 1);
selectionModel.m_nSelectionBrush = 2; // Selection Brush is ON and drawn
}
selectionModel.Dragging(m_hitSelection, ptImage);
Invalidate(FALSE);
}
VOID CCanvasWindow::EndSelectionDrag(POINT ptImage)
{
selectionModel.Dragging(m_hitSelection, ptImage);
m_hitSelection = HIT_NONE;
Invalidate(FALSE);
}
VOID CCanvasWindow::MoveSelection(INT xDelta, INT yDelta)
{
if (!selectionModel.m_bShow)
return;
selectionModel.TakeOff();
::OffsetRect(&selectionModel.m_rc, xDelta, yDelta);
toolsModel.OnEndDraw(bCancel);
Invalidate(FALSE);
}

View File

@@ -10,7 +10,7 @@
class CCanvasWindow : public CWindowImpl<CCanvasWindow>
{
public:
DECLARE_WND_CLASS_EX(_T("ReactOSPaintCanvas"), CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW,
DECLARE_WND_CLASS_EX(L"ReactOSPaintCanvas", CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW,
COLOR_APPWORKSPACE)
BEGIN_MSG_MAP(CCanvasWindow)
@@ -20,13 +20,15 @@ public:
MESSAGE_HANDLER(WM_HSCROLL, OnHScroll)
MESSAGE_HANDLER(WM_VSCROLL, OnVScroll)
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown)
MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk)
MESSAGE_HANDLER(WM_RBUTTONDBLCLK, OnRButtonDblClk)
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnButtonDown)
MESSAGE_HANDLER(WM_RBUTTONDOWN, OnButtonDown)
MESSAGE_HANDLER(WM_MBUTTONDOWN, OnButtonDown)
MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnButtonDblClk)
MESSAGE_HANDLER(WM_RBUTTONDBLCLK, OnButtonDblClk)
MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUp)
MESSAGE_HANDLER(WM_RBUTTONUP, OnRButtonUp)
MESSAGE_HANDLER(WM_LBUTTONUP, OnButtonUp)
MESSAGE_HANDLER(WM_RBUTTONUP, OnButtonUp)
MESSAGE_HANDLER(WM_MBUTTONUP, OnButtonUp)
MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel)
MESSAGE_HANDLER(WM_CANCELMODE, OnCancelMode)
@@ -40,19 +42,19 @@ public:
BOOL m_drawing;
VOID cancelDrawing();
VOID finishDrawing();
VOID Update(HWND hwndFrom);
VOID OnEndDraw(BOOL bCancel);
VOID updateScrollRange();
VOID updateScrollPos(INT x = 0, INT y = 0);
VOID ImageToCanvas(POINT& pt);
VOID ImageToCanvas(RECT& rc);
VOID CanvasToImage(POINT& pt, BOOL bZoomed = FALSE);
VOID CanvasToImage(RECT& rc, BOOL bZoomed = FALSE);
VOID CanvasToImage(POINT& pt);
VOID CanvasToImage(RECT& rc);
VOID GetImageRect(RECT& rc);
VOID MoveSelection(INT xDelta, INT yDelta);
VOID getNewZoomRect(CRect& rcView, INT newZoom, CPoint ptTarget);
VOID zoomTo(INT newZoom, LONG left = 0, LONG top = 0);
protected:
HITTEST m_hitSelection;
HITTEST m_hitCanvasSizeBox;
POINT m_ptOrig; // The origin of drag start
HBITMAP m_ahbmCached[2]; // The cached buffer bitmaps
@@ -62,26 +64,14 @@ protected:
RECT GetBaseRect();
VOID DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint);
VOID OnHVScroll(WPARAM wParam, INT fnBar);
VOID drawZoomFrame(INT mouseX, INT mouseY);
HITTEST SelectionHitTest(POINT ptImage);
VOID StartSelectionDrag(HITTEST hit, POINT ptImage);
VOID SelectionDragging(POINT ptImage);
VOID EndSelectionDrag(POINT ptImage);
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnHScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnEraseBkgnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnRButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnRButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnRButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnCancelMode(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
@@ -89,7 +79,8 @@ protected:
LRESULT OnCtlColorEdit(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLRButtonDown(BOOL bLeftButton, UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLRButtonDblClk(BOOL bLeftButton, UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLRButtonUp(BOOL bLeftButton, UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
UINT m_nMouseDownMsg = 0;
LRESULT OnButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
};

View File

@@ -1,51 +0,0 @@
/*
* PROJECT: PAINT for ReactOS
* LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
* PURPOSE: Commonly used functions and definitions
* COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
* Copyright 2018 Stanislav Motylkov <x86corez@gmail.com>
* Copyright 2021-2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
#define GRIP_SIZE 3
#define MIN_ZOOM 125
#define MAX_ZOOM 8000
#define MAX_LONG_PATH 512
#define WM_TOOLSMODELTOOLCHANGED (WM_APP + 0)
#define WM_TOOLSMODELSETTINGSCHANGED (WM_APP + 1)
#define WM_TOOLSMODELZOOMCHANGED (WM_APP + 2)
#define WM_PALETTEMODELCOLORCHANGED (WM_APP + 3)
/* this simplifies checking and unchecking menu items */
#define CHECKED_IF(a) ((a) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED | MF_BYCOMMAND))
/* this simplifies enabling or graying menu items */
#define ENABLED_IF(a) ((a) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND))
enum HITTEST // hit
{
HIT_NONE = 0, // Nothing hit or outside
HIT_UPPER_LEFT,
HIT_UPPER_CENTER,
HIT_UPPER_RIGHT,
HIT_MIDDLE_LEFT,
HIT_MIDDLE_RIGHT,
HIT_LOWER_LEFT,
HIT_LOWER_CENTER,
HIT_LOWER_RIGHT,
HIT_BORDER,
HIT_INNER,
};
/* FUNCTIONS ********************************************************/
BOOL zoomTo(int newZoom, int mouseX, int mouseY);
BOOL nearlyEqualPoints(INT x0, INT y0, INT x1, INT y1);
BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName);
#define DEG2RAD(degree) (((degree) * M_PI) / 180)
#define RAD2DEG(radian) ((LONG)(((radian) * 180) / M_PI))

View File

@@ -5,16 +5,11 @@
* COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
*/
/* INCLUDES *********************************************************/
#include "precomp.h"
#include "dialogs.h"
#include <winnls.h>
/* GLOBALS **********************************************************/
CMirrorRotateDialog mirrorRotateDialog;
CAttributesDialog attributesDialog;
CStretchSkewDialog stretchSkewDialog;
@@ -113,22 +108,21 @@ LRESULT CAttributesDialog::OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam,
if (g_isAFile)
{
TCHAR date[100];
TCHAR temp[100];
GetDateFormat(LOCALE_USER_DEFAULT, 0, &g_fileTime, NULL, date, _countof(date));
GetTimeFormat(LOCALE_USER_DEFAULT, 0, &g_fileTime, NULL, temp, _countof(temp));
_tcscat(date, _T(" "));
_tcscat(date, temp);
CString strSize;
WCHAR date[100], temp[100];
GetDateFormatW(LOCALE_USER_DEFAULT, 0, &g_fileTime, NULL, date, _countof(date));
GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &g_fileTime, NULL, temp, _countof(temp));
StringCchCatW(date, _countof(date), L" ");
StringCchCatW(date, _countof(date), temp);
CStringW strSize;
strSize.Format(IDS_FILESIZE, g_fileSize);
SetDlgItemText(IDD_ATTRIBUTESTEXT6, date);
SetDlgItemText(IDD_ATTRIBUTESTEXT7, strSize);
}
CString strUnit;
CStringW strUnit;
GetDlgItemText(IDD_ATTRIBUTESTEXT8, strUnit);
CString strRes;
CStringW strRes;
if (strUnit == L"dpi")
strRes.Format(IDS_PRINTRES, ROUND(g_xDpi), ROUND(g_yDpi));
else
@@ -173,10 +167,10 @@ LRESULT CAttributesDialog::OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndC
if (IsDlgButtonChecked(IDD_ATTRIBUTESRB1) != BST_CHECKED)
return 0;
CString strNum;
strNum.Format(_T("%.3lf"), newWidth / g_xDpi);
CStringW strNum;
strNum.Format(L"%.3lf", newWidth / g_xDpi);
SetDlgItemText(IDD_ATTRIBUTESEDIT1, strNum);
strNum.Format(_T("%.3lf"), newHeight / g_yDpi);
strNum.Format(L"%.3lf", newHeight / g_yDpi);
SetDlgItemText(IDD_ATTRIBUTESEDIT2, strNum);
return 0;
}
@@ -186,10 +180,10 @@ LRESULT CAttributesDialog::OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndC
if (IsDlgButtonChecked(IDD_ATTRIBUTESRB2) != BST_CHECKED)
return 0;
CString strNum;
strNum.Format(_T("%.3lf"), newWidth / PpcmFromDpi(g_xDpi));
CStringW strNum;
strNum.Format(L"%.3lf", newWidth / PpcmFromDpi(g_xDpi));
SetDlgItemText(IDD_ATTRIBUTESEDIT1, strNum);
strNum.Format(_T("%.3lf"), newHeight / PpcmFromDpi(g_yDpi));
strNum.Format(L"%.3lf", newHeight / PpcmFromDpi(g_yDpi));
SetDlgItemText(IDD_ATTRIBUTESEDIT2, strNum);
return 0;
}
@@ -208,21 +202,21 @@ LRESULT CAttributesDialog::OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOO
{
if (Edit_GetModify(hWndCtl))
{
TCHAR tempS[100];
WCHAR tempS[100];
if (IsDlgButtonChecked(IDD_ATTRIBUTESRB1))
{
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS));
newWidth = max(1, (int) (_tcstod(tempS, NULL) * g_xDpi));
newWidth = max(1, (int)(wcstod(tempS, NULL) * g_xDpi));
}
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB2))
{
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS));
newWidth = max(1, (int) (_tcstod(tempS, NULL) * PpcmFromDpi(g_xDpi)));
newWidth = max(1, (int)(wcstod(tempS, NULL) * PpcmFromDpi(g_xDpi)));
}
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB3))
{
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS));
newWidth = max(1, _tstoi(tempS));
newWidth = max(1, _wtoi(tempS));
}
Edit_SetModify(hWndCtl, FALSE);
}
@@ -233,21 +227,21 @@ LRESULT CAttributesDialog::OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOO
{
if (Edit_GetModify(hWndCtl))
{
TCHAR tempS[100];
WCHAR tempS[100];
if (IsDlgButtonChecked(IDD_ATTRIBUTESRB1))
{
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS));
newHeight = max(1, (int) (_tcstod(tempS, NULL) * g_yDpi));
newHeight = max(1, (int)(wcstod(tempS, NULL) * g_yDpi));
}
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB2))
{
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS));
newHeight = max(1, (int) (_tcstod(tempS, NULL) * PpcmFromDpi(g_yDpi)));
newHeight = max(1, (int)(wcstod(tempS, NULL) * PpcmFromDpi(g_yDpi)));
}
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB3))
{
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS));
newHeight = max(1, _tstoi(tempS));
newHeight = max(1, _wtoi(tempS));
}
Edit_SetModify(hWndCtl, FALSE);
}
@@ -273,9 +267,7 @@ LRESULT CStretchSkewDialog::OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
LRESULT CStretchSkewDialog::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
CString strrcIntNumbers;
CString strrcPercentage;
CString strrcAngle;
CStringW strrcIntNumbers, strrcPercentage, strrcAngle;
BOOL tr1, tr2, tr3, tr4;
strrcIntNumbers.LoadString(g_hinstExe, IDS_INTNUMBERS);
@@ -305,11 +297,11 @@ LRESULT CStretchSkewDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, B
}
static INT CALLBACK
EnumFontFamProc(ENUMLOGFONT *lpelf, NEWTEXTMETRIC *lpntm, INT FontType, LPARAM lParam)
EnumFontFamProc(ENUMLOGFONTW *lpelf, NEWTEXTMETRICW *lpntm, INT FontType, LPARAM lParam)
{
CSimpleArray<CString>& arrFontNames = *reinterpret_cast<CSimpleArray<CString>*>(lParam);
LPTSTR name = lpelf->elfLogFont.lfFaceName;
if (name[0] == TEXT('@')) // Vertical fonts
CSimpleArray<CStringW>& arrFontNames = *reinterpret_cast<CSimpleArray<CStringW>*>(lParam);
LPWSTR name = lpelf->elfLogFont.lfFaceName;
if (name[0] == L'@') // Vertical fonts
return TRUE;
for (INT i = 0; i < arrFontNames.GetSize(); ++i)
@@ -331,24 +323,24 @@ CFontsDialog::CFontsDialog()
void CFontsDialog::InitFontNames()
{
// List the fonts
CSimpleArray<CString> arrFontNames;
CSimpleArray<CStringW> arrFontNames;
HDC hDC = CreateCompatibleDC(NULL);
if (hDC)
{
EnumFontFamilies(hDC, NULL, (FONTENUMPROC)EnumFontFamProc,
reinterpret_cast<LPARAM>(&arrFontNames));
DeleteDC(hDC);
EnumFontFamiliesW(hDC, NULL, (FONTENUMPROCW)EnumFontFamProc,
reinterpret_cast<LPARAM>(&arrFontNames));
::DeleteDC(hDC);
}
// Actually add them to the combobox
HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
SendMessage(hwndNames, CB_RESETCONTENT, 0, 0);
::SendMessageW(hwndNames, CB_RESETCONTENT, 0, 0);
for (INT i = 0; i < arrFontNames.GetSize(); ++i)
{
ComboBox_AddString(hwndNames, arrFontNames[i]);
}
::SetWindowText(hwndNames, registrySettings.strFontName);
::SetWindowTextW(hwndNames, registrySettings.strFontName);
}
void CFontsDialog::InitFontSizes()
@@ -361,10 +353,10 @@ void CFontsDialog::InitFontSizes()
HWND hwndSizes = GetDlgItem(IDD_FONTSSIZES);
ComboBox_ResetContent(hwndSizes);
TCHAR szText[16];
WCHAR szText[16];
for (UINT i = 0; i < _countof(s_sizes); ++i)
{
wsprintf(szText, TEXT("%d"), s_sizes[i]);
StringCchPrintfW(szText, _countof(szText), L"%d", s_sizes[i]);
INT iItem = ComboBox_AddString(hwndSizes, szText);
if (s_sizes[i] == (INT)registrySettings.PointSize)
ComboBox_SetCurSel(hwndSizes, iItem);
@@ -372,27 +364,27 @@ void CFontsDialog::InitFontSizes()
if (ComboBox_GetCurSel(hwndSizes) == CB_ERR)
{
wsprintf(szText, TEXT("%d"), (INT)registrySettings.PointSize);
::SetWindowText(hwndSizes, szText);
StringCchPrintfW(szText, _countof(szText), L"%d", (INT)registrySettings.PointSize);
::SetWindowTextW(hwndSizes, szText);
}
}
void CFontsDialog::InitToolbar()
{
HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
SendMessage(hwndToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
SendMessage(hwndToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(16, 16));
SendMessage(hwndToolbar, TB_SETBUTTONWIDTH, 0, MAKELPARAM(20, 20));
::SendMessageW(hwndToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
::SendMessageW(hwndToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(16, 16));
::SendMessageW(hwndToolbar, TB_SETBUTTONWIDTH, 0, MAKELPARAM(20, 20));
TBADDBITMAP AddBitmap;
AddBitmap.hInst = g_hinstExe;
AddBitmap.nID = IDB_FONTSTOOLBAR;
SendMessage(hwndToolbar, TB_ADDBITMAP, 4, (LPARAM)&AddBitmap);
::SendMessageW(hwndToolbar, TB_ADDBITMAP, 4, (LPARAM)&AddBitmap);
HIMAGELIST himl = ImageList_LoadImage(g_hinstExe, MAKEINTRESOURCE(IDB_FONTSTOOLBAR),
HIMAGELIST himl = ImageList_LoadImage(g_hinstExe, MAKEINTRESOURCEW(IDB_FONTSTOOLBAR),
16, 8, RGB(255, 0, 255), IMAGE_BITMAP,
LR_CREATEDIBSECTION);
SendMessage(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl);
::SendMessageW(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl);
TBBUTTON buttons[] =
{
@@ -401,11 +393,11 @@ void CFontsDialog::InitToolbar()
{ 2, IDM_UNDERLINE, TBSTATE_ENABLED, TBSTYLE_CHECK },
{ 3, IDM_VERTICAL, 0, TBSTYLE_CHECK }, // TODO:
};
SendMessage(hwndToolbar, TB_ADDBUTTONS, _countof(buttons), (LPARAM)&buttons);
::SendMessageW(hwndToolbar, TB_ADDBUTTONS, _countof(buttons), (LPARAM)&buttons);
SendMessage(hwndToolbar, TB_CHECKBUTTON, IDM_BOLD, registrySettings.Bold);
SendMessage(hwndToolbar, TB_CHECKBUTTON, IDM_ITALIC, registrySettings.Italic);
SendMessage(hwndToolbar, TB_CHECKBUTTON, IDM_UNDERLINE, registrySettings.Underline);
::SendMessageW(hwndToolbar, TB_CHECKBUTTON, IDM_BOLD, registrySettings.Bold);
::SendMessageW(hwndToolbar, TB_CHECKBUTTON, IDM_ITALIC, registrySettings.Italic);
::SendMessageW(hwndToolbar, TB_CHECKBUTTON, IDM_UNDERLINE, registrySettings.Underline);
}
LRESULT CFontsDialog::OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
@@ -441,7 +433,7 @@ void CFontsDialog::OnFontName(UINT codeNotify)
HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
INT iItem = CB_ERR;
UINT cch;
TCHAR szText[LF_FACESIZE];
WCHAR szText[LF_FACESIZE];
switch (codeNotify)
{
@@ -449,9 +441,7 @@ void CFontsDialog::OnFontName(UINT codeNotify)
iItem = ComboBox_GetCurSel(hwndNames);
cch = ComboBox_GetLBTextLen(hwndNames, iItem);
if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
{
ComboBox_GetLBText(hwndNames, iItem, szText);
}
break;
case CBN_EDITCHANGE:
@@ -482,13 +472,13 @@ void CFontsDialog::OnFontSize(UINT codeNotify)
if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
{
ComboBox_GetLBText(hwndSizes, iItem, szText);
PointSize = _ttoi(szText);
PointSize = _wtoi(szText);
}
break;
case CBN_EDITCHANGE:
::GetWindowText(hwndSizes, szText, _countof(szText));
PointSize = _ttoi(szText);
::GetWindowTextW(hwndSizes, szText, _countof(szText));
PointSize = _wtoi(szText);
break;
}
@@ -504,7 +494,7 @@ LRESULT CFontsDialog::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& b
UINT id = LOWORD(wParam);
UINT codeNotify = HIWORD(wParam);
HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
BOOL bChecked = ::SendMessage(hwndToolbar, TB_ISBUTTONCHECKED, id, 0);
BOOL bChecked = (BOOL)::SendMessageW(hwndToolbar, TB_ISBUTTONCHECKED, id, 0);
switch (id)
{
@@ -548,14 +538,14 @@ LRESULT CFontsDialog::OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
NMHDR *pnmhdr = reinterpret_cast<NMHDR *>(lParam);
if (pnmhdr->code == TTN_NEEDTEXT)
{
LPTOOLTIPTEXT pToolTip = reinterpret_cast<LPTOOLTIPTEXT>(lParam);
LPTOOLTIPTEXTW pToolTip = reinterpret_cast<LPTOOLTIPTEXTW>(lParam);
pToolTip->hinst = g_hinstExe;
switch (pnmhdr->idFrom)
{
case IDM_BOLD: pToolTip->lpszText = MAKEINTRESOURCE(IDS_BOLD); break;
case IDM_ITALIC: pToolTip->lpszText = MAKEINTRESOURCE(IDS_ITALIC); break;
case IDM_UNDERLINE: pToolTip->lpszText = MAKEINTRESOURCE(IDS_UNDERLINE); break;
case IDM_VERTICAL: pToolTip->lpszText = MAKEINTRESOURCE(IDS_VERTICAL); break;
case IDM_BOLD: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_BOLD); break;
case IDM_ITALIC: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_ITALIC); break;
case IDM_UNDERLINE: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_UNDERLINE); break;
case IDM_VERTICAL: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_VERTICAL); break;
default:
break;
@@ -604,29 +594,29 @@ LRESULT CFontsDialog::OnDrawItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
if (pDrawItem->itemID == (UINT)-1)
return TRUE;
SetBkMode(pDrawItem->hDC, TRANSPARENT);
::SetBkMode(pDrawItem->hDC, TRANSPARENT);
HWND hwndItem = pDrawItem->hwndItem;
RECT rcItem = pDrawItem->rcItem;
if (pDrawItem->itemState & ODS_SELECTED)
{
FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
SetTextColor(pDrawItem->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
::FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
::SetTextColor(pDrawItem->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
}
else
{
FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_WINDOW));
SetTextColor(pDrawItem->hDC, GetSysColor(COLOR_WINDOWTEXT));
::FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_WINDOW));
::SetTextColor(pDrawItem->hDC, GetSysColor(COLOR_WINDOWTEXT));
}
TCHAR szText[LF_FACESIZE];
WCHAR szText[LF_FACESIZE];
if ((UINT)ComboBox_GetLBTextLen(hwndItem, pDrawItem->itemID) < _countof(szText))
{
szText[0] = 0;
ComboBox_GetLBText(hwndItem, pDrawItem->itemID, szText);
rcItem.left += 24;
DrawText(pDrawItem->hDC, szText, -1, &rcItem, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
::DrawTextW(pDrawItem->hDC, szText, -1, &rcItem, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
}
if (pDrawItem->itemState & ODS_FOCUS)

View File

@@ -87,7 +87,7 @@ CreateColorDIB(int width, int height, COLORREF rgb)
HBITMAP CopyMonoImage(HBITMAP hbm, INT cx, INT cy)
{
BITMAP bm;
if (!GetObject(hbm, sizeof(bm), &bm))
if (!::GetObjectW(hbm, sizeof(bm), &bm))
return NULL;
if (cx == 0 || cy == 0)
@@ -96,19 +96,19 @@ HBITMAP CopyMonoImage(HBITMAP hbm, INT cx, INT cy)
cy = bm.bmHeight;
}
HBITMAP hbmNew = CreateBitmap(cx, cy, 1, 1, NULL);
HBITMAP hbmNew = ::CreateBitmap(cx, cy, 1, 1, NULL);
if (!hbmNew)
return NULL;
HDC hdc1 = CreateCompatibleDC(NULL);
HDC hdc2 = CreateCompatibleDC(NULL);
HGDIOBJ hbm1Old = SelectObject(hdc1, hbm);
HGDIOBJ hbm2Old = SelectObject(hdc2, hbmNew);
StretchBlt(hdc2, 0, 0, cx, cy, hdc1, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
SelectObject(hdc1, hbm1Old);
SelectObject(hdc2, hbm2Old);
DeleteDC(hdc1);
DeleteDC(hdc2);
HDC hdc1 = ::CreateCompatibleDC(NULL);
HDC hdc2 = ::CreateCompatibleDC(NULL);
HGDIOBJ hbm1Old = ::SelectObject(hdc1, hbm);
HGDIOBJ hbm2Old = ::SelectObject(hdc2, hbmNew);
::StretchBlt(hdc2, 0, 0, cx, cy, hdc1, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
::SelectObject(hdc1, hbm1Old);
::SelectObject(hdc2, hbm2Old);
::DeleteDC(hdc1);
::DeleteDC(hdc2);
return hbmNew;
}
@@ -120,7 +120,7 @@ HBITMAP CachedBufferDIB(HBITMAP hbm, int minimalWidth, int minimalHeight)
minimalHeight = 1;
BITMAP bm;
if (!GetObject(hbm, sizeof(bm), &bm))
if (!GetObjectW(hbm, sizeof(bm), &bm))
hbm = NULL;
if (hbm && minimalWidth <= bm.bmWidth && minimalHeight <= bm.bmHeight)
@@ -136,7 +136,7 @@ int
GetDIBWidth(HBITMAP hBitmap)
{
BITMAP bm;
GetObject(hBitmap, sizeof(BITMAP), &bm);
::GetObjectW(hBitmap, sizeof(BITMAP), &bm);
return bm.bmWidth;
}
@@ -144,7 +144,7 @@ int
GetDIBHeight(HBITMAP hBitmap)
{
BITMAP bm;
GetObject(hBitmap, sizeof(BITMAP), &bm);
::GetObjectW(hBitmap, sizeof(BITMAP), &bm);
return bm.bmHeight;
}
@@ -211,8 +211,8 @@ void SetFileInfo(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isAFile)
}
// set title
CString strTitle;
strTitle.Format(IDS_WINDOWTITLE, PathFindFileName(g_szFileName));
CStringW strTitle;
strTitle.Format(IDS_WINDOWTITLE, PathFindFileNameW(g_szFileName));
mainWindow.SetWindowText(strTitle);
// update file info and recent
@@ -228,11 +228,14 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
COLORREF white = RGB(255, 255, 255);
HBITMAP hBitmap = CreateColorDIB(registrySettings.BMPWidth, registrySettings.BMPHeight, white);
if (hBitmap == NULL)
{
ShowOutOfMemory();
return NULL;
}
HDC hScreenDC = ::GetDC(NULL);
g_xDpi = ::GetDeviceCaps(hScreenDC, LOGPIXELSX);
g_yDpi = ::GetDeviceCaps(hScreenDC, LOGPIXELSY);
g_xDpi = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSX);
g_yDpi = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSY);
::ReleaseDC(NULL, hScreenDC);
return SetBitmapAndInfo(hBitmap, name, pFound, isFile);
@@ -241,6 +244,7 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
{
// update image
canvasWindow.updateScrollPos();
imageModel.PushImageForUndo(hBitmap);
imageModel.ClearHistory();
@@ -254,7 +258,7 @@ HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile)
CWaitCursor waitCursor;
// find the file
WIN32_FIND_DATA find;
WIN32_FIND_DATAW find;
HANDLE hFind = ::FindFirstFileW(name, &find);
if (hFind == INVALID_HANDLE_VALUE) // does not exist
{
@@ -274,8 +278,14 @@ HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile)
CImageDx img;
float xDpi = 0, yDpi = 0;
HRESULT hr = img.LoadDx(name, &xDpi, &yDpi);
if (FAILED(hr) && fIsMainFile)
{
imageModel.ClearHistory();
hr = img.LoadDx(name, &xDpi, &yDpi);
}
if (FAILED(hr))
{
ATLTRACE("hr: 0x%08lX\n", hr);
ShowError(IDS_LOADERRORTEXT, name);
return NULL;
}
@@ -287,8 +297,8 @@ HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile)
if (xDpi <= 0 || yDpi <= 0)
{
HDC hDC = ::GetDC(NULL);
xDpi = ::GetDeviceCaps(hDC, LOGPIXELSX);
yDpi = ::GetDeviceCaps(hDC, LOGPIXELSY);
xDpi = (float)::GetDeviceCaps(hDC, LOGPIXELSX);
yDpi = (float)::GetDeviceCaps(hDC, LOGPIXELSY);
::ReleaseDC(NULL, hDC);
}
@@ -348,7 +358,7 @@ HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical, BOOL bMono)
const double eTan = tan(abs(nDegree) * M_PI / 180);
BITMAP bm;
GetObjectW(hbm, sizeof(bm), &bm);
::GetObjectW(hbm, sizeof(bm), &bm);
INT cx = bm.bmWidth, cy = bm.bmHeight, dx = 0, dy = 0;
if (bVertical)
dy = INT(cx * eTan);
@@ -374,9 +384,9 @@ HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical, BOOL bMono)
{
INT delta = INT(x * eTan);
if (nDegree > 0)
BitBlt(hDC2, x, (dy - delta), 1, cy, hDC1, x, 0, SRCCOPY);
::BitBlt(hDC2, x, (dy - delta), 1, cy, hDC1, x, 0, SRCCOPY);
else
BitBlt(hDC2, x, delta, 1, cy, hDC1, x, 0, SRCCOPY);
::BitBlt(hDC2, x, delta, 1, cy, hDC1, x, 0, SRCCOPY);
}
}
else
@@ -385,9 +395,9 @@ HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical, BOOL bMono)
{
INT delta = INT(y * eTan);
if (nDegree > 0)
BitBlt(hDC2, (dx - delta), y, cx, 1, hDC1, 0, y, SRCCOPY);
::BitBlt(hDC2, (dx - delta), y, cx, 1, hDC1, 0, y, SRCCOPY);
else
BitBlt(hDC2, delta, y, cx, 1, hDC1, 0, y, SRCCOPY);
::BitBlt(hDC2, delta, y, cx, 1, hDC1, 0, y, SRCCOPY);
}
}
@@ -396,6 +406,39 @@ HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical, BOOL bMono)
return hbmNew;
}
HBITMAP getSubImage(HBITMAP hbmWhole, const RECT& rcPartial)
{
CRect rc = rcPartial;
HBITMAP hbmPart = CreateDIBWithProperties(rc.Width(), rc.Height());
if (!hbmPart)
return NULL;
HDC hDC1 = ::CreateCompatibleDC(NULL);
HDC hDC2 = ::CreateCompatibleDC(NULL);
HGDIOBJ hbm1Old = ::SelectObject(hDC1, hbmWhole);
HGDIOBJ hbm2Old = ::SelectObject(hDC2, hbmPart);
::BitBlt(hDC2, 0, 0, rc.Width(), rc.Height(), hDC1, rc.left, rc.top, SRCCOPY);
::SelectObject(hDC1, hbm1Old);
::SelectObject(hDC2, hbm2Old);
::DeleteDC(hDC1);
::DeleteDC(hDC2);
return hbmPart;
}
void putSubImage(HBITMAP hbmWhole, const RECT& rcPartial, HBITMAP hbmPart)
{
CRect rc = rcPartial;
HDC hDC1 = ::CreateCompatibleDC(NULL);
HDC hDC2 = ::CreateCompatibleDC(NULL);
HGDIOBJ hbm1Old = ::SelectObject(hDC1, hbmWhole);
HGDIOBJ hbm2Old = ::SelectObject(hDC2, hbmPart);
::BitBlt(hDC1, rc.left, rc.top, rc.Width(), rc.Height(), hDC2, 0, 0, SRCCOPY);
::SelectObject(hDC1, hbm1Old);
::SelectObject(hDC2, hbm2Old);
::DeleteDC(hDC1);
::DeleteDC(hDC2);
}
struct BITMAPINFODX : BITMAPINFO
{
RGBQUAD bmiColorsAdditional[256 - 1];
@@ -406,7 +449,7 @@ HGLOBAL BitmapToClipboardDIB(HBITMAP hBitmap)
CWaitCursor waitCursor;
BITMAP bm;
if (!GetObject(hBitmap, sizeof(BITMAP), &bm))
if (!GetObjectW(hBitmap, sizeof(BITMAP), &bm))
return NULL;
BITMAPINFODX bmi;
@@ -590,7 +633,7 @@ HBITMAP ConvertToBlackAndWhite(HBITMAP hbm)
CWaitCursor waitCursor;
BITMAP bm;
if (!::GetObject(hbm, sizeof(bm), &bm))
if (!::GetObjectW(hbm, sizeof(bm), &bm))
return NULL;
BITMAPINFOEX bmi;

View File

@@ -44,3 +44,5 @@ float PpcmFromDpi(float dpi);
HGLOBAL BitmapToClipboardDIB(HBITMAP hBitmap);
HBITMAP BitmapFromClipboardDIB(HGLOBAL hGlobal);
HBITMAP BitmapFromHEMF(HENHMETAFILE hEMF);
HBITMAP getSubImage(HBITMAP hbmWhole, const RECT& rcPartial);
void putSubImage(HBITMAP hbmWhole, const RECT& rcPartial, HBITMAP hbmPart);

View File

@@ -5,8 +5,6 @@
* COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
*/
/* INCLUDES *********************************************************/
#include "precomp.h"
/* FUNCTIONS ********************************************************/
@@ -253,38 +251,36 @@ RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2)
}
void
Text(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LPCTSTR lpchText, HFONT font, LONG style)
Text(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LPCWSTR lpchText, HFONT font, LONG style)
{
INT iSaveDC = SaveDC(hdc); // We will modify the clipping region. Save now.
INT iSaveDC = ::SaveDC(hdc); // We will modify the clipping region. Save now.
RECT rc;
SetRect(&rc, x1, y1, x2, y2);
CRect rc = { x1, y1, x2, y2 };
if (style == 0) // Transparent
{
SetBkMode(hdc, TRANSPARENT);
GetBkColor(hdc);
::SetBkMode(hdc, TRANSPARENT);
}
else // Opaque
{
SetBkMode(hdc, OPAQUE);
SetBkColor(hdc, bg);
::SetBkMode(hdc, OPAQUE);
::SetBkColor(hdc, bg);
HBRUSH hbr = CreateSolidBrush(bg);
FillRect(hdc, &rc, hbr); // Fill the background
DeleteObject(hbr);
HBRUSH hbr = ::CreateSolidBrush(bg);
::FillRect(hdc, &rc, hbr); // Fill the background
::DeleteObject(hbr);
}
IntersectClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom);
HGDIOBJ hFontOld = SelectObject(hdc, font);
SetTextColor(hdc, fg);
HGDIOBJ hFontOld = ::SelectObject(hdc, font);
::SetTextColor(hdc, fg);
const UINT uFormat = DT_LEFT | DT_TOP | DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP |
DT_EXPANDTABS | DT_WORDBREAK;
DrawText(hdc, lpchText, -1, &rc, uFormat);
SelectObject(hdc, hFontOld);
::DrawTextW(hdc, lpchText, -1, &rc, uFormat);
::SelectObject(hdc, hFontOld);
RestoreDC(hdc, iSaveDC); // Restore
::RestoreDC(hdc, iSaveDC); // Restore
}
BOOL

View File

@@ -31,7 +31,7 @@ void Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG sty
void RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2);
void Text(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LPCTSTR lpchText, HFONT font, LONG style);
void Text(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LPCWSTR lpchText, HFONT font, LONG style);
BOOL
ColorKeyedMaskBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,

View File

@@ -22,8 +22,8 @@ HWND CFullscreenWindow::DoCreate()
LRESULT CFullscreenWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
SendMessage(WM_SETICON, ICON_BIG, (LPARAM) LoadIcon(g_hinstExe, MAKEINTRESOURCE(IDI_APPICON)));
SendMessage(WM_SETICON, ICON_SMALL, (LPARAM) LoadIcon(g_hinstExe, MAKEINTRESOURCE(IDI_APPICON)));
SendMessage(WM_SETICON, ICON_BIG, (LPARAM)::LoadIconW(g_hinstExe, MAKEINTRESOURCEW(IDI_APPICON)));
SendMessage(WM_SETICON, ICON_SMALL, (LPARAM)::LoadIconW(g_hinstExe, MAKEINTRESOURCEW(IDI_APPICON)));
return 0;
}
@@ -44,7 +44,7 @@ LRESULT CFullscreenWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
INT cyDest = imageModel.GetHeight();
INT xDest = (rcWnd.right - rcWnd.left - cxDest) / 2;
INT yDest = (rcWnd.bottom - rcWnd.top - cyDest) / 2;
BitBlt(hDC, xDest, yDest, cxDest, cyDest, imageModel.GetDC(), 0, 0, SRCCOPY);
::BitBlt(hDC, xDest, yDest, cxDest, cyDest, imageModel.GetDC(), 0, 0, SRCCOPY);
EndPaint(&ps);
return 0;
}

View File

@@ -10,7 +10,7 @@
class CFullscreenWindow : public CWindowImpl<CFullscreenWindow>
{
public:
DECLARE_WND_CLASS_EX(_T("FullscreenWindow"), CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW,
DECLARE_WND_CLASS_EX(L"FullscreenWindow", CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW,
COLOR_BACKGROUND)
BEGIN_MSG_MAP(CFullscreenWindow)

View File

@@ -1,52 +0,0 @@
/*
* PROJECT: PAINT for ReactOS
* LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
* PURPOSE: Declaring global variables for later initialization
* COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
*/
#pragma once
/* VARIABLES declared in main.cpp ***********************************/
extern BOOL g_askBeforeEnlarging;
extern POINT g_ptStart, g_ptEnd;
extern HINSTANCE g_hinstExe;
extern TCHAR g_szFileName[MAX_LONG_PATH];
extern BOOL g_isAFile;
extern BOOL g_imageSaved;
extern BOOL g_showGrid;
extern CMainWindow mainWindow;
/* VARIABLES declared in dialogs.cpp ********************************/
extern CMirrorRotateDialog mirrorRotateDialog;
extern CAttributesDialog attributesDialog;
extern CStretchSkewDialog stretchSkewDialog;
extern CFontsDialog fontsDialog;
/* VARIABLES declared in the other places ***************************/
extern RegistrySettings registrySettings;
extern ImageModel imageModel;
extern ToolsModel toolsModel;
extern SelectionModel selectionModel;
extern PaletteModel paletteModel;
extern HWND g_hStatusBar;
extern float g_xDpi;
extern float g_yDpi;
extern INT g_fileSize;
extern SYSTEMTIME g_fileTime;
extern CFullscreenWindow fullscreenWindow;
extern CMiniatureWindow miniature;
extern CToolBox toolBoxContainer;
extern CToolSettingsWindow toolSettingsWindow;
extern CPaletteWindow paletteWindow;
extern CCanvasWindow canvasWindow;
extern CTextEditWindow textEditWindow;

View File

@@ -12,12 +12,24 @@ ImageModel imageModel;
/* FUNCTIONS ********************************************************/
void IMAGE_PART::clear()
{
::DeleteObject(m_hbmImage);
m_hbmImage = NULL;
m_rcPart.SetRectEmpty();
m_bPartial = FALSE;
}
void ImageModel::NotifyImageChanged()
{
if (canvasWindow.IsWindow())
canvasWindow.Invalidate(FALSE);
{
canvasWindow.updateScrollRange();
canvasWindow.Invalidate();
}
if (miniature.IsWindow())
miniature.Invalidate(FALSE);
miniature.Invalidate();
}
ImageModel::ImageModel()
@@ -26,23 +38,37 @@ ImageModel::ImageModel()
, m_undoSteps(0)
, m_redoSteps(0)
{
ZeroMemory(m_hBms, sizeof(m_hBms));
ZeroMemory(m_historyItems, sizeof(m_historyItems));
m_hBms[0] = CreateColorDIB(1, 1, RGB(255, 255, 255));
m_hbmOld = ::SelectObject(m_hDrawingDC, m_hBms[0]);
m_hbmMaster = CreateColorDIB(1, 1, RGB(255, 255, 255));
m_hbmOld = ::SelectObject(m_hDrawingDC, m_hbmMaster);
g_imageSaved = TRUE;
}
ImageModel::~ImageModel()
{
::SelectObject(m_hDrawingDC, m_hbmOld); // De-select
::DeleteDC(m_hDrawingDC);
::DeleteObject(m_hbmMaster);
ClearHistory();
}
for (size_t i = 0; i < HISTORYSIZE; ++i)
void ImageModel::SwapPart()
{
IMAGE_PART& part = m_historyItems[m_currInd];
if (!part.m_bPartial)
{
if (m_hBms[i])
::DeleteObject(m_hBms[i]);
Swap(m_hbmMaster, part.m_hbmImage);
return;
}
HBITMAP hbmMaster = LockBitmap();
HBITMAP hbmPart = getSubImage(hbmMaster, part.m_rcPart);
putSubImage(hbmMaster, part.m_rcPart, part.m_hbmImage);
::DeleteObject(part.m_hbmImage);
part.m_hbmImage = hbmPart;
UnlockBitmap(hbmMaster);
}
void ImageModel::Undo(BOOL bClearRedo)
@@ -53,9 +79,10 @@ void ImageModel::Undo(BOOL bClearRedo)
selectionModel.HideSelection();
// Select previous item
m_currInd = (m_currInd + HISTORYSIZE - 1) % HISTORYSIZE;
::SelectObject(m_hDrawingDC, m_hBms[m_currInd]);
m_currInd = (m_currInd + HISTORYSIZE - 1) % HISTORYSIZE; // Go previous
ATLASSERT(m_hbmMaster != NULL);
SwapPart();
::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
m_undoSteps--;
if (bClearRedo)
@@ -74,9 +101,10 @@ void ImageModel::Redo()
selectionModel.HideSelection();
// Select next item
m_currInd = (m_currInd + 1) % HISTORYSIZE;
::SelectObject(m_hDrawingDC, m_hBms[m_currInd]);
ATLASSERT(m_hbmMaster != NULL);
SwapPart();
m_currInd = (m_currInd + 1) % HISTORYSIZE; // Go next
::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
m_redoSteps--;
if (m_undoSteps < HISTORYSIZE - 1)
@@ -85,33 +113,72 @@ void ImageModel::Redo()
NotifyImageChanged();
}
void ImageModel::ResetToPrevious()
{
ATLTRACE("%s: %d\n", __FUNCTION__, m_currInd);
// Revert current item with previous item
::DeleteObject(m_hBms[m_currInd]);
m_hBms[m_currInd] = CopyDIBImage(m_hBms[(m_currInd + HISTORYSIZE - 1) % HISTORYSIZE]);
::SelectObject(m_hDrawingDC, m_hBms[m_currInd]);
NotifyImageChanged();
}
void ImageModel::ClearHistory()
{
for (int i = 0; i < HISTORYSIZE; ++i)
{
m_historyItems[i].clear();
}
m_undoSteps = 0;
m_redoSteps = 0;
}
void ImageModel::PushImageForUndo()
{
HBITMAP hbm = CopyBitmap();
if (hbm == NULL)
{
ShowOutOfMemory();
return;
}
PushImageForUndo(hbm);
}
void ImageModel::PushImageForUndo(HBITMAP hbm)
{
ATLTRACE("%s: %d\n", __FUNCTION__, m_currInd);
// Go to the next item with an HBITMAP or current item
::DeleteObject(m_hBms[(m_currInd + 1) % HISTORYSIZE]);
m_hBms[(m_currInd + 1) % HISTORYSIZE] = (hbm ? hbm : CopyDIBImage(m_hBms[m_currInd]));
m_currInd = (m_currInd + 1) % HISTORYSIZE;
::SelectObject(m_hDrawingDC, m_hBms[m_currInd]);
if (hbm == NULL)
{
ShowOutOfMemory();
return;
}
IMAGE_PART& part = m_historyItems[m_currInd];
part.clear();
part.m_hbmImage = m_hbmMaster;
m_hbmMaster = hbm;
::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
PushDone();
}
void ImageModel::PushImageForUndo(const RECT& rcPartial)
{
ATLTRACE("%s: %d\n", __FUNCTION__, m_currInd);
IMAGE_PART& part = m_historyItems[m_currInd];
part.clear();
part.m_bPartial = TRUE;
part.m_rcPart = rcPartial;
CRect rcImage = { 0, 0, GetWidth(), GetHeight() };
CRect& rc = part.m_rcPart;
if (!rc.IntersectRect(rc, rcImage))
rc.SetRect(-1, -1, 0, 0);
HBITMAP hbmMaster = LockBitmap();
part.m_hbmImage = getSubImage(hbmMaster, rc);
UnlockBitmap(hbmMaster);
PushDone();
}
void ImageModel::PushDone()
{
m_currInd = (m_currInd + 1) % HISTORYSIZE; // Go next
if (m_undoSteps < HISTORYSIZE - 1)
m_undoSteps++;
@@ -129,37 +196,29 @@ void ImageModel::Crop(int nWidth, int nHeight, int nOffsetX, int nOffsetY)
if (nHeight <= 0)
nHeight = 1;
// Create an HBITMAP
HBITMAP hbmCropped = CreateDIBWithProperties(nWidth, nHeight);
if (!hbmCropped)
// Create a white HBITMAP
HBITMAP hbmNew = CreateColorDIB(nWidth, nHeight, RGB(255, 255, 255));
if (!hbmNew)
{
ShowOutOfMemory();
return;
}
// Select the HBITMAP by memory DC
HDC hdcMem = ::CreateCompatibleDC(m_hDrawingDC);
HGDIOBJ hbmOld = ::SelectObject(hdcMem, hbmCropped);
// Fill background of the HBITMAP
RECT rcBack = { 0, 0, nWidth, nHeight };
HBRUSH hbrBack = ::CreateSolidBrush(paletteModel.GetBgColor());
::FillRect(hdcMem, &rcBack, hbrBack);
::DeleteObject(hbrBack);
// Copy the old content
::BitBlt(hdcMem, -nOffsetX, -nOffsetY, GetWidth(), GetHeight(), m_hDrawingDC, 0, 0, SRCCOPY);
// Clean up
::SelectObject(hdcMem, hbmOld);
::DeleteDC(hdcMem);
// Put the master image as a sub-image
RECT rcPart = { -nOffsetX, -nOffsetY, GetWidth() - nOffsetX, GetHeight() - nOffsetY };
HBITMAP hbmOld = imageModel.LockBitmap();
putSubImage(hbmNew, rcPart, hbmOld);
imageModel.UnlockBitmap(hbmOld);
// Push it
PushImageForUndo(hbmCropped);
PushImageForUndo(hbmNew);
NotifyImageChanged();
}
void ImageModel::SaveImage(LPCTSTR lpFileName)
void ImageModel::SaveImage(LPCWSTR lpFileName)
{
SaveDIBToFile(m_hBms[m_currInd], lpFileName, TRUE);
SaveDIBToFile(m_hbmMaster, lpFileName, TRUE);
}
BOOL ImageModel::IsImageSaved() const
@@ -175,17 +234,17 @@ void ImageModel::StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSk
INT newHeight = oldHeight * nStretchPercentY / 100;
if (oldWidth != newWidth || oldHeight != newHeight)
{
HBITMAP hbm0 = CopyDIBImage(m_hBms[m_currInd], newWidth, newHeight);
HBITMAP hbm0 = CopyDIBImage(m_hbmMaster, newWidth, newHeight);
PushImageForUndo(hbm0);
}
if (nSkewDegX)
{
HBITMAP hbm1 = SkewDIB(m_hDrawingDC, m_hBms[m_currInd], nSkewDegX, FALSE);
HBITMAP hbm1 = SkewDIB(m_hDrawingDC, m_hbmMaster, nSkewDegX, FALSE);
PushImageForUndo(hbm1);
}
if (nSkewDegY)
{
HBITMAP hbm2 = SkewDIB(m_hDrawingDC, m_hBms[m_currInd], nSkewDegY, TRUE);
HBITMAP hbm2 = SkewDIB(m_hDrawingDC, m_hbmMaster, nSkewDegY, TRUE);
PushImageForUndo(hbm2);
}
NotifyImageChanged();
@@ -193,12 +252,12 @@ void ImageModel::StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSk
int ImageModel::GetWidth() const
{
return GetDIBWidth(m_hBms[m_currInd]);
return GetDIBWidth(m_hbmMaster);
}
int ImageModel::GetHeight() const
{
return GetDIBHeight(m_hBms[m_currInd]);
return GetDIBHeight(m_hbmMaster);
}
void ImageModel::InvertColors()
@@ -238,15 +297,14 @@ void ImageModel::RotateNTimes90Degrees(int iN)
case 3:
{
HBITMAP hbm = Rotate90DegreeBlt(m_hDrawingDC, GetWidth(), GetHeight(), iN == 1, FALSE);
if (hbm)
PushImageForUndo(hbm);
PushImageForUndo(hbm);
break;
}
case 2:
{
PushImageForUndo();
StretchBlt(m_hDrawingDC, GetWidth() - 1, GetHeight() - 1, -GetWidth(), -GetHeight(),
m_hDrawingDC, 0, 0, GetWidth(), GetHeight(), SRCCOPY);
::StretchBlt(m_hDrawingDC, GetWidth() - 1, GetHeight() - 1, -GetWidth(), -GetHeight(),
m_hDrawingDC, 0, 0, GetWidth(), GetHeight(), SRCCOPY);
break;
}
}
@@ -281,34 +339,20 @@ void ImageModel::PushBlackAndWhite()
HBITMAP hNewBitmap = ConvertToBlackAndWhite(hBitmap);
UnlockBitmap(hBitmap);
if (hNewBitmap)
PushImageForUndo(hNewBitmap);
PushImageForUndo(hNewBitmap);
}
HBITMAP ImageModel::LockBitmap()
{
// NOTE: An app cannot select a bitmap into more than one device context at a time.
::SelectObject(m_hDrawingDC, m_hbmOld); // De-select
HBITMAP hbmLocked = m_hBms[m_currInd];
m_hBms[m_currInd] = NULL;
HBITMAP hbmLocked = m_hbmMaster;
m_hbmMaster = NULL;
return hbmLocked;
}
void ImageModel::UnlockBitmap(HBITMAP hbmLocked)
{
m_hBms[m_currInd] = hbmLocked;
m_hbmOld = ::SelectObject(m_hDrawingDC, hbmLocked); // Re-select
}
void ImageModel::SelectionClone(BOOL bUndoable)
{
if (!selectionModel.m_bShow || ::IsRectEmpty(&selectionModel.m_rc))
return;
if (bUndoable)
PushImageForUndo(CopyBitmap());
selectionModel.DrawSelection(m_hDrawingDC, paletteModel.GetBgColor(),
toolsModel.IsBackgroundTransparent());
NotifyImageChanged();
m_hbmMaster = hbmLocked;
m_hbmOld = ::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
}

View File

@@ -10,6 +10,15 @@
/* HISTORYSIZE = number of possible undo-steps + 1 */
#define HISTORYSIZE 11
struct IMAGE_PART
{
CRect m_rcPart;
HBITMAP m_hbmImage;
BOOL m_bPartial;
void clear();
};
class ImageModel
{
public:
@@ -19,13 +28,14 @@ public:
HDC GetDC();
BOOL CanUndo() const { return m_undoSteps > 0; }
BOOL CanRedo() const { return m_redoSteps > 0; }
void PushImageForUndo(HBITMAP hbm = NULL);
void ResetToPrevious(void);
void PushImageForUndo();
void PushImageForUndo(HBITMAP hbm);
void PushImageForUndo(const RECT& rcPartial);
void Undo(BOOL bClearRedo = FALSE);
void Redo(void);
void ClearHistory(void);
void Crop(int nWidth, int nHeight, int nOffsetX = 0, int nOffsetY = 0);
void SaveImage(LPCTSTR lpFileName);
void SaveImage(LPCWSTR lpFileName);
BOOL IsImageSaved() const;
void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX = 0, int nSkewDegY = 0);
int GetWidth() const;
@@ -41,13 +51,16 @@ public:
void NotifyImageChanged();
BOOL IsBlackAndWhite();
void PushBlackAndWhite();
void SelectionClone(BOOL bUndoable = TRUE);
protected:
HDC m_hDrawingDC; // The device context for this class
HBITMAP m_hbmMaster; // The master bitmap
int m_currInd; // The current index in m_hBms
int m_undoSteps; // The undo-able count
int m_redoSteps; // The redo-able count
HBITMAP m_hBms[HISTORYSIZE]; // A rotation buffer of HBITMAPs
IMAGE_PART m_historyItems[HISTORYSIZE]; // A ring buffer of IMAGE_PARTs
HGDIOBJ m_hbmOld;
void SwapPart();
void PushDone();
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Some files were not shown because too many files have changed in this diff Show More