Compare commits

...

256 Commits

Author SHA1 Message Date
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
862 changed files with 21535 additions and 14376 deletions

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

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

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

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

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

@@ -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

@@ -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,20 +1,26 @@
/* 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 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 "Crea, schimbă sau șterge denumirea unui dispozitiv.\n\n\
LABEL [dispozitiv:][denumire]\n\n\
dispozitiv: Specifică litera unui dispozitiv.\n\
denumire Specifică denumirea unui dispozitiv."
STRING_LABEL_TEXT1 "Volumul unității %c: este denumit ca %s\n"
STRING_LABEL_TEXT2 "Volumul unității %c: nu este denumit.\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_LABEL_TEXT4 "Introduceți denumirea unității (opțională, de 32 caractere), apoi ENTER "
STRING_LABEL_PROMPT "Ștergeți denumirea actuală a volumului (Da/Nu)? "
STRING_LABEL_OPTIONS "DaNu"
STRING_ERROR_INVALID_DRIVE "Specificarea unității este eronată\n"
STRING_ERROR_INVALID_LABEL "Invalid volume label\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 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]] < [dispozitiv:][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\
[dispozitiv:][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 opțiunea Caracteristici extinse e activată,\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

@@ -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 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -18,6 +24,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Eroare: Procesele nu au putut fi enumerate.\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

@@ -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

@@ -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

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 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,7 +31,7 @@ END
STRINGTABLE
BEGIN
IDS_ERROR_PRIV "Eșec la instituirea dreptului de încărcare pentru modulul-pilot (0x%X)\n"
IDS_ERROR_PRIV "Eșec la instituirea dreptului de încărcare pentru driverul (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"

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

@@ -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-2023 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

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

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,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

@@ -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
@@ -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

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
@@ -163,7 +164,7 @@ BEGIN
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_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 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -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

@@ -28,7 +28,7 @@ list(APPEND SOURCE
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

@@ -321,7 +321,7 @@ LRESULT CCanvasWindow::OnButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
{
m_ptOrig = pt;
SetCapture();
::SetCursor(::LoadCursor(g_hinstExe, MAKEINTRESOURCE(IDC_HANDDRAG)));
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_HANDDRAG)));
return 0;
}
@@ -357,13 +357,13 @@ LRESULT CCanvasWindow::OnButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
{
case TOOL_BEZIER:
case TOOL_SHAPE:
toolsModel.OnCancelDraw();
toolsModel.OnEndDraw(TRUE);
Invalidate();
break;
case TOOL_FREESEL:
case TOOL_RECTSEL:
toolsModel.OnFinishDraw();
toolsModel.OnEndDraw(FALSE);
Invalidate();
break;
@@ -450,87 +450,16 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
RECT rcImage;
GetImageRect(rcImage);
CString strCoord;
CStringW strCoord;
if (::PtInRect(&rcImage, pt))
strCoord.Format(_T("%ld, %ld"), pt.x, pt.y);
::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
strCoord.Format(L"%ld, %ld", pt.x, pt.y);
::SendMessageW(g_hStatusBar, SB_SETTEXT, 1, (LPARAM)(LPCWSTR)strCoord);
}
}
if (m_drawing)
{
// 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;
}
@@ -582,9 +511,9 @@ 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 };
@@ -630,7 +559,7 @@ LRESULT CCanvasWindow::OnButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
m_drawing = FALSE;
toolsModel.OnButtonUp(bLeftButton, pt.x, pt.y);
Invalidate(FALSE);
::SendMessage(g_hStatusBar, SB_SETTEXT, 2, (LPARAM)_T(""));
::SendMessageW(g_hStatusBar, SB_SETTEXT, 2, (LPARAM)L"");
return 0;
}
else if (m_hitSelection != HIT_NONE && bLeftButton)
@@ -696,7 +625,7 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
if (m_nMouseDownMsg == WM_MBUTTONDOWN)
{
::SetCursor(::LoadCursor(g_hinstExe, MAKEINTRESOURCE(IDC_HANDDRAG)));
::SetCursor(::LoadCursorW(g_hinstExe, MAKEINTRESOURCEW(IDC_HANDDRAG)));
return 0;
}
@@ -717,7 +646,7 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
if (hitSelection != HIT_NONE)
{
if (!setCursorOnSizeBox(hitSelection))
::SetCursor(::LoadCursor(NULL, IDC_SIZEALL));
::SetCursor(::LoadCursorW(NULL, (LPCWSTR)IDC_SIZEALL));
return 0;
}
@@ -730,22 +659,22 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
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;
}
@@ -782,12 +711,12 @@ LRESULT CCanvasWindow::OnCancelMode(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
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;
}
@@ -814,13 +743,13 @@ VOID CCanvasWindow::cancelDrawing()
selectionModel.ClearMaskImage();
m_hitSelection = HIT_NONE;
m_drawing = FALSE;
toolsModel.OnCancelDraw();
toolsModel.OnEndDraw(TRUE);
Invalidate(FALSE);
}
VOID CCanvasWindow::finishDrawing()
{
toolsModel.OnFinishDraw();
toolsModel.OnEndDraw(FALSE);
m_drawing = FALSE;
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)

View File

@@ -43,8 +43,17 @@ enum HITTEST // hit
/* FUNCTIONS ********************************************************/
void ShowOutOfMemory(void);
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))
template <typename T>
inline void Swap(T& a, T& b)
{
T tmp = a;
a = b;
b = tmp;
}

View File

@@ -113,22 +113,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 +172,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 +185,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 +207,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 +232,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 +272,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 +302,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 +328,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 +358,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 +369,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 +398,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 +438,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 +446,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 +477,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 +499,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 = (BOOL)::SendMessage(hwndToolbar, TB_ISBUTTONCHECKED, id, 0);
BOOL bChecked = (BOOL)::SendMessageW(hwndToolbar, TB_ISBUTTONCHECKED, id, 0);
switch (id)
{
@@ -548,14 +543,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 +599,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,7 +228,10 @@ 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 = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSX);
@@ -255,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
{
@@ -355,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);
@@ -381,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
@@ -392,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);
}
}
@@ -403,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];
@@ -413,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;
@@ -597,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

@@ -253,38 +253,37 @@ 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);
::SetRect(&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

@@ -11,11 +11,9 @@
extern BOOL g_askBeforeEnlarging;
extern POINT g_ptStart, g_ptEnd;
extern HINSTANCE g_hinstExe;
extern TCHAR g_szFileName[MAX_LONG_PATH];
extern WCHAR g_szFileName[MAX_LONG_PATH];
extern BOOL g_isAFile;
extern BOOL g_imageSaved;
extern BOOL g_showGrid;

View File

@@ -12,6 +12,14 @@ 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())
@@ -30,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)
@@ -57,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)
@@ -78,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)
@@ -89,42 +113,67 @@ 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)
{
if (m_hBms[i] && i != m_currInd)
{
::DeleteObject(m_hBms[i]);
m_hBms[i] = NULL;
}
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;
HBITMAP hbmMaster = LockBitmap();
part.m_hbmImage = getSubImage(hbmMaster, rcPartial);
UnlockBitmap(hbmMaster);
PushDone();
}
void ImageModel::PushDone()
{
m_currInd = (m_currInd + 1) % HISTORYSIZE; // Go next
if (m_undoSteps < HISTORYSIZE - 1)
m_undoSteps++;
@@ -142,37 +191,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
@@ -188,17 +229,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();
@@ -206,12 +247,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()
@@ -251,15 +292,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;
}
}
@@ -294,23 +334,22 @@ 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
m_hbmMaster = hbmLocked;
m_hbmOld = ::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
}
void ImageModel::SelectionClone(BOOL bUndoable)
@@ -319,7 +358,7 @@ void ImageModel::SelectionClone(BOOL bUndoable)
return;
if (bUndoable)
PushImageForUndo(CopyBitmap());
PushImageForUndo();
selectionModel.DrawSelection(m_hDrawingDC, paletteModel.GetBgColor(),
toolsModel.IsBackgroundTransparent());

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;
@@ -45,9 +55,13 @@ public:
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

View File

Before

Width:  |  Height:  |  Size: 326 B

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

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-bg-BG.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-bg-BG.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-cs-CZ.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-cs-CZ.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-de-DE.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-de-DE.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-en-GB.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-en-GB.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar.bmp"
IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar.bmp"
ID_MENU MENU
BEGIN

View File

@@ -10,7 +10,7 @@
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-es-ES.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-es-ES.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-et-EE.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-et-EE.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_BASQUE, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-eu-ES.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-eu-ES.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-fr-FR.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-fr-FR.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-he-IL.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-he-IL.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-hu-HU.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-hu-HU.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-id-ID.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-id-ID.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-it-IT.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-it-IT.bmp"
ID_MENU MENU
BEGIN

View File

@@ -9,7 +9,7 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-ja-JP.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-ja-JP.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-nl-NL.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-nl-NL.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-no-NO.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-no-NO.bmp"
ID_MENU MENU
BEGIN

View File

@@ -10,7 +10,7 @@
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-pl-PL.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-pl-PL.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-pt-BR.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-pt-BR.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-pt-PT.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-pt-PT.bmp"
ID_MENU MENU
BEGIN

View File

@@ -9,7 +9,7 @@
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-ro-RO.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-ro-RO.bmp"
ID_MENU MENU
BEGIN
@@ -17,8 +17,8 @@ BEGIN
BEGIN
MENUITEM "&Nou\tCtrl+N", IDM_FILENEW
MENUITEM "&Deschidere...\tCtrl+O", IDM_FILEOPEN
MENUITEM "&Păstrează\tCtrl+S", IDM_FILESAVE
MENUITEM "Păst&rare în...", IDM_FILESAVEAS
MENUITEM "&Salvează\tCtrl+S", IDM_FILESAVE
MENUITEM "Salvea&ză ca...", IDM_FILESAVEAS
MENUITEM SEPARATOR
MENUITEM "Din aparat media...", IDM_FILEFROMSCANNERORCAMERA
MENUITEM SEPARATOR
@@ -234,7 +234,7 @@ BEGIN
IDS_WINDOWTITLE "%s - Pictare"
IDS_INFOTITLE "Pictare pentru ReactOS"
IDS_INFOTEXT "Disponibilă sub licența GNU Lesser General Public (vedeți www.gnu.org)"
IDS_SAVEPROMPTTEXT "Doriți păstrarea modificărilor din %s?"
IDS_SAVEPROMPTTEXT "Doriți salvarea modificărilor din %s?"
IDS_DEFAULTFILENAME "Fără nume"
IDS_MINIATURETITLE "Miniatură"
IDS_TOOLTIP1 "Golire selecție"
@@ -267,7 +267,7 @@ BEGIN
IDS_VERTICAL "Vertical"
IDS_PRINTRES "%d x %d pixeli/cm"
IDS_CANTPASTE "Nu a putut fi lipit din clipboard. Formatul de date este fie incorect, fie nesuportat."
IDS_SAVEERROR "Eșec în păstrarea imaginii bitmap („hartă de biți”) în fișierul:\n\n%s"
IDS_SAVEERROR "Eșec în salvarea imaginii bitmap („hartă de biți”) în fișierul:\n\n%s"
IDS_CANTSENDMAIL "Eșec în trimiterea unei scrisori."
IDS_LOSECOLOR "În această operațiune informațiile legate de culoare vor fi pierdute. Sigur veți continua?"
END

View File

@@ -11,7 +11,7 @@
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-ru-RU.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-ru-RU.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-sk-SK.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-sk-SK.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-sq-AL.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-sq-AL.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-sv-SE.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-sv-SE.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-tr-TR.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-tr-TR.bmp"
ID_MENU MENU
BEGIN

View File

@@ -9,7 +9,7 @@
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-uk-UA.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-uk-UA.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,7 +7,7 @@
LANGUAGE LANG_VIETNAMESE, SUBLANG_VIETNAMESE_VIETNAM
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-vi-VN.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-vi-VN.bmp"
ID_MENU MENU
BEGIN

View File

@@ -10,7 +10,7 @@
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-zh-CN.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-zh-CN.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_HONGKONG
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-zh-HK.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-zh-HK.bmp"
ID_MENU MENU
BEGIN

View File

@@ -8,7 +8,7 @@
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-zh-TW.bmp"
//IDB_FONTSTOOLBAR BITMAP "img/fontstoolbar-zh-TW.bmp"
ID_MENU MENU
BEGIN

View File

@@ -7,12 +7,12 @@
#include "precomp.h"
#include <dlgs.h>
#include <mapi.h>
POINT g_ptStart, g_ptEnd;
BOOL g_askBeforeEnlarging = FALSE; // TODO: initialize from registry
HINSTANCE g_hinstExe = NULL;
TCHAR g_szFileName[MAX_LONG_PATH] = { 0 };
WCHAR g_szFileName[MAX_LONG_PATH] = { 0 };
WCHAR g_szMailTempFile[MAX_LONG_PATH] = { 0 };
BOOL g_isAFile = FALSE;
BOOL g_imageSaved = FALSE;
@@ -22,20 +22,32 @@ CMainWindow mainWindow;
/* FUNCTIONS ********************************************************/
void ShowOutOfMemory(void)
{
WCHAR szText[256];
::FormatMessageW(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
ERROR_OUTOFMEMORY,
0,
szText, _countof(szText),
NULL);
mainWindow.MessageBox(szText, NULL, MB_ICONERROR);
}
// get file name extension from filter string
static BOOL
FileExtFromFilter(LPTSTR pExt, OPENFILENAME *pOFN)
FileExtFromFilter(LPWSTR pExt, OPENFILENAME *pOFN)
{
LPTSTR pchExt = pExt;
LPWSTR pchExt = pExt;
*pchExt = 0;
DWORD nIndex = 1;
for (LPCTSTR pch = pOFN->lpstrFilter; *pch; ++nIndex)
for (LPCWSTR pch = pOFN->lpstrFilter; *pch; ++nIndex)
{
pch += lstrlen(pch) + 1;
if (pOFN->nFilterIndex == nIndex)
{
for (++pch; *pch && *pch != _T(';'); ++pch)
for (++pch; *pch && *pch != L';'; ++pch)
{
*pchExt++ = *pch;
}
@@ -43,7 +55,7 @@ FileExtFromFilter(LPTSTR pExt, OPENFILENAME *pOFN)
CharLower(pExt);
return TRUE;
}
pch += lstrlen(pch) + 1;
pch += wcslen(pch) + 1;
}
return FALSE;
}
@@ -53,19 +65,19 @@ static UINT_PTR APIENTRY
OFNHookProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HWND hParent;
OFNOTIFY *pon;
OFNOTIFYW *pon;
WCHAR Path[MAX_PATH];
switch (uMsg)
{
case WM_NOTIFY:
pon = (OFNOTIFY *)lParam;
pon = (OFNOTIFYW *)lParam;
if (pon->hdr.code == CDN_TYPECHANGE)
{
hParent = GetParent(hwnd);
TCHAR Path[MAX_PATH];
SendMessage(hParent, CDM_GETFILEPATH, _countof(Path), (LPARAM)Path);
FileExtFromFilter(PathFindExtension(Path), pon->lpOFN);
SendMessage(hParent, CDM_SETCONTROLTEXT, 0x047c, (LPARAM)PathFindFileName(Path));
lstrcpyn(pon->lpOFN->lpstrFile, Path, pon->lpOFN->nMaxFile);
SendMessageW(hParent, CDM_GETFILEPATH, _countof(Path), (LPARAM)Path);
FileExtFromFilter(PathFindExtensionW(Path), pon->lpOFN);
SendMessageW(hParent, CDM_SETCONTROLTEXT, cmb13, (LPARAM)PathFindFileNameW(Path));
StringCchCopyW(pon->lpOFN->lpstrFile, pon->lpOFN->nMaxFile, Path);
}
break;
}
@@ -182,21 +194,22 @@ BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName)
return FALSE; // Failure
}
BOOL CMainWindow::GetOpenFileName(IN OUT LPTSTR pszFile, INT cchMaxFile)
BOOL CMainWindow::GetOpenFileName(IN OUT LPWSTR pszFile, INT cchMaxFile)
{
static OPENFILENAME ofn = { 0 };
static CString strFilter;
static OPENFILENAMEW ofn = { 0 };
static CStringW strFilter;
if (ofn.lStructSize == 0)
{
// The "All Files" item text
CString strAllPictureFiles;
CStringW strAllPictureFiles;
strAllPictureFiles.LoadString(g_hinstExe, IDS_ALLPICTUREFILES);
// Get the import filter
CSimpleArray<GUID> aguidFileTypesI;
CImage::GetImporterFilterString(strFilter, aguidFileTypesI, strAllPictureFiles,
CImage::excludeDefaultLoad, _T('\0'));
CImage::excludeDefaultLoad, L'|');
strFilter.Replace(L'|', UNICODE_NULL);
// Initializing the OPENFILENAME structure for GetOpenFileName
ZeroMemory(&ofn, sizeof(ofn));
@@ -210,20 +223,21 @@ BOOL CMainWindow::GetOpenFileName(IN OUT LPTSTR pszFile, INT cchMaxFile)
ofn.lpstrFile = pszFile;
ofn.nMaxFile = cchMaxFile;
return ::GetOpenFileName(&ofn);
return ::GetOpenFileNameW(&ofn);
}
BOOL CMainWindow::GetSaveFileName(IN OUT LPTSTR pszFile, INT cchMaxFile)
BOOL CMainWindow::GetSaveFileName(IN OUT LPWSTR pszFile, INT cchMaxFile)
{
static OPENFILENAME sfn = { 0 };
static CString strFilter;
static OPENFILENAMEW sfn = { 0 };
static CStringW strFilter;
if (sfn.lStructSize == 0)
{
// Get the export filter
CSimpleArray<GUID> aguidFileTypesE;
CImage::GetExporterFilterString(strFilter, aguidFileTypesE, NULL,
CImage::excludeDefaultSave, _T('\0'));
CImage::excludeDefaultSave, L'|');
strFilter.Replace(L'|', UNICODE_NULL);
// Initializing the OPENFILENAME structure for GetSaveFileName
ZeroMemory(&sfn, sizeof(sfn));
@@ -239,7 +253,7 @@ BOOL CMainWindow::GetSaveFileName(IN OUT LPTSTR pszFile, INT cchMaxFile)
if (*pchDotExt == UNICODE_NULL)
{
// Choose PNG
wcscat(pszFile, L".png");
StringCchCatW(pszFile, cchMaxFile, L".png");
for (INT i = 0; i < aguidFileTypesE.GetSize(); ++i)
{
if (aguidFileTypesE[i] == Gdiplus::ImageFormatPNG)
@@ -253,7 +267,7 @@ BOOL CMainWindow::GetSaveFileName(IN OUT LPTSTR pszFile, INT cchMaxFile)
sfn.lpstrFile = pszFile;
sfn.nMaxFile = cchMaxFile;
return ::GetSaveFileName(&sfn);
return ::GetSaveFileNameW(&sfn);
}
BOOL CMainWindow::ChooseColor(IN OUT COLORREF *prgbColor)
@@ -285,9 +299,9 @@ BOOL CMainWindow::ChooseColor(IN OUT COLORREF *prgbColor)
HWND CMainWindow::DoCreate()
{
::LoadString(g_hinstExe, IDS_DEFAULTFILENAME, g_szFileName, _countof(g_szFileName));
::LoadStringW(g_hinstExe, IDS_DEFAULTFILENAME, g_szFileName, _countof(g_szFileName));
CString strTitle;
CStringW strTitle;
strTitle.Format(IDS_WINDOWTITLE, PathFindFileName(g_szFileName));
RECT& rc = registrySettings.WindowPlacement.rcNormalPosition;
@@ -296,7 +310,7 @@ HWND CMainWindow::DoCreate()
// entry point
INT WINAPI
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nCmdShow)
wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, INT nCmdShow)
{
g_hinstExe = hInstance;
@@ -312,7 +326,7 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nC
// Create the main window
if (!mainWindow.DoCreate())
{
MessageBox(NULL, TEXT("Failed to create main window."), NULL, MB_ICONERROR);
MessageBox(NULL, L"Failed to create main window.", NULL, MB_ICONERROR);
return 1;
}
@@ -324,7 +338,7 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nC
mainWindow.ShowWindow(registrySettings.WindowPlacement.showCmd);
// Load the access keys
HACCEL hAccel = ::LoadAccelerators(hInstance, MAKEINTRESOURCE(800));
HACCEL hAccel = ::LoadAcceleratorsW(hInstance, MAKEINTRESOURCEW(800));
// The message loop
MSG msg;
@@ -333,7 +347,7 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nC
if (fontsDialog.IsWindow() && fontsDialog.IsDialogMessage(&msg))
continue;
if (::TranslateAccelerator(mainWindow, hAccel, &msg))
if (::TranslateAcceleratorW(mainWindow, hAccel, &msg))
continue;
::TranslateMessage(&msg);

View File

@@ -36,8 +36,8 @@ HWND CMiniatureWindow::DoCreate(HWND hwndParent)
(LONG)(registrySettings.ThumbYPos + registrySettings.ThumbHeight)
};
TCHAR strTitle[100];
::LoadString(g_hinstExe, IDS_MINIATURETITLE, strTitle, _countof(strTitle));
WCHAR strTitle[100];
::LoadStringW(g_hinstExe, IDS_MINIATURETITLE, strTitle, _countof(strTitle));
DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME;
return Create(hwndParent, rc, strTitle, style, WS_EX_PALETTEWINDOW);

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