https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7aadc1e1feaf6cadd5362…
commit 7aadc1e1feaf6cadd536223230f461b24619c6d1
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Jun 19 07:51:19 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Jun 19 07:51:19 2023 +0900
[MSPAINT] Realize context menu on canvas (#5352)
- Add actions on Right-Click.
- Add ID_POPUPMENU resource menu.
- Use TrackPopupMenu to show the context menu.
- Improve CMainWindow::OnInitMenuPopup to display context menu.
- Add SelectionModel::m_bContentChanged flag to indicate whether the selection content
is changed.
- Fix IDM_IMAGEINVERTCOLORS and IDM_IMAGEROTATEMIRROR commands.
CORE-18867
---
base/applications/mspaint/canvas.cpp | 5 ++
base/applications/mspaint/lang/bg-BG.rc | 19 +++++
base/applications/mspaint/lang/cs-CZ.rc | 19 +++++
base/applications/mspaint/lang/de-DE.rc | 19 +++++
base/applications/mspaint/lang/en-GB.rc | 19 +++++
base/applications/mspaint/lang/en-US.rc | 19 +++++
base/applications/mspaint/lang/es-ES.rc | 19 +++++
base/applications/mspaint/lang/et-EE.rc | 19 +++++
base/applications/mspaint/lang/eu-ES.rc | 19 +++++
base/applications/mspaint/lang/fr-FR.rc | 19 +++++
base/applications/mspaint/lang/he-IL.rc | 19 +++++
base/applications/mspaint/lang/hu-HU.rc | 19 +++++
base/applications/mspaint/lang/id-ID.rc | 19 +++++
base/applications/mspaint/lang/it-IT.rc | 19 +++++
base/applications/mspaint/lang/ja-JP.rc | 21 +++++-
base/applications/mspaint/lang/nl-NL.rc | 19 +++++
base/applications/mspaint/lang/no-NO.rc | 19 +++++
base/applications/mspaint/lang/pl-PL.rc | 19 +++++
base/applications/mspaint/lang/pt-BR.rc | 19 +++++
base/applications/mspaint/lang/pt-PT.rc | 19 +++++
base/applications/mspaint/lang/ro-RO.rc | 19 +++++
base/applications/mspaint/lang/ru-RU.rc | 19 +++++
base/applications/mspaint/lang/sk-SK.rc | 19 +++++
base/applications/mspaint/lang/sq-AL.rc | 19 +++++
base/applications/mspaint/lang/sv-SE.rc | 19 +++++
base/applications/mspaint/lang/tr-TR.rc | 19 +++++
base/applications/mspaint/lang/uk-UA.rc | 19 +++++
base/applications/mspaint/lang/vi-VN.rc | 19 +++++
base/applications/mspaint/lang/zh-CN.rc | 19 +++++
base/applications/mspaint/lang/zh-HK.rc | 19 +++++
base/applications/mspaint/lang/zh-TW.rc | 19 +++++
base/applications/mspaint/mouse.cpp | 29 ++++++--
base/applications/mspaint/resource.h | 1 +
base/applications/mspaint/selectionmodel.cpp | 74 ++++++++++++++-----
base/applications/mspaint/selectionmodel.h | 5 ++
base/applications/mspaint/winproc.cpp | 102 +++++++++++++++++----------
base/applications/mspaint/winproc.h | 1 +
37 files changed, 726 insertions(+), 63 deletions(-)
diff --git a/base/applications/mspaint/canvas.cpp b/base/applications/mspaint/canvas.cpp
index 68a91b5d250..45c182cf3bd 100644
--- a/base/applications/mspaint/canvas.cpp
+++ b/base/applications/mspaint/canvas.cpp
@@ -272,6 +272,11 @@ LRESULT CCanvasWindow::OnLRButtonDown(BOOL bLeftButton, UINT nMsg,
WPARAM wParam
CanvasToImage(pt);
StartSelectionDrag(hitSelection, pt);
}
+ else
+ {
+ canvasWindow.ClientToScreen(&pt);
+ mainWindow.TrackPopupMenu(pt, 0);
+ }
return 0;
}
diff --git a/base/applications/mspaint/lang/bg-BG.rc
b/base/applications/mspaint/lang/bg-BG.rc
index e5d1a5eb4b5..8f829673e75 100644
--- a/base/applications/mspaint/lang/bg-BG.rc
+++ b/base/applications/mspaint/lang/bg-BG.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/cs-CZ.rc
b/base/applications/mspaint/lang/cs-CZ.rc
index e7175cfb789..82cfb95c87a 100644
--- a/base/applications/mspaint/lang/cs-CZ.rc
+++ b/base/applications/mspaint/lang/cs-CZ.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/de-DE.rc
b/base/applications/mspaint/lang/de-DE.rc
index c037f76a5bd..4ac9271762b 100644
--- a/base/applications/mspaint/lang/de-DE.rc
+++ b/base/applications/mspaint/lang/de-DE.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/en-GB.rc
b/base/applications/mspaint/lang/en-GB.rc
index 6275fa87c6e..f60d1580bfb 100644
--- a/base/applications/mspaint/lang/en-GB.rc
+++ b/base/applications/mspaint/lang/en-GB.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/en-US.rc
b/base/applications/mspaint/lang/en-US.rc
index e81466d7177..2db7b63f035 100644
--- a/base/applications/mspaint/lang/en-US.rc
+++ b/base/applications/mspaint/lang/en-US.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/es-ES.rc
b/base/applications/mspaint/lang/es-ES.rc
index 313b56435c6..85fc44b03b9 100644
--- a/base/applications/mspaint/lang/es-ES.rc
+++ b/base/applications/mspaint/lang/es-ES.rc
@@ -102,6 +102,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/et-EE.rc
b/base/applications/mspaint/lang/et-EE.rc
index 3895c6266b1..2f49611d46a 100644
--- a/base/applications/mspaint/lang/et-EE.rc
+++ b/base/applications/mspaint/lang/et-EE.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/eu-ES.rc
b/base/applications/mspaint/lang/eu-ES.rc
index 1d5565cb184..782c29f274f 100644
--- a/base/applications/mspaint/lang/eu-ES.rc
+++ b/base/applications/mspaint/lang/eu-ES.rc
@@ -92,6 +92,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/fr-FR.rc
b/base/applications/mspaint/lang/fr-FR.rc
index c2428c63a4a..9067efb323c 100644
--- a/base/applications/mspaint/lang/fr-FR.rc
+++ b/base/applications/mspaint/lang/fr-FR.rc
@@ -92,6 +92,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/he-IL.rc
b/base/applications/mspaint/lang/he-IL.rc
index b5a6e494d7a..1ef77c72fe9 100644
--- a/base/applications/mspaint/lang/he-IL.rc
+++ b/base/applications/mspaint/lang/he-IL.rc
@@ -92,6 +92,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/hu-HU.rc
b/base/applications/mspaint/lang/hu-HU.rc
index c80bcc33d6b..913b4aa4c08 100644
--- a/base/applications/mspaint/lang/hu-HU.rc
+++ b/base/applications/mspaint/lang/hu-HU.rc
@@ -92,6 +92,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/id-ID.rc
b/base/applications/mspaint/lang/id-ID.rc
index 312ef62a3de..134bd6cc6a1 100644
--- a/base/applications/mspaint/lang/id-ID.rc
+++ b/base/applications/mspaint/lang/id-ID.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/it-IT.rc
b/base/applications/mspaint/lang/it-IT.rc
index 8d54f0c5c01..72978cacb4e 100644
--- a/base/applications/mspaint/lang/it-IT.rc
+++ b/base/applications/mspaint/lang/it-IT.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/ja-JP.rc
b/base/applications/mspaint/lang/ja-JP.rc
index 8e6bac2e22e..498c603aa55 100644
--- a/base/applications/mspaint/lang/ja-JP.rc
+++ b/base/applications/mspaint/lang/ja-JP.rc
@@ -78,7 +78,7 @@ BEGIN
POPUP "画像(&I)"
BEGIN
MENUITEM "回転と反転(&M)\tCtrl+R", IDM_IMAGEROTATEMIRROR
- MENUITEM "伸縮/傾斜(&S)\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "伸縮と傾斜(&S)\tCtrl+W", IDM_IMAGESTRETCHSKEW
MENUITEM "切り取り(&C)", IDM_IMAGECROP
MENUITEM "色の反転(&I)\tCtrl+I", IDM_IMAGEINVERTCOLORS
MENUITEM "画像の属性(&A)\tCtrl+E", IDM_IMAGEATTRIBUTES
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "切り取り(&T)\tCtrl+X", IDM_EDITCUT
+ MENUITEM "コピー(&C)\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "貼り付け(&P)\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "選択範囲の削除(&L)\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "すべて選択(&A)\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "ファイルへコピー(&O)...", IDM_EDITCOPYTO
+ MENUITEM "ファイルから貼り付け(&F)...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "回転と反転(&M)\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "伸縮と傾斜(&S)\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "色の反転(&I)\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/nl-NL.rc
b/base/applications/mspaint/lang/nl-NL.rc
index 4b3285670bc..aabc54497c9 100644
--- a/base/applications/mspaint/lang/nl-NL.rc
+++ b/base/applications/mspaint/lang/nl-NL.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/no-NO.rc
b/base/applications/mspaint/lang/no-NO.rc
index 30a2a258863..c8e12864b8f 100644
--- a/base/applications/mspaint/lang/no-NO.rc
+++ b/base/applications/mspaint/lang/no-NO.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/pl-PL.rc
b/base/applications/mspaint/lang/pl-PL.rc
index 62191b61216..34213677b47 100644
--- a/base/applications/mspaint/lang/pl-PL.rc
+++ b/base/applications/mspaint/lang/pl-PL.rc
@@ -101,6 +101,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/pt-BR.rc
b/base/applications/mspaint/lang/pt-BR.rc
index 28a0e26eaeb..b6e462d741e 100644
--- a/base/applications/mspaint/lang/pt-BR.rc
+++ b/base/applications/mspaint/lang/pt-BR.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/pt-PT.rc
b/base/applications/mspaint/lang/pt-PT.rc
index 561a5f774a4..9921db6a996 100644
--- a/base/applications/mspaint/lang/pt-PT.rc
+++ b/base/applications/mspaint/lang/pt-PT.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^O", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/ro-RO.rc
b/base/applications/mspaint/lang/ro-RO.rc
index 4aba57be15f..42c9e2a4169 100644
--- a/base/applications/mspaint/lang/ro-RO.rc
+++ b/base/applications/mspaint/lang/ro-RO.rc
@@ -101,6 +101,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/ru-RU.rc
b/base/applications/mspaint/lang/ru-RU.rc
index e7b08265148..940044ff0a2 100644
--- a/base/applications/mspaint/lang/ru-RU.rc
+++ b/base/applications/mspaint/lang/ru-RU.rc
@@ -92,6 +92,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/sk-SK.rc
b/base/applications/mspaint/lang/sk-SK.rc
index d728044f8a2..58ac2345492 100644
--- a/base/applications/mspaint/lang/sk-SK.rc
+++ b/base/applications/mspaint/lang/sk-SK.rc
@@ -101,6 +101,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/sq-AL.rc
b/base/applications/mspaint/lang/sq-AL.rc
index b749bd24c3a..ad639839f2c 100644
--- a/base/applications/mspaint/lang/sq-AL.rc
+++ b/base/applications/mspaint/lang/sq-AL.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/sv-SE.rc
b/base/applications/mspaint/lang/sv-SE.rc
index 79f30dcae74..0aef5bdd6d9 100644
--- a/base/applications/mspaint/lang/sv-SE.rc
+++ b/base/applications/mspaint/lang/sv-SE.rc
@@ -92,6 +92,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/tr-TR.rc
b/base/applications/mspaint/lang/tr-TR.rc
index d299c5b40ba..d8f0d9e0953 100644
--- a/base/applications/mspaint/lang/tr-TR.rc
+++ b/base/applications/mspaint/lang/tr-TR.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/uk-UA.rc
b/base/applications/mspaint/lang/uk-UA.rc
index d7eb147c950..7a0eafc3873 100644
--- a/base/applications/mspaint/lang/uk-UA.rc
+++ b/base/applications/mspaint/lang/uk-UA.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/vi-VN.rc
b/base/applications/mspaint/lang/vi-VN.rc
index 247f547ef17..aa1df3c5488 100644
--- a/base/applications/mspaint/lang/vi-VN.rc
+++ b/base/applications/mspaint/lang/vi-VN.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/zh-CN.rc
b/base/applications/mspaint/lang/zh-CN.rc
index 69216e71489..896cfd81663 100644
--- a/base/applications/mspaint/lang/zh-CN.rc
+++ b/base/applications/mspaint/lang/zh-CN.rc
@@ -102,6 +102,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/zh-HK.rc
b/base/applications/mspaint/lang/zh-HK.rc
index 0577111e768..d200513e5d7 100644
--- a/base/applications/mspaint/lang/zh-HK.rc
+++ b/base/applications/mspaint/lang/zh-HK.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/lang/zh-TW.rc
b/base/applications/mspaint/lang/zh-TW.rc
index 2c4675630ef..f266ba59d9d 100644
--- a/base/applications/mspaint/lang/zh-TW.rc
+++ b/base/applications/mspaint/lang/zh-TW.rc
@@ -100,6 +100,25 @@ BEGIN
END
END
+ID_POPUPMENU MENU
+BEGIN
+ POPUP "Popup #0"
+ BEGIN
+ MENUITEM "C&ut\tCtrl+X", IDM_EDITCUT
+ MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY
+ MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
+ MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION
+ MENUITEM "Select &All\tCtrl+A", IDM_EDITSELECTALL
+ MENUITEM SEPARATOR
+ MENUITEM "C&opy to...", IDM_EDITCOPYTO
+ MENUITEM "Paste &from...", IDM_EDITPASTEFROM
+ MENUITEM SEPARATOR
+ MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR
+ MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW
+ MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS
+ END
+END
+
ID_ACCELERATORS ACCELERATORS
BEGIN
"^N", IDM_FILENEW
diff --git a/base/applications/mspaint/mouse.cpp b/base/applications/mspaint/mouse.cpp
index b16ae6190b8..2ba45a2d0e2 100644
--- a/base/applications/mspaint/mouse.cpp
+++ b/base/applications/mspaint/mouse.cpp
@@ -181,6 +181,12 @@ struct FreeSelTool : ToolBase
}
imageModel.NotifyImageChanged();
}
+ else
+ {
+ POINT pt = { x, y };
+ canvasWindow.ClientToScreen(&pt);
+ mainWindow.TrackPopupMenu(pt, 0);
+ }
}
void OnFinishDraw() override
@@ -249,14 +255,19 @@ struct RectSelTool : ToolBase
void OnButtonUp(BOOL bLeftButton, LONG x, LONG y) override
{
+ POINT pt = { x, y };
if (bLeftButton)
{
- POINT pt = { x, y };
imageModel.Bound(pt);
selectionModel.SetRectFromPoints(g_ptStart, pt);
selectionModel.m_bShow = !selectionModel.m_rc.IsRectEmpty();
imageModel.NotifyImageChanged();
}
+ else
+ {
+ canvasWindow.ClientToScreen(&pt);
+ mainWindow.TrackPopupMenu(pt, 0);
+ }
}
void OnFinishDraw() override
@@ -565,10 +576,13 @@ struct TextTool : ToolBase
selectionModel.SetRectFromPoints(g_ptStart, pt);
BOOL bTextBoxShown = ::IsWindowVisible(textEditWindow);
- if (bTextBoxShown && textEditWindow.GetWindowTextLength() > 0)
+ if (bTextBoxShown)
{
- imageModel.PushImageForUndo();
- draw(m_hdc);
+ if (textEditWindow.GetWindowTextLength() > 0)
+ {
+ imageModel.PushImageForUndo();
+ draw(m_hdc);
+ }
if (::IsRectEmpty(&selectionModel.m_rc))
{
quit();
@@ -611,8 +625,11 @@ struct TextTool : ToolBase
void OnFinishDraw() override
{
- imageModel.PushImageForUndo();
- draw(m_hdc);
+ if (textEditWindow.GetWindowTextLength() > 0)
+ {
+ imageModel.PushImageForUndo();
+ draw(m_hdc);
+ }
quit();
ToolBase::OnFinishDraw();
}
diff --git a/base/applications/mspaint/resource.h b/base/applications/mspaint/resource.h
index 53f17d4c715..ce91b33238b 100644
--- a/base/applications/mspaint/resource.h
+++ b/base/applications/mspaint/resource.h
@@ -30,6 +30,7 @@
#define IDI_VERTSKEW 538
#define ID_MENU 501
+#define ID_POPUPMENU 502
#define IDM_FILENEW 201
#define IDM_FILEOPEN 202
diff --git a/base/applications/mspaint/selectionmodel.cpp
b/base/applications/mspaint/selectionmodel.cpp
index bfa4501d5fc..1137453dd3f 100644
--- a/base/applications/mspaint/selectionmodel.cpp
+++ b/base/applications/mspaint/selectionmodel.cpp
@@ -19,6 +19,7 @@ SelectionModel::SelectionModel()
, m_ptStack(NULL)
, m_iPtSP(0)
, m_bShow(FALSE)
+ , m_bContentChanged(FALSE)
{
::SetRectEmpty(&m_rc);
::SetRectEmpty(&m_rcOld);
@@ -123,6 +124,14 @@ void SelectionModel::DrawBackgroundRect(HDC hDCImage, COLORREF
crBg)
Rect(hDCImage, m_rcOld.left, m_rcOld.top, m_rcOld.right, m_rcOld.bottom, crBg, crBg,
0, 1);
}
+void SelectionModel::DrawBackground(HDC hDCImage)
+{
+ if (toolsModel.GetActiveTool() == TOOL_FREESEL)
+ DrawBackgroundPoly(hDCImage, paletteModel.GetBgColor());
+ else
+ DrawBackgroundRect(hDCImage, paletteModel.GetBgColor());
+}
+
void SelectionModel::DrawSelection(HDC hDCImage, COLORREF crBg, BOOL bBgTransparent)
{
CRect rc = m_rc;
@@ -187,7 +196,8 @@ void SelectionModel::Landing()
m_bShow = FALSE;
- if (!::EqualRect(m_rc, m_rcOld) && !::IsRectEmpty(m_rc) &&
!::IsRectEmpty(m_rcOld))
+ if (m_bContentChanged ||
+ (!::EqualRect(m_rc, m_rcOld) && !::IsRectEmpty(m_rc) &&
!::IsRectEmpty(m_rcOld)))
{
imageModel.PushImageForUndo();
@@ -208,9 +218,7 @@ void SelectionModel::InsertFromHBITMAP(HBITMAP hBm, INT x, INT y)
m_rc.right = x + GetDIBWidth(hBm);
m_rc.bottom = y + GetDIBHeight(hBm);
- // If m_rc and m_rcOld were same, the image cannot be pasted to the canvas.
- // See also SelectionModel::Landing
- ::SetRect(&m_rcOld, -2, -2, -1, -1); // Outside of image
+ NotifyContentChanged();
ClearMask();
}
@@ -234,7 +242,7 @@ void SelectionModel::FlipHorizontally()
}
::DeleteDC(hdcMem);
- imageModel.NotifyImageChanged();
+ NotifyContentChanged();
}
void SelectionModel::FlipVertically()
@@ -256,7 +264,7 @@ void SelectionModel::FlipVertically()
}
::DeleteDC(hdcMem);
- imageModel.NotifyImageChanged();
+ NotifyContentChanged();
}
void SelectionModel::RotateNTimes90Degrees(int iN)
@@ -267,9 +275,10 @@ void SelectionModel::RotateNTimes90Degrees(int iN)
switch (iN)
{
- case 1:
- case 3:
+ case 1: /* rotate 90 degrees */
+ case 3: /* rotate 270 degrees */
TakeOff();
+
if (m_hbmColor)
{
hbmOld = ::SelectObject(hdcMem, m_hbmColor);
@@ -286,10 +295,13 @@ void SelectionModel::RotateNTimes90Degrees(int iN)
::DeleteObject(m_hbmMask);
m_hbmMask = hbm;
}
+
+ SwapWidthAndHeight();
break;
- case 2:
+ case 2: /* rotate 180 degrees */
TakeOff();
+
if (m_hbmColor)
{
hbmOld = ::SelectObject(hdcMem, m_hbmColor);
@@ -308,7 +320,7 @@ void SelectionModel::RotateNTimes90Degrees(int iN)
}
::DeleteDC(hdcMem);
- imageModel.NotifyImageChanged();
+ NotifyContentChanged();
}
void SelectionModel::StretchSkew(int nStretchPercentX, int nStretchPercentY, int
nSkewDegX, int nSkewDegY)
@@ -351,7 +363,7 @@ void SelectionModel::StretchSkew(int nStretchPercentX, int
nStretchPercentY, int
::DeleteDC(hDC);
m_bShow = TRUE;
- imageModel.NotifyImageChanged();
+ NotifyContentChanged();
}
HBITMAP SelectionModel::CopyBitmap()
@@ -442,12 +454,11 @@ void SelectionModel::ClearColor()
void SelectionModel::HideSelection()
{
- m_bShow = FALSE;
+ m_bShow = m_bContentChanged = FALSE;
ClearColor();
ClearMask();
::SetRectEmpty(&m_rc);
::SetRectEmpty(&m_rcOld);
-
imageModel.NotifyImageChanged();
}
@@ -457,12 +468,39 @@ void SelectionModel::DeleteSelection()
return;
TakeOff();
-
imageModel.PushImageForUndo();
- if (toolsModel.GetActiveTool() == TOOL_FREESEL)
- DrawBackgroundPoly(imageModel.GetDC(), paletteModel.GetBgColor());
- else
- DrawBackgroundRect(imageModel.GetDC(), paletteModel.GetBgColor());
+ DrawBackground(imageModel.GetDC());
HideSelection();
}
+
+void SelectionModel::InvertSelection()
+{
+ TakeOff();
+
+ BITMAP bm;
+ ::GetObject(m_hbmColor, sizeof(bm), &bm);
+
+ HDC hdc = ::CreateCompatibleDC(NULL);
+ HGDIOBJ hbmOld = ::SelectObject(hdc, m_hbmColor);
+ RECT rc = { 0, 0, bm.bmWidth, bm.bmHeight };
+ ::InvertRect(hdc, &rc);
+ ::SelectObject(hdc, hbmOld);
+ ::DeleteDC(hdc);
+
+ NotifyContentChanged();
+}
+
+void SelectionModel::NotifyContentChanged()
+{
+ m_bContentChanged = TRUE;
+ imageModel.NotifyImageChanged();
+}
+
+void SelectionModel::SwapWidthAndHeight()
+{
+ INT cx = m_rc.Width();
+ INT cy = m_rc.Height();
+ m_rc.right = m_rc.left + cy;
+ m_rc.bottom = m_rc.top + cx;
+}
diff --git a/base/applications/mspaint/selectionmodel.h
b/base/applications/mspaint/selectionmodel.h
index f68a740d18f..c2ec6bffbc2 100644
--- a/base/applications/mspaint/selectionmodel.h
+++ b/base/applications/mspaint/selectionmodel.h
@@ -20,6 +20,7 @@ private:
public:
COLORREF m_rgbBack = RGB(255, 255, 255);
BOOL m_bShow;
+ BOOL m_bContentChanged;
CRect m_rc; // in image pixel coordinates
POINT m_ptHit; // in image pixel coordinates
CRect m_rcOld; // in image pixel coordinates
@@ -42,6 +43,7 @@ public:
HBITMAP CopyBitmap();
void GetSelectionContents(HDC hDCImage);
void DrawFramePoly(HDC hDCImage);
+ void DrawBackground(HDC hDCImage);
void DrawBackgroundPoly(HDC hDCImage, COLORREF crBg);
void DrawBackgroundRect(HDC hDCImage, COLORREF crBg);
void DrawSelection(HDC hDCImage, COLORREF crBg = 0, BOOL bBgTransparent = FALSE);
@@ -52,14 +54,17 @@ public:
void FlipVertically();
void RotateNTimes90Degrees(int iN);
void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX, int
nSkewDegY);
+ void InvertSelection();
void Dragging(CANVAS_HITTEST hit, POINT pt);
void ClearMask();
void ClearColor();
+ void NotifyContentChanged();
private:
SelectionModel(const SelectionModel&);
SelectionModel& operator=(const SelectionModel&);
void ShiftPtStack(INT dx, INT dy);
+ void SwapWidthAndHeight();
};
diff --git a/base/applications/mspaint/winproc.cpp
b/base/applications/mspaint/winproc.cpp
index c3fa27d6445..72947626a8c 100644
--- a/base/applications/mspaint/winproc.cpp
+++ b/base/applications/mspaint/winproc.cpp
@@ -424,47 +424,44 @@ LRESULT CMainWindow::OnInitMenuPopup(UINT nMsg, WPARAM wParam,
LPARAM lParam, BO
((toolsModel.GetActiveTool() == TOOL_FREESEL) || (toolsModel.GetActiveTool() ==
TOOL_RECTSEL)));
BOOL textShown = (toolsModel.GetActiveTool() == TOOL_TEXT &&
::IsWindowVisible(textEditWindow));
DWORD dwStart = 0, dwEnd = 0;
- if (::IsWindowVisible(textEditWindow))
+ if (textShown)
textEditWindow.SendMessage(EM_GETSEL, (WPARAM)&dwStart,
(LPARAM)&dwEnd);
BOOL hasTextSel = (dwStart < dwEnd);
- switch (lParam)
+ //
+ // File menu
+ //
+ if (::GetSubMenu(GetMenu(), 0) == menu)
{
- case 0: /* File menu */
- ProcessFileMenu((HMENU)wParam);
- break;
- case 1: /* Edit menu */
- EnableMenuItem(menu, IDM_EDITUNDO,
- ENABLED_IF(textShown ? textEditWindow.SendMessage(EM_CANUNDO) :
imageModel.CanUndo()));
- EnableMenuItem(menu, IDM_EDITREDO, ENABLED_IF(textShown ? FALSE :
imageModel.CanRedo()));
- EnableMenuItem(menu, IDM_EDITCUT, ENABLED_IF(textShown ? hasTextSel :
trueSelection));
- EnableMenuItem(menu, IDM_EDITCOPY, ENABLED_IF(textShown ? hasTextSel :
trueSelection));
- EnableMenuItem(menu, IDM_EDITDELETESELECTION,
- ENABLED_IF(textShown ? hasTextSel : trueSelection));
- EnableMenuItem(menu, IDM_EDITINVERTSELECTION, ENABLED_IF(trueSelection));
- EnableMenuItem(menu, IDM_EDITCOPYTO, ENABLED_IF(trueSelection));
- EnableMenuItem(menu, IDM_EDITPASTE,
- ENABLED_IF(textShown ?
::IsClipboardFormatAvailable(CF_UNICODETEXT) :
- ::IsClipboardFormatAvailable(CF_ENHMETAFILE) ||
- ::IsClipboardFormatAvailable(CF_DIB) ||
- ::IsClipboardFormatAvailable(CF_BITMAP)));
- break;
- case 2: /* View menu */
- CheckMenuItem(menu, IDM_VIEWTOOLBOX,
CHECKED_IF(::IsWindowVisible(toolBoxContainer)));
- CheckMenuItem(menu, IDM_VIEWCOLORPALETTE,
CHECKED_IF(::IsWindowVisible(paletteWindow)));
- CheckMenuItem(menu, IDM_VIEWSTATUSBAR,
CHECKED_IF(::IsWindowVisible(g_hStatusBar)));
- CheckMenuItem(menu, IDM_FORMATICONBAR,
CHECKED_IF(::IsWindowVisible(fontsDialog)));
- EnableMenuItem(menu, IDM_FORMATICONBAR, ENABLED_IF(toolsModel.GetActiveTool()
== TOOL_TEXT));
-
- CheckMenuItem(menu, IDM_VIEWSHOWGRID, CHECKED_IF(g_showGrid));
- CheckMenuItem(menu, IDM_VIEWSHOWMINIATURE,
CHECKED_IF(registrySettings.ShowThumbnail));
- break;
- case 3: /* Image menu */
- EnableMenuItem(menu, IDM_IMAGECROP, ENABLED_IF(selectionModel.m_bShow));
- CheckMenuItem(menu, IDM_IMAGEDRAWOPAQUE,
CHECKED_IF(!toolsModel.IsBackgroundTransparent()));
- break;
+ ProcessFileMenu(menu);
}
+ //
+ // Edit menu
+ //
+ EnableMenuItem(menu, IDM_EDITUNDO,
+ ENABLED_IF(textShown ? textEditWindow.SendMessage(EM_CANUNDO) :
imageModel.CanUndo()));
+ EnableMenuItem(menu, IDM_EDITREDO, ENABLED_IF(textShown ? FALSE :
imageModel.CanRedo()));
+ EnableMenuItem(menu, IDM_EDITCUT, ENABLED_IF(textShown ? hasTextSel :
trueSelection));
+ EnableMenuItem(menu, IDM_EDITCOPY, ENABLED_IF(textShown ? hasTextSel :
trueSelection));
+ EnableMenuItem(menu, IDM_EDITDELETESELECTION,
+ ENABLED_IF(textShown ? hasTextSel : trueSelection));
+ EnableMenuItem(menu, IDM_EDITINVERTSELECTION, ENABLED_IF(trueSelection));
+ EnableMenuItem(menu, IDM_EDITCOPYTO, ENABLED_IF(trueSelection));
+ EnableMenuItem(menu, IDM_EDITPASTE,
+ ENABLED_IF(textShown ? ::IsClipboardFormatAvailable(CF_UNICODETEXT)
:
+ ::IsClipboardFormatAvailable(CF_ENHMETAFILE) ||
+ ::IsClipboardFormatAvailable(CF_DIB) ||
+ ::IsClipboardFormatAvailable(CF_BITMAP)));
+
+ //
+ // View menu
+ //
+ CheckMenuItem(menu, IDM_VIEWTOOLBOX,
CHECKED_IF(::IsWindowVisible(toolBoxContainer)));
+ CheckMenuItem(menu, IDM_VIEWCOLORPALETTE,
CHECKED_IF(::IsWindowVisible(paletteWindow)));
+ CheckMenuItem(menu, IDM_VIEWSTATUSBAR,
CHECKED_IF(::IsWindowVisible(g_hStatusBar)));
+ CheckMenuItem(menu, IDM_FORMATICONBAR, CHECKED_IF(::IsWindowVisible(fontsDialog)));
+ EnableMenuItem(menu, IDM_FORMATICONBAR, ENABLED_IF(toolsModel.GetActiveTool() ==
TOOL_TEXT));
CheckMenuItem(menu, IDM_VIEWZOOM125, CHECKED_IF(toolsModel.GetZoom() == 125));
CheckMenuItem(menu, IDM_VIEWZOOM25, CHECKED_IF(toolsModel.GetZoom() == 250));
CheckMenuItem(menu, IDM_VIEWZOOM50, CHECKED_IF(toolsModel.GetZoom() == 500));
@@ -472,7 +469,19 @@ LRESULT CMainWindow::OnInitMenuPopup(UINT nMsg, WPARAM wParam, LPARAM
lParam, BO
CheckMenuItem(menu, IDM_VIEWZOOM200, CHECKED_IF(toolsModel.GetZoom() == 2000));
CheckMenuItem(menu, IDM_VIEWZOOM400, CHECKED_IF(toolsModel.GetZoom() == 4000));
CheckMenuItem(menu, IDM_VIEWZOOM800, CHECKED_IF(toolsModel.GetZoom() == 8000));
-
+ CheckMenuItem(menu, IDM_VIEWSHOWGRID, CHECKED_IF(g_showGrid));
+ CheckMenuItem(menu, IDM_VIEWSHOWMINIATURE,
CHECKED_IF(registrySettings.ShowThumbnail));
+
+ //
+ // Image menu
+ //
+ EnableMenuItem(menu, IDM_IMAGECROP, ENABLED_IF(selectionModel.m_bShow));
+ EnableMenuItem(menu, IDM_IMAGEDELETEIMAGE, ENABLED_IF(!selectionModel.m_bShow));
+ CheckMenuItem(menu, IDM_IMAGEDRAWOPAQUE,
CHECKED_IF(!toolsModel.IsBackgroundTransparent()));
+
+ //
+ // Palette menu
+ //
CheckMenuItem(menu, IDM_COLORSMODERNPALETTE,
CHECKED_IF(paletteModel.SelectedPalette() == PAL_MODERN));
CheckMenuItem(menu, IDM_COLORSOLDPALETTE,
CHECKED_IF(paletteModel.SelectedPalette() == PAL_OLDTYPE));
return 0;
@@ -858,7 +867,10 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM
lParam, BOOL& bH
break;
case IDM_IMAGEINVERTCOLORS:
{
- imageModel.InvertColors();
+ if (selectionModel.m_bShow)
+ selectionModel.InvertSelection();
+ else
+ imageModel.InvertColors();
break;
}
case IDM_IMAGEDELETEIMAGE:
@@ -997,8 +1009,22 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM
lParam, BOOL& bH
// Create and show the fullscreen window
fullscreenWindow.DoCreate();
fullscreenWindow.ShowWindow(SW_SHOWMAXIMIZED);
- ShowWindow(SW_HIDE);
break;
}
return 0;
}
+
+VOID CMainWindow::TrackPopupMenu(POINT ptScreen, INT iSubMenu)
+{
+ HMENU hMenu = ::LoadMenuW(g_hinstExe, MAKEINTRESOURCEW(ID_POPUPMENU));
+ HMENU hSubMenu = ::GetSubMenu(hMenu, iSubMenu);
+
+ ::SetForegroundWindow(m_hWnd);
+ INT_PTR id = ::TrackPopupMenu(hSubMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD,
+ ptScreen.x, ptScreen.y, 0, m_hWnd, NULL);
+ PostMessage(WM_NULL);
+ if (id != 0)
+ PostMessage(WM_COMMAND, id);
+
+ ::DestroyMenu(hMenu);
+}
diff --git a/base/applications/mspaint/winproc.h b/base/applications/mspaint/winproc.h
index 5ec12f23f0f..71fe89282d2 100644
--- a/base/applications/mspaint/winproc.h
+++ b/base/applications/mspaint/winproc.h
@@ -34,6 +34,7 @@ public:
BOOL GetOpenFileName(IN OUT LPTSTR pszFile, INT cchMaxFile);
BOOL GetSaveFileName(IN OUT LPTSTR pszFile, INT cchMaxFile);
BOOL ChooseColor(IN OUT COLORREF *prgbColor);
+ VOID TrackPopupMenu(POINT ptScreen, INT iSubMenu);
private:
HMENU m_hMenu;