Commit graph

1599 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 898fb5f414 [MSPAINT] Move CHECKED_IF and ENABLED_IF macros and improve
Refactoring. CORE-19094
2023-11-24 10:39:16 +09:00
Katayama Hirofumi MZ e52379a61c [MSPAINT] Delete redundant comments
Refactoring. CORE-19094
2023-11-24 10:34:39 +09:00
Katayama Hirofumi MZ 2d5bb5ffbf [MSPAINT] Delete common.h and move code to precomp.h
Refactoring. CORE-19094
2023-11-24 10:25:47 +09:00
Katayama Hirofumi MZ 470d86f1e5 [MSPAINT] Delete globalvar.h and move code to precomp.h
Refactoring. CORE-19094
2023-11-24 10:12:37 +09:00
Hermès Bélusca-Maïto c77a5ff99b
Revert my last commits that break build.
Revert "[PSDK][AFD][VGADDI] Further build and MS PSDK compatibility fixes."
This reverts commit 99efc2ae50.

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

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

Revert "[PSDK] Use the new .rh files in winresrc.h"
This reverts commit f6fb7c48c9.
2023-11-23 17:20:47 +01:00
Hermès Bélusca-Maïto 84e4ad0a82
[OSK][PROGMAN] Fix resource file build. 2023-11-23 16:25:33 +01:00
Katayama Hirofumi MZ bf13ebda44 [MSPAINT] Delete winproc.cpp and move code to main.cpp
Refactoring. This will reduce build time a little.
CORE-19094
2023-11-23 17:14:32 +09:00
Katayama Hirofumi MZ af4a3fac7d [MSPAINT] Rename winproc.h as main.h
Refactoring. CORE-19094
2023-11-23 17:06:32 +09:00
Katayama Hirofumi MZ c20b4ca29e [MSPAINT] Simplify mouse.cpp with deleting ctors
Refactoring. CORE-19094
2023-11-23 16:46:40 +09:00
Katayama Hirofumi MZ 96e48dcd01 [MSPAINT] ToolBase::m_tool is not used. Delete it
Refactoring. CORE-19094
2023-11-23 16:37:13 +09:00
Katayama Hirofumi MZ 1aeebfdacb [MSPAINT] Simplify RECT/CRect handling
Refactoring. CORE-19094
2023-11-23 15:19:50 +09:00
Katayama Hirofumi MZ f935132fbe [MSPAINT] Add selectionModel.moveSelection and use it
Refactoring. CORE-19094
2023-11-23 14:44:27 +09:00
Katayama Hirofumi MZ 58c26d3fe6 [MSPAINT] Simplify CanvasToImage
Refactoring. CORE-19094
2023-11-23 14:22:40 +09:00
Katayama Hirofumi MZ 4a52a4b04c [MSPAINT] Add selectionModel.drawFrameOnCanvas and use it
Refactoring. CORE-19094
2023-11-23 11:03:10 +09:00
Katayama Hirofumi MZ c2bb5aa01d [MSPAINT] Add selectionModel.hitTest and use it
Refactoring. CORE-19094
2023-11-23 10:31:24 +09:00
Katayama Hirofumi MZ e579220098
[MSPAINT] Introduce partial image history, Part 2 (#6005)
Follow-up to #5994. Reduce the lag and the
cost of drawing on large image.
- Introduce partial image history on
  SmoothDrawTool and ShapeTool.
- We can draw with pen smoothly even
  when the image is huge (10000x10000).
CORE-19237
2023-11-23 07:14:57 +09:00
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
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 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 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
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
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
Andrei Miloiu bd9e2d6beb
[FIND] Update Romanian (ro-RO) translation (#5965) 2023-11-15 11:27:09 +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 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 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
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
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 e743146a10
[FIND] Update Romanian (ro-RO) translation (#5937) 2023-11-13 10:51:38 +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 5ee25ee392
[DXDIAG] Update Romanian (ro-RO) translation (#5910) 2023-11-08 19:58:21 +01: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 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
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
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
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
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 d21def4819
[MSPAINT] Use <winuser.rh> instead of <winuser.h> in rsrc.rc (#5883)
CORE-19094
2023-11-04 21:53:04 +09: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 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 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
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
Katayama Hirofumi MZ 6d7aaaade0 [MSPAINT] Delete needless ImageModel::ResetToPrevious
CORE-19094
2023-10-31 11:13:54 +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
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
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
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
Joachim Henze 63eaf2bd52
[TASKMGR] *.rc Deduplicate dynamic menu strings (#5772)
Some of the Menu-controls are just dummies in the RC,
because those controls are dynamically replaced at runtime
based on which tab/propsheet is active in taskmgr.
They are replaced by the IDS_MENU_* strings then.

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


* Aside of that improve alignment in some languages rcs in the "Shutdown"-menu-section,
* and improve a translation in de-DE, sq-AL, and zh-CN.
* [TASKMGR] id-ID.rc 2 accelerators in the same string is definitely wrong
* [TASKMGR] *.rc, make sure that warning is in all 30 langs, especially in en-US.rc
* [TASKMGR] for several translations add FIXME-comments regarding accelerator collisions
2023-10-19 10:19:20 +00:00
Katayama Hirofumi MZ 97e53c6963
[MSPAINT] Implement mouse middle button dragging (#5804)
- Handle WM_MBUTTONDOWN and
  WM_MBUTTONUP messages.
- Implement dragging by mouse middle button.
- Add IDC_HANDDRAG cursor resource.
CORE-19094
2023-10-17 15:58:34 +09:00
Katayama Hirofumi MZ f49919ce5d
[MSPAINT] Simplify canvas mouse message handling (#5803)
- Unify some mouse message handlers of
  CCanvasWindow.
- Add CCanvasWindow::m_nMouseDownMsg 
  member.
CORE-19094
2023-10-17 13:48:19 +09:00
Katayama Hirofumi MZ 8f1eb03ad2
[MSPAINT] Improve Zoom tool (#5798)
- Delete global zoomTo function.
- Add CCanvasWindow::zoomTo and
  CCanvasWindow::getNewZoomRect functions.
- Rename CCanvasWindow::updateScrollInfo as
  CCanvasWindow::updateScrollRange.
- Rename CCanvasWindow::resetScrollPos as
  CCanvasWindow::updateScrollPos.
- Draw the proper zoom rectangle on mouse move.
- Revert the active tool on click when the tool
  was Zoom.
CORE-19094
2023-10-17 07:25:50 +09:00
Katayama Hirofumi MZ fd1e158480
[MSPAINT] Calculate intersection to reduce bits transfer (#5795)
Drawing lines smoothly on big image.
- In CCanvasWindow::DoDraw, calculate the
  intersection to reduce bits transfer.
- Improve SmoothDrawTool in handling Shift key.
CORE-19094, CORE-19237
2023-10-16 09:09:40 +09:00
Katayama Hirofumi MZ 1c4bf2d702 [MSPAINT] Don't include useless <mapicode.h>
CORE-19094
2023-10-13 18:07:55 +09:00
Katayama Hirofumi MZ 1183e797b4
[MSPAINT] Reset scroll position in some situations (#5789)
In some situations, the scroll position should be reset.
- Add CCanvasWindow::resetScrollPos method.
- Reset the scroll position on loading a file.
- Reset the scroll position on mirroring/rotating
  the image.
CORE-19094
2023-10-12 22:59:17 +09:00
Katayama Hirofumi MZ 9a51c8e6c6
[MSPAINT][NOTEPAD][REGEDIT] Don't use CRTDBG for these apps (#5788)
Don't include <crtdbg.h>.
Don't use _CrtSetDbgFlag.
2023-10-12 22:53:02 +09:00
Katayama Hirofumi MZ 70d5c864bc [MSPAINT] Do type-cast (float) for xDpi and yDpi
CORE-19094
2023-10-12 19:43:29 +09:00
Katayama Hirofumi MZ 409df2355e [MSPAINT] Do type-cast (BYTE) for lfItalic and lfUnderline
CORE-19094
2023-10-12 19:38:41 +09:00
Katayama Hirofumi MZ 4306e261ee [MSPAINT] Do type-cast (BOOL) for TB_ISBUTTONCHECKED return
CORE-19094
2023-10-12 19:31:22 +09:00
Katayama Hirofumi MZ bc28675a44 [MSPAINT] s/WINBOOL/BOOL/
CORE-19094
2023-10-12 19:13:20 +09:00
Katayama Hirofumi MZ 62eeb158a5
[MSPAINT] Improve Zoom tool (#5781)
- Delete CCanvasWindow::drawZoomFrame.
- Invalidate the canvas on mouse move when
  the active tool is Zoom tool.
- Add ZoomTool::OnDrawOverlayOnCanvas to
  draw the zoom rectangle without flickering.
- Improve the zoom trackbar position.
- Display the zoom rate on changing the value
  of the zoom trackbar.
- Reverse the direction of the zoom trackbar.
- Don't draw the focus rectangle.
CORE-19215, CORE-19216
2023-10-10 10:59:29 +09:00
Katayama Hirofumi MZ 0c164f081a
[MSPAINT] Check out of image in updating status bar (#5779)
Check out of the image by using ::PtInRect and CCanvasWindow::GetImageRect.
If out, then don't show the status bar text.
CORE-19219
2023-10-09 08:39:31 +09:00
Katayama Hirofumi MZ 611d89eb8b
[MSPAINT] Add border width to tool box (#5780)
Make tool box pixel-perfect. Add two border widths to the tool box.
CORE-19217
2023-10-09 08:37:31 +09:00
Katayama Hirofumi MZ 8d8f4d328c
[MSPAINT] Zoom tool shouldn't use undo buffer (#5778)
Remove PushImageForUndo call in Zoom tool. CORE-19214
2023-10-09 08:07:02 +09:00
Joachim Henze 42c93e3cbb
[TASKMGR] *.rc: Fix accelerator collisions &Priority <-> &Properties (#5758)
We had collisions in many languages.
For most languages (which are derived from en-US) we should use
&Priority
P&roperties

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


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

the existing de-DE also has been double-checked to exactly match MS with the accelerators in that menu.
2023-10-07 23:03:47 +00:00
Katayama Hirofumi MZ 1a90009bb9
[MSPAINT] Update scroll info on loading file (#5761)
The scroll info was not updated when the file is loading.
- Rename CCanvasWindow::Update as CCanvasWindow::updateScrollInfo.
- Update scroll info on ImageModel::NotifyImageChanged.
- Improve ImageModel::ClearHistory.
CORE-19094
2023-10-05 20:01:41 +09:00
Katayama Hirofumi MZ 3579ea7888
[MSPAINT] Fix assertion failure on text tool (#5762)
Kill the assertion failure on choosing text tool.
Check whether textEditWindow is not null by using IsWindowVisible.
CORE-19094
2023-10-05 19:51:36 +09:00
Joachim Henze 46b4b5581d
[TASKMGR] Favor _countof(), no functional change intended (#5757)
Taskmgr used a mixture: Sometimes _countof(), sometimes ARRAYSIZE()
and sometimes it calculated the count plain by sizeof(var)/sizeof(TYPE).
Harmonize everywhere to _countof() as it is the shortest solution.

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

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

Fix wrong indentation level in TaskManagerWndProc().

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

No functional change intended.
2023-10-03 21:00:10 +02:00
Joachim Henze 6528ab8fcb [TASKMGR] de-DE.rc Update part 3
I spotted yet another flip:
translation of IDS_TAB_PFDELTA and IDS_TAB_VMSIZE were flipped.

I spotted that by toggling all columns off entirely
in the View-Options dialog where the columns can be selected
and then added only one column at a time. I did that for all options.

I do recommend translators of other langs to do the same test,
I was shocked about the amount of bugs I spotted for german.
And it is very subtle / easy to miss, if you enable/disable multiple columns
together!

Let's call it a day now!
2023-10-03 06:31:04 +02:00
Joachim Henze 65ce20896a [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
This is an addendum to 0.4.15-dev-413-g ed7196d964

binary size shrinks slightly although that dlg was unused:
taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg  715.264 -> 708.608
2023-10-03 03:50:41 +02:00
Joachim Henze 142c35fcce [TASKMGR] de-DE.rc Update
GRAPH == 'Anzeige'. Addendum to last commit
2023-10-03 02:47:10 +02:00
Joachim Henze e15d68ba5d [TASKMGR] de-DE German Update & bug-fixes
This fixes several issues:
- add a few missing translations, e.g. ID_PROCESS_PAGE_PROPERTIES & ID_PROCESS_PAGE_OPENFILELOCATION
- IDS_TAB_PEAKMEMUSAGE translation was flipped with IDS_TAB_MEMDELTA
- IDC_MEM_USAGE_FRAME had text truncation, fix that by structurally switching to "Speicher"
- waste less space for the listview headers in the Processes tab so user can display more columns conveniently without the headers unnecessarily being crippled to "..."
- Sync some controls sizes back to en-US in the performance tab
- Translation for ID_VIEW_CPUHISTORY_ONEGRAPHALL and ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU was swapped accidentally
- Strip comment lines in the end, which were outdated anyway
- avoid monsters that not even a german person can read like "Auslagerungsdateiauslastungs-Verlaufsanzeige" which is like "Donaudampfschifffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft"
2023-10-03 02:05:28 +02:00
Sarthak Roy 4ba8af9cae
[CALC] Use pragma once for calc.h (#5754)
It's simpler and only needs to be included once at the beginning of the
header file. It generates an unique identifier for the file automatically,
so maintainers wouldn't need to choose unique names for the macros.
It will be helpful if any future refactoring takes place.

Signed-off-by: Sarthak Roy <sarthakroy2002@gmail.com>
2023-10-02 00:58:32 +03:00
Katayama Hirofumi MZ 945ee4b2a4
[MSPAINT] Larger/smaller Rubber/AirBrush on Ctrl+Plus/Minus (#5740)
- Enable changing rubber/airbrush thickness by Ctrl+Plus / Ctrl+Minus
  key combination in TOOL_AIRBRUSH and TOOL_RUBBER.
CORE-19094
2023-09-28 21:54:32 +09:00
Katayama Hirofumi MZ 8a4787b384
[MSPAINT] Larger/smaller brush nib on Ctrl+Plus/Minus (#5739)
- Introduce the concept of "brush width" to the
  tools model.
- Enable changing the brush width by Ctrl+Plus/Minus
  key combination in TOOL_BRUSH.
- Re-define brush styles.
CORE-19094
2023-09-28 21:30:34 +09:00
Katayama Hirofumi MZ f2a012240f
[MSPAINT] Larger/smaller pen nib on Ctrl+Plus/Minus (#5738)
- Introduce the concept of pen width (not line width) to the tools model.
- Enable changing pen/line width by Ctrl+Plus/Minus key combination in TOOL_PEN,
  TOOL_LINE, TOOL_BEZIER, TOOL_RECT, TOOL_SHAPE, TOO_ELLIPSE, and
  TOOL_RRECT tools.
CORE-19094
2023-09-28 16:32:36 +09:00
Katayama Hirofumi MZ cbc63d876c
[MSPAINT] "Selection Clone" and "Selection Brush" (#5734)
- Stamp the image of the selection when the user clicks on
  the selection while holding down the Ctrl key.
- Draw the image of the selection continuously when the user
  starts dragging the selection while holding down the Shift key.
CORE-19094
2023-09-28 07:34:25 +09:00
Katayama Hirofumi MZ 389d04650f
[MSPAINT] Restrict drawing direction on Shift key (#5726)
- While holding down the Shift key, drawing lines with the
  pen/brush is limited to either of 8 directions (horizontal/vertical/diagonal).
- s/abs/labs/
CORE-19094
2023-09-26 22:47:23 +09:00
Katayama Hirofumi MZ ed9973f876
[MSPAINT] Introduce Ctrl+Plus / Ctrl+Minus (#5717)
- Add Ctrl+Plus and Ctrl+Minus accelerators.
- Add IDM_CTRL_PLUS and IDM_CTRL_MINUS
  commands.
- Stretch the selection area on IDM_CTRL_PLUS
  and IDM_CTRL_MINUS actions.
CORE-19094
2023-09-23 09:26:11 +09:00
Katayama Hirofumi MZ bbb33a6ed5
[MSPAINT] Don't show error message twice (#5715)
- Reduce display of error message on IDM_EDITCOPYTO and IDM_EDITPASTEFROM.
- Introduce LockBitmap/UnlockBitmap mechanism for ImageModel and SelectionModel.
CORE-19181, CORE-19182
2023-09-22 10:48:13 +09:00
Katayama Hirofumi MZ 98050f9139
[MSPAINT] Don't copy bits on resizing (#5716)
- Fix the graphical glitches on resizing and moving toolbars.
- Add SWP_NOCOPYBITS flag on positioning controls on resizing of main window.
CORE-19137
2023-09-22 07:35:03 +09:00
Katayama Hirofumi MZ ea5d2c5f7a
[MSPAINT][SDK] Add <ui/CWaitCursor.h> (#5680)
CORE-19094
2023-09-12 05:39:08 +09:00
Katayama Hirofumi MZ e4512e6af2 [MSPAINT] IDM_IMAGEROTATEMIRROR: Fix indent
Follow-up to #5660. CORE-19094
2023-09-11 07:44:39 +09:00
Katayama Hirofumi MZ 993a45024e
[MSPAINT] Use wait cursor (#5660)
- Implement CWaitCursor class in newly-added "waitcursor.h".
- Use CWaitCursor to manage the wait cursor.
- Improve WM_SETCURSOR handlings.
CORE-19094
2023-09-10 22:28:28 +09:00
Katayama Hirofumi MZ 0ef9cfb04e
[NOTEPAD] Use wait cursor (#5659)
- Add WaitCursor helper function to display the wait cursor while
  heavy operation.
- Manage the wait cursor by using a lock count.
CORE-18837
2023-09-10 22:27:16 +09:00
Stanislav Motylkov 995d255962 [REACTOS] Fix various '% s' typos with a space
- [NOTEPAD][REGEDIT][SHELL32] were affected.
- Also while being here, fix headers.
2023-09-07 00:34:02 +03:00
Katayama Hirofumi MZ 289dec6c39
[NOTEPAD] Do type cast to kill C4244 warnings (#5655)
- Do type cast to int from SendMessage return value.
- Fix usage of EM_GETSEL and EM_LINEINDEX messages.
CORE-18837
2023-09-06 19:26:23 +09:00
Katayama Hirofumi MZ 3f921d1119
[NOTEPAD] Use StringCchPrintf instead (#5654)
Use preferred string functions. CORE-18837
2023-09-05 22:36:18 +09:00
Carl J. Bialorucki f0995dac58
[LOGON] Several improvements for screensaver (#5641)
- Currently the logo moves around every two seconds. This is not consistent
  with Windows Server 2003 (and other versions) and is very distracting.
  Increase the interval to every ten seconds, which matches Win2003.

- There are currently two identical copies of the logo bitmap in the
  screensaver. Use only one copy of the logo bitmap.

- Shrink the space around the logo bitmap. This should save some disk space
  but more importantly allow the logo to reach closer to the edges of the
  screen, similar to Win2003.

- Remove unneeded includes.
2023-09-03 21:18:23 +02:00
Tibor Lajos Füzi 3068422d51
[TRANSLATION] Update hungarian translation for mspaint, notepad, taskmgr, explorer, appwiz, browseui, msgina, shell32 (#5645) 2023-09-03 17:46:38 +02:00
Hermès Bélusca-Maïto df9c3de5ba
[DXDIAG] Remove a "redundant" GetTimeZoneInformation() call.
Indeed, the next SystemTimeToTzSpecificLocalTime() call, when done with
a NULL TIME_ZONE_INFORMATION* 1st parameter, uses the currently active
time zone, which is exactly what the GetTimeZoneInformation() call was
doing.

And note that the original code was incorrectly validating the returned
value from GetTimeZoneInformation() -- the code was assuming the function
returns a boolean, instead of checking for TIME_ZONE_ID_INVALID.
2023-09-02 21:53:08 +02:00
Andrei Miloiu f1549bc251
[REGEDIT] Update Romanian (ro-RO) translation (#5632) 2023-09-02 15:44:10 +02:00
Katayama Hirofumi MZ c8a990845b [CLIPBRD] Add Japanese (ja-JP) translation
CORE-18706
2023-09-02 11:27:43 +09:00
Katayama Hirofumi MZ 823b51558d [REGEDIT] Update Japanese (ja-JP) tranlation Part 2
CORE-18706
2023-08-31 21:01:56 +09:00
Katayama Hirofumi MZ 389377ce2a [REGEDIT] Update Japanese (ja-JP) translation
CORE-18706
2023-08-31 20:45:25 +09:00
Katayama Hirofumi MZ c16f93c5f3
[REGEDIT] Support exporting registry to text file (#5619)
- Add txtproc.c source file.
- Add some resource strings.
- Add *.txt filter to export on a text file.
CORE-16910
2023-08-30 21:43:09 +09:00
Katayama Hirofumi MZ d8a4eb3cc9 [SNDREC32] Improve Japanese (ja-JP) translation
CORE-18706
2023-08-27 21:45:03 +09:00
Katayama Hirofumi MZ fc9baff5d7
[CALC] Use CW_USEDEFAULT16 for Dialog X (#5621)
- Use CW_USEDEFAULT16 (0x8000) for the X coordinate of IDD_DIALOG_SCIENTIFIC,
  IDD_DIALOG_STANDARD, and IDD_DIALOG_CONVERSION dialogs.
https://stackoverflow.com/a/76201122/4381493
BEFORE:
https://github.com/reactos/reactos/assets/2107452/e16ce819-05a9-483a-aacb-b93caaacff5a
The starting position wouldn't change from upper left corner (0, 0) of the screen.
AFTER:
https://github.com/reactos/reactos/assets/2107452/569ae41b-b545-4eb0-8848-d25dbc5d4699
The starting position is changing.
CORE-19141
2023-08-27 19:46:56 +09:00
Katayama Hirofumi MZ f90a1956a5
[CLIPBRD] Support CF_HDROP format (#5622)
This allows to see what files are being copied into clipboard.
CORE-19140
2023-08-27 19:41:13 +09:00
Hermès Bélusca-Maïto cdba812252
[TASKMGR] Simplify status-bar display when menus are shown (#5578)
CORE-19061

Following PR #5571 (commit 2d53e953c), it became apparent that the
management of the status-bar when showing the menu hints could be
simplified further.

Use "simple-text" status-bar display mode when showing menu hints.
The original status-bar panes state is "remembered" and are automatically
restored when the "simple-text" mode is disabled.
2023-08-24 16:47:32 +02:00
Stanislav Motylkov dafa00b554 [MSPAINT] Sync translations between the main and popup menus
Also some minor corrections and fixes for mnemonic keys.
2023-08-20 12:06:08 +03:00
Katayama Hirofumi MZ 455c1fe1b9
[MSPAINT] Speed up for black and white (#5563)
Follow-up to #5554.
- Speed up ImageModel::PushBlackAndWhite
  by using GetDIBits and SetDIBits.
CORE-19094
2023-08-20 16:46:18 +09:00
Andrei Miloiu 9293388c61
[MSPAINT] Update Romanian (ro-RO) translation (#5564) 2023-08-18 13:04:31 +03:00
Egor Ananyin 2d53e953cd
[TASKMGR] Do not disable status bar when opening system menu (#5571)
We do not need to clean the status bar when opening the system menu as it does not show any hints.

CORE-19061
2023-08-15 21:37:27 +02:00
Katayama Hirofumi MZ c763713475 [MSPAINT] Update Japanese (ja-JP) translation
CORE-18706
2023-08-13 10:09:18 +09:00
Stanislav Motylkov a970c50a83 [MSPAINT] Update Russian (ru-RU) translation
Addendum to ba53f72a87 and e6c23361a1.
2023-08-11 15:52:46 +03:00
Hermès Bélusca-Maïto ec0cc847b9
[ATTRIB] De-duplicate code; handle reparse points; verify path concatenation (#4215)
- Simplify duplicated code by having one EnumFiles() function using
  callbacks to perform actual action on enumerated files.

  PrintAttribute() and ChangeAttribute() duplicate their functionality,
  except for the actual difference of displaying the file attributes vs.
  changing them.
  Instead, move that per-file action into two callbacks, create a file
  enumerator function that contains the common functionality, and make
  it call the callback passed in parameter to it.

- Reparse points can be encountered during enumeration. In this case,
  don't try to go into too many reparse-point levels (maximum two).

- Verify that paths/file names concatenation don't overflow (with the
  StringCch* functions returning an error), as this could cause an
  infinite loop in case of recursive-enumeration, and the position where
  the new path part would be appended turns out to be just at the end
  of the buffer.
2023-08-11 13:49:27 +02:00
Katayama Hirofumi MZ e6c23361a1
[MSPAINT] Support converting to black and white (#5554)
- Add ImageModel::IsBlackAndWhite and ImageModel::PushBlackAndWhite
  helper functions.
- Add CAttributesDialog::m_bBlackAndWhite.
- If IDD_ATTRIBUTESRB4 is checked, then make
  the bitmap black and white.
- Add IDS_LOSECOLOR to show message.
CORE-19094
2023-08-11 20:27:12 +09:00
Katayama Hirofumi MZ 893715b722
[MSPAINT] Fix focus and radiobuttons of some dialogs (#5537)
- Return TRUE on WM_INITDIALOG handling to set focus.
- Check if the radiobutton is checked on the radiobutton action
  (considering BN_SETFOCUS etc.).
CORE-18011
2023-08-10 08:20:55 +09:00
Katayama Hirofumi MZ ba53f72a87
[MSPAINT] Send mail with image (retry) (#5404)
- Add OpenMailer function.
- Add IDS_CANTSENDMAIL.
- Send a mail by using mapi32!MAPISendMail/W.
- Extend SaveDIBToFile function by adding a
  parameter.
CORE-19094
2023-08-09 23:59:34 +09:00
Serge Gautherie 016acd170d
[REACTOS] Do not free shared icon for ShellAbout() calls (#5519)
CORE-18369
2023-08-09 11:53:13 +02:00
Andrew Dent 815d55c378
[REACTOS] British English spellings (#5533)
Fix spellings for en-GB:
- Centre.
- Colour.
- Customise.
- Unauthorise.
2023-08-09 11:48:59 +02:00
Katayama Hirofumi MZ 70e05170cf
[MSPAINT][ATL] Delete deprecated functions (#5542)
- Rewrite CImageDx to reduce improper dependency with CImage.
- Check if the filename extension is supported before saving the files.
- Delete deprecated functions in CImage.
CORE-19094
2023-08-09 08:17:07 +09:00
Carl J. Bialorucki f65c03a28c
[SOLITAIRE] Use the shell about dialog for solitaire and spider (#5493)
Use the shell about dialog for solitaire and spider solitaire.
This increases visual consistency throughout the operating system
and matches the behavior of the game from Windows XP.

- Use the shell about dialog instead of a plain MessageBox.
- Since the shell about dialog can only handle two lines of text,
  shorten the message dialog text to two lines.
2023-08-04 01:50:39 +03:00
Andrew Dent e5993f13f0
[REACTOS] Optimize PNG images (#5492)
* [PIFMGR] Optimize png images

- Lossless optimization with `pngslim`. Saves ~50%.
- Restricted to RGBA color mode (‘c6’), for maximum compatibility at the cost of some compression.

* [ROSAPPS] Optimize png image

- Lossless optimization with `pngslim`. Saves ~10%.

* [MSTSC] Optimize png image

- Lossless optimization with `pngslim`. Saves ~56%.
- Restricted to RGBA color mode (‘c6’), for maximum compatibility at the cost of some compression.

* [Themes] Optimize png image

- Lossless optimization with `pngslim`. Saves ~20%.
- Restricted to RGB color mode (‘c2’), for maximum compatibility.
2023-07-30 22:32:34 +02:00
Andrew Dent 8f3a09722e
[MSPAINT] Optimize images for help docs (#5486)
Lossless optimization of png images using `pngslim`.

Saves some bytes. No code changes.
2023-07-26 19:58:29 +03:00
Thamatip Chitpong 41e3badc9a
[TASKMGR] Process page: Don't hardcode string length (#5490)
Addendum to 59dcec1 (#4323).
2023-07-26 23:26:20 +07:00
Katayama Hirofumi MZ 52bc5f7c5d
[IEXPLORE][IEFRAME][SHELL32] Add Internet icon on Desktop (#5451)
- Add Internet icon on Desktop. You can hide/show
  the icon from Desktop's customization.
- Modify "HKCR\CLSID\%CLSID_Internet%" registry key.
- Add IDS_INTERNET and IDS_INTERNET_DESCRITION into ieframe.dll.
- Modify folders/CDesktopFolder.cpp and folders/CRegFolder.cpp to add the icon.
CORE-18625

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Joachim Henze <joachim.henze@reactos.org>
2023-07-22 19:28:37 +09:00
Andrei Miloiu 91e1d4dce3
[ARP][MC] Add Romanian (ro-RO) translation to message table (#5440) 2023-07-17 00:12:33 +03:00