https://git.reactos.org/?p=reactos.git;a=commitdiff;h=918a8180718f0901e231b…
commit 918a8180718f0901e231b12fe2274b82baa926b6
Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org>
AuthorDate: Thu Aug 10 22:11:43 2023 +0700
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Aug 10 17:11:43 2023 +0200
[WINESYNC][COMCTL32] Listview: Initialize marqueeRect from left-click coordinates before starting a marquee highlight (#5555)
The infoPtr->marqueeRect structure is not currently initialized before the
marquee highlight sequence starts, resulting in the RECT having initial
coordinates of (0,0)-(0,0). These coordinates cause the first item in
the listview control to be identified as being within the range of the
marqueeRect's coordinates.
That item is then set to LVIS_SELECTED even though it is not part of the
marquee selection.
Wine commit: daf95aaadf3a59f0ccc129a853327417b5e4f07c
author: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Mon, 26 Apr 2021 10:59:51 +0000 (20:59 +1000)
---
dll/win32/comctl32/listview.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c
index 2052b66e6a9..9d6609ffd71 100644
--- a/dll/win32/comctl32/listview.c
+++ b/dll/win32/comctl32/listview.c
@@ -4218,6 +4218,7 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
/* Begin selection and capture mouse */
infoPtr->bMarqueeSelect = TRUE;
+ infoPtr->marqueeRect = rect;
SetCapture(infoPtr->hwndSelf);
}
}
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c64103d55f2be9dc42f6b…
commit c64103d55f2be9dc42f6b052abf7bc8a6c47c53b
Author: Carl J. Bialorucki <cbialo2(a)outlook.com>
AuthorDate: Thu Aug 10 09:10:51 2023 -0600
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Aug 10 17:10:51 2023 +0200
[NTUSER] Fix SPI_SETFONTSMOOTHING behavior (#5526)
CORE-19092
Fixes the behavior of the SPI_SETFONTSMOOTHING system parameter. This also
fixes a bug when trying to select "Use the following method to smooth edges
of screen fonts" in desk.cpl.
Instead of checking if uiParam is equal to two, treat uiParam as a Boolean
that sets font smoothing on or off. This is the correct behavior according
to Microsoft documentation.
Use SpiStoreSzInt method instead of SpiStoreSz to store the value in the registry.
---
win32ss/user/ntuser/sysparams.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/win32ss/user/ntuser/sysparams.c b/win32ss/user/ntuser/sysparams.c
index 47349cedd37..552a63e1f6a 100644
--- a/win32ss/user/ntuser/sysparams.c
+++ b/win32ss/user/ntuser/sysparams.c
@@ -1404,10 +1404,10 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
return SpiGetInt(pvParam, &gspv.bFontSmoothing, fl);
case SPI_SETFONTSMOOTHING:
- gspv.bFontSmoothing = (uiParam == 2);
+ gspv.bFontSmoothing = !!uiParam;
if (fl & SPIF_UPDATEINIFILE)
{
- SpiStoreSz(KEY_DESKTOP, VAL_FONTSMOOTHING, (uiParam == 2) ? L"2" : L"0");
+ SpiStoreSzInt(KEY_DESKTOP, VAL_FONTSMOOTHING, gspv.bFontSmoothing ? 2 : 0);
}
return (UINT_PTR)KEY_DESKTOP;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ba53f72a87f5abd3c1abf…
commit ba53f72a87f5abd3c1abfaf59ebaeb31d2ad7e49
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Aug 9 23:59:34 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Aug 9 23:59:34 2023 +0900
[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
---
base/applications/mspaint/common.h | 1 +
base/applications/mspaint/dib.cpp | 4 +-
base/applications/mspaint/dib.h | 2 +-
base/applications/mspaint/lang/bg-BG.rc | 1 +
base/applications/mspaint/lang/cs-CZ.rc | 1 +
base/applications/mspaint/lang/de-DE.rc | 1 +
base/applications/mspaint/lang/en-GB.rc | 1 +
base/applications/mspaint/lang/en-US.rc | 1 +
base/applications/mspaint/lang/es-ES.rc | 1 +
base/applications/mspaint/lang/et-EE.rc | 1 +
base/applications/mspaint/lang/eu-ES.rc | 1 +
base/applications/mspaint/lang/fr-FR.rc | 1 +
base/applications/mspaint/lang/he-IL.rc | 1 +
base/applications/mspaint/lang/hu-HU.rc | 1 +
base/applications/mspaint/lang/id-ID.rc | 1 +
base/applications/mspaint/lang/it-IT.rc | 1 +
base/applications/mspaint/lang/ja-JP.rc | 1 +
base/applications/mspaint/lang/nl-NL.rc | 1 +
base/applications/mspaint/lang/no-NO.rc | 1 +
base/applications/mspaint/lang/pl-PL.rc | 1 +
base/applications/mspaint/lang/pt-BR.rc | 1 +
base/applications/mspaint/lang/pt-PT.rc | 1 +
base/applications/mspaint/lang/ro-RO.rc | 1 +
base/applications/mspaint/lang/ru-RU.rc | 1 +
base/applications/mspaint/lang/sk-SK.rc | 1 +
base/applications/mspaint/lang/sq-AL.rc | 1 +
base/applications/mspaint/lang/sv-SE.rc | 1 +
base/applications/mspaint/lang/tr-TR.rc | 1 +
base/applications/mspaint/lang/uk-UA.rc | 1 +
base/applications/mspaint/lang/vi-VN.rc | 1 +
base/applications/mspaint/lang/zh-CN.rc | 1 +
base/applications/mspaint/lang/zh-HK.rc | 1 +
base/applications/mspaint/lang/zh-TW.rc | 1 +
base/applications/mspaint/main.cpp | 117 ++++++++++++++++++++++++++++++++
base/applications/mspaint/resource.h | 1 +
base/applications/mspaint/winproc.cpp | 7 ++
36 files changed, 159 insertions(+), 3 deletions(-)
diff --git a/base/applications/mspaint/common.h b/base/applications/mspaint/common.h
index a3f3950ff7e..ee103d74911 100644
--- a/base/applications/mspaint/common.h
+++ b/base/applications/mspaint/common.h
@@ -47,3 +47,4 @@ BOOL zoomTo(int newZoom, int mouseX, int mouseY);
BOOL nearlyEqualPoints(INT x0, INT y0, INT x1, INT y1);
void updateStartAndLast(LONG x, LONG y);
void updateLast(LONG x, LONG y);
+BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName);
diff --git a/base/applications/mspaint/dib.cpp b/base/applications/mspaint/dib.cpp
index a5b3f0b7896..c12a2f013a8 100644
--- a/base/applications/mspaint/dib.cpp
+++ b/base/applications/mspaint/dib.cpp
@@ -142,11 +142,11 @@ GetDIBHeight(HBITMAP hBitmap)
return bm.bmHeight;
}
-BOOL SaveDIBToFile(HBITMAP hBitmap, LPCWSTR FileName, BOOL fIsMainFile)
+BOOL SaveDIBToFile(HBITMAP hBitmap, LPCWSTR FileName, BOOL fIsMainFile, REFGUID guidFileType)
{
CImageDx img;
img.Attach(hBitmap);
- HRESULT hr = img.SaveDx(FileName, GUID_NULL, g_xDpi, g_yDpi);
+ HRESULT hr = img.SaveDx(FileName, guidFileType, g_xDpi, g_yDpi);
img.Detach();
if (FAILED(hr))
diff --git a/base/applications/mspaint/dib.h b/base/applications/mspaint/dib.h
index 9c1e5d4f09c..cefdb6e42b5 100644
--- a/base/applications/mspaint/dib.h
+++ b/base/applications/mspaint/dib.h
@@ -22,7 +22,7 @@ static inline HBITMAP CopyDIBImage(HBITMAP hbm, INT cx = 0, INT cy = 0)
int GetDIBWidth(HBITMAP hbm);
int GetDIBHeight(HBITMAP hbm);
-BOOL SaveDIBToFile(HBITMAP hBitmap, LPCWSTR FileName, BOOL fIsMainFile);
+BOOL SaveDIBToFile(HBITMAP hBitmap, LPCWSTR FileName, BOOL fIsMainFile, REFGUID guidFileType = GUID_NULL);
HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile);
diff --git a/base/applications/mspaint/lang/bg-BG.rc b/base/applications/mspaint/lang/bg-BG.rc
index f3b6382d5b7..66bf74763c3 100644
--- a/base/applications/mspaint/lang/bg-BG.rc
+++ b/base/applications/mspaint/lang/bg-BG.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/cs-CZ.rc b/base/applications/mspaint/lang/cs-CZ.rc
index 5e5fcbb6caa..57608b40f96 100644
--- a/base/applications/mspaint/lang/cs-CZ.rc
+++ b/base/applications/mspaint/lang/cs-CZ.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/de-DE.rc b/base/applications/mspaint/lang/de-DE.rc
index 4cfe2e6c328..fb947b1eeb2 100644
--- a/base/applications/mspaint/lang/de-DE.rc
+++ b/base/applications/mspaint/lang/de-DE.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/en-GB.rc b/base/applications/mspaint/lang/en-GB.rc
index ce5b06fd04f..9dc21b13c6a 100644
--- a/base/applications/mspaint/lang/en-GB.rc
+++ b/base/applications/mspaint/lang/en-GB.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d dots per inch"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/en-US.rc b/base/applications/mspaint/lang/en-US.rc
index 935c3fe4c8b..805c239e8d0 100644
--- a/base/applications/mspaint/lang/en-US.rc
+++ b/base/applications/mspaint/lang/en-US.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d dots per inch"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/es-ES.rc b/base/applications/mspaint/lang/es-ES.rc
index ac60a967781..a851b972dfc 100644
--- a/base/applications/mspaint/lang/es-ES.rc
+++ b/base/applications/mspaint/lang/es-ES.rc
@@ -265,4 +265,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/et-EE.rc b/base/applications/mspaint/lang/et-EE.rc
index 1f8012d233f..78d33480f3a 100644
--- a/base/applications/mspaint/lang/et-EE.rc
+++ b/base/applications/mspaint/lang/et-EE.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/eu-ES.rc b/base/applications/mspaint/lang/eu-ES.rc
index 1adb078efad..f9f38cd2056 100644
--- a/base/applications/mspaint/lang/eu-ES.rc
+++ b/base/applications/mspaint/lang/eu-ES.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/fr-FR.rc b/base/applications/mspaint/lang/fr-FR.rc
index cadd7699281..8ea08410321 100644
--- a/base/applications/mspaint/lang/fr-FR.rc
+++ b/base/applications/mspaint/lang/fr-FR.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/he-IL.rc b/base/applications/mspaint/lang/he-IL.rc
index 03b1ef391e8..7735f853725 100644
--- a/base/applications/mspaint/lang/he-IL.rc
+++ b/base/applications/mspaint/lang/he-IL.rc
@@ -265,4 +265,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/hu-HU.rc b/base/applications/mspaint/lang/hu-HU.rc
index d3299286f57..03315eabded 100644
--- a/base/applications/mspaint/lang/hu-HU.rc
+++ b/base/applications/mspaint/lang/hu-HU.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/id-ID.rc b/base/applications/mspaint/lang/id-ID.rc
index 9ae48324433..eeda00200d3 100644
--- a/base/applications/mspaint/lang/id-ID.rc
+++ b/base/applications/mspaint/lang/id-ID.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/it-IT.rc b/base/applications/mspaint/lang/it-IT.rc
index d55a546848e..63ad7624367 100644
--- a/base/applications/mspaint/lang/it-IT.rc
+++ b/base/applications/mspaint/lang/it-IT.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/ja-JP.rc b/base/applications/mspaint/lang/ja-JP.rc
index b44eb8b4b74..a98a0f73bab 100644
--- a/base/applications/mspaint/lang/ja-JP.rc
+++ b/base/applications/mspaint/lang/ja-JP.rc
@@ -264,4 +264,5 @@ BEGIN
IDS_PRINTRES "%d x %d ピクセル/cm"
IDS_CANTPASTE "クリップボードからの貼り付けに失敗しました。データ形式が間違っているか、未対応です。"
IDS_SAVEERROR "次のファイルとして画像を保存するのに失敗しました:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/nl-NL.rc b/base/applications/mspaint/lang/nl-NL.rc
index a08efcab887..29daec70fc7 100644
--- a/base/applications/mspaint/lang/nl-NL.rc
+++ b/base/applications/mspaint/lang/nl-NL.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/no-NO.rc b/base/applications/mspaint/lang/no-NO.rc
index 40290499bb0..7a16a4d668f 100644
--- a/base/applications/mspaint/lang/no-NO.rc
+++ b/base/applications/mspaint/lang/no-NO.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/pl-PL.rc b/base/applications/mspaint/lang/pl-PL.rc
index 9dbc184b3c1..b35b2691d2a 100644
--- a/base/applications/mspaint/lang/pl-PL.rc
+++ b/base/applications/mspaint/lang/pl-PL.rc
@@ -265,4 +265,5 @@ BEGIN
IDS_PRINTRES "%d x %d piksel/cm"
IDS_CANTPASTE "Nie można wkleić ze schowka. Format danych jest nieprawidłowy lub nieobsługiwany."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/pt-BR.rc b/base/applications/mspaint/lang/pt-BR.rc
index 9ae3d5de864..c551cd77671 100644
--- a/base/applications/mspaint/lang/pt-BR.rc
+++ b/base/applications/mspaint/lang/pt-BR.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/pt-PT.rc b/base/applications/mspaint/lang/pt-PT.rc
index 8f164db2991..7ff2ba98503 100644
--- a/base/applications/mspaint/lang/pt-PT.rc
+++ b/base/applications/mspaint/lang/pt-PT.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/ro-RO.rc b/base/applications/mspaint/lang/ro-RO.rc
index d6afd6a9a01..447e01c5337 100644
--- a/base/applications/mspaint/lang/ro-RO.rc
+++ b/base/applications/mspaint/lang/ro-RO.rc
@@ -264,4 +264,5 @@ BEGIN
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 "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/ru-RU.rc b/base/applications/mspaint/lang/ru-RU.rc
index 654ea538794..125eadbcfdf 100644
--- a/base/applications/mspaint/lang/ru-RU.rc
+++ b/base/applications/mspaint/lang/ru-RU.rc
@@ -266,4 +266,5 @@ BEGIN
IDS_PRINTRES "%d x %d точек/см"
IDS_CANTPASTE "Не удалось вставить из буфера обмена. Формат данных либо некорректный, либо не поддерживается."
IDS_SAVEERROR "Не удалось сохранить точечный рисунок в файл:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/sk-SK.rc b/base/applications/mspaint/lang/sk-SK.rc
index de9943cb899..dd80ce12592 100644
--- a/base/applications/mspaint/lang/sk-SK.rc
+++ b/base/applications/mspaint/lang/sk-SK.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/sq-AL.rc b/base/applications/mspaint/lang/sq-AL.rc
index ca4fb20a5bc..a60ef9a2774 100644
--- a/base/applications/mspaint/lang/sq-AL.rc
+++ b/base/applications/mspaint/lang/sq-AL.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/sv-SE.rc b/base/applications/mspaint/lang/sv-SE.rc
index a944710d617..dfe72b9b0b9 100644
--- a/base/applications/mspaint/lang/sv-SE.rc
+++ b/base/applications/mspaint/lang/sv-SE.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/tr-TR.rc b/base/applications/mspaint/lang/tr-TR.rc
index 9026820d5d7..fab8c39fcc3 100644
--- a/base/applications/mspaint/lang/tr-TR.rc
+++ b/base/applications/mspaint/lang/tr-TR.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/uk-UA.rc b/base/applications/mspaint/lang/uk-UA.rc
index 2710a7e410a..f0e0676589a 100644
--- a/base/applications/mspaint/lang/uk-UA.rc
+++ b/base/applications/mspaint/lang/uk-UA.rc
@@ -264,4 +264,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/vi-VN.rc b/base/applications/mspaint/lang/vi-VN.rc
index 4cc725d213c..b1c7c2cc227 100644
--- a/base/applications/mspaint/lang/vi-VN.rc
+++ b/base/applications/mspaint/lang/vi-VN.rc
@@ -262,4 +262,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/zh-CN.rc b/base/applications/mspaint/lang/zh-CN.rc
index e2283e68e6f..43fa7f34582 100644
--- a/base/applications/mspaint/lang/zh-CN.rc
+++ b/base/applications/mspaint/lang/zh-CN.rc
@@ -265,4 +265,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/zh-HK.rc b/base/applications/mspaint/lang/zh-HK.rc
index c76ec7920aa..ff88459ddc6 100644
--- a/base/applications/mspaint/lang/zh-HK.rc
+++ b/base/applications/mspaint/lang/zh-HK.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/lang/zh-TW.rc b/base/applications/mspaint/lang/zh-TW.rc
index 776a7e5d7e3..10401e53cb8 100644
--- a/base/applications/mspaint/lang/zh-TW.rc
+++ b/base/applications/mspaint/lang/zh-TW.rc
@@ -263,4 +263,5 @@ BEGIN
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
+ IDS_CANTSENDMAIL "Failed to send a mail."
END
diff --git a/base/applications/mspaint/main.cpp b/base/applications/mspaint/main.cpp
index a4cbb54b5b0..ba7ad18c213 100644
--- a/base/applications/mspaint/main.cpp
+++ b/base/applications/mspaint/main.cpp
@@ -7,10 +7,14 @@
#include "precomp.h"
+#include <mapi.h>
+#include <mapicode.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_szMailTempFile[MAX_LONG_PATH] = { 0 };
BOOL g_isAFile = FALSE;
BOOL g_imageSaved = FALSE;
BOOL g_showGrid = FALSE;
@@ -69,6 +73,116 @@ OFNHookProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
}
+typedef ULONG (WINAPI *FN_MAPISendMail)(LHANDLE, ULONG_PTR, lpMapiMessage, FLAGS, ULONG);
+typedef ULONG (WINAPI *FN_MAPISendMailW)(LHANDLE, ULONG_PTR, lpMapiMessageW, FLAGS, ULONG);
+
+BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName)
+{
+ // Delete the temporary file if any
+ if (g_szMailTempFile[0])
+ {
+ ::DeleteFileW(g_szMailTempFile);
+ g_szMailTempFile[0] = UNICODE_NULL;
+ }
+
+ CStringW strFileTitle;
+ if (PathFileExistsW(pszPathName) && imageModel.IsImageSaved())
+ {
+ strFileTitle = PathFindFileNameW(pszPathName);
+ }
+ else // Not existing or not saved
+ {
+ // Get the name of a temporary file
+ WCHAR szTempDir[MAX_PATH];
+ ::GetTempPathW(_countof(szTempDir), szTempDir);
+ if (!::GetTempFileNameW(szTempDir, L"afx", 0, g_szMailTempFile))
+ return FALSE; // Failure
+
+ if (PathFileExistsW(g_szFileName))
+ {
+ // Set file title
+ strFileTitle = PathFindFileNameW(g_szFileName);
+
+ // Copy to the temporary file
+ if (!::CopyFileW(g_szFileName, g_szMailTempFile, FALSE))
+ {
+ g_szMailTempFile[0] = UNICODE_NULL;
+ return FALSE; // Failure
+ }
+ }
+ else
+ {
+ // Set file title
+ strFileTitle.LoadString(IDS_DEFAULTFILENAME);
+ strFileTitle += L".png";
+
+ // Save it to the temporary file
+ HBITMAP hbm = imageModel.CopyBitmap();
+ BOOL ret = SaveDIBToFile(hbm, g_szMailTempFile, FALSE, Gdiplus::ImageFormatPNG);
+ ::DeleteObject(hbm);
+ if (!ret)
+ {
+ g_szMailTempFile[0] = UNICODE_NULL;
+ return FALSE; // Failure
+ }
+ }
+
+ // Use the temporary file
+ pszPathName = g_szMailTempFile;
+ }
+
+ // Load "mapi32.dll"
+ HINSTANCE hMAPI = LoadLibraryW(L"mapi32.dll");
+ if (!hMAPI)
+ return FALSE; // Failure
+
+ // Attachment
+ MapiFileDescW attachmentW = { 0 };
+ attachmentW.nPosition = (ULONG)-1;
+ attachmentW.lpszPathName = (LPWSTR)pszPathName;
+ attachmentW.lpszFileName = (LPWSTR)(LPCWSTR)strFileTitle;
+
+ // Message with attachment
+ MapiMessageW messageW = { 0 };
+ messageW.lpszSubject = NULL;
+ messageW.nFileCount = 1;
+ messageW.lpFiles = &attachmentW;
+
+ // First, try to open the mailer by the function of Unicode version
+ FN_MAPISendMailW pMAPISendMailW = (FN_MAPISendMailW)::GetProcAddress(hMAPI, "MAPISendMailW");
+ if (pMAPISendMailW)
+ {
+ pMAPISendMailW(0, (ULONG_PTR)hWnd, &messageW, MAPI_DIALOG | MAPI_LOGON_UI, 0);
+ ::FreeLibrary(hMAPI);
+ return TRUE; // MAPISendMailW will show an error message on failure
+ }
+
+ // Convert to ANSI strings
+ CStringA szPathNameA(pszPathName), szFileTitleA(strFileTitle);
+
+ MapiFileDesc attachment = { 0 };
+ attachment.nPosition = (ULONG)-1;
+ attachment.lpszPathName = (LPSTR)(LPCSTR)szPathNameA;
+ attachment.lpszFileName = (LPSTR)(LPCSTR)szFileTitleA;
+
+ MapiMessage message = { 0 };
+ message.lpszSubject = NULL;
+ message.nFileCount = 1;
+ message.lpFiles = &attachment;
+
+ // Try again but in ANSI version
+ FN_MAPISendMail pMAPISendMail = (FN_MAPISendMail)::GetProcAddress(hMAPI, "MAPISendMail");
+ if (pMAPISendMail)
+ {
+ pMAPISendMail(0, (ULONG_PTR)hWnd, &message, MAPI_DIALOG | MAPI_LOGON_UI, 0);
+ ::FreeLibrary(hMAPI);
+ return TRUE; // MAPISendMail will show an error message on failure
+ }
+
+ ::FreeLibrary(hMAPI);
+ return FALSE; // Failure
+}
+
BOOL CMainWindow::GetOpenFileName(IN OUT LPTSTR pszFile, INT cchMaxFile)
{
static OPENFILENAME ofn = { 0 };
@@ -238,6 +352,9 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nC
// Write back settings to registry
registrySettings.Store();
+ if (g_szMailTempFile[0])
+ ::DeleteFileW(g_szMailTempFile);
+
// Return the value that PostQuitMessage() gave
return (INT)msg.wParam;
}
diff --git a/base/applications/mspaint/resource.h b/base/applications/mspaint/resource.h
index 1e34232d3c1..4ec9f9a0f98 100644
--- a/base/applications/mspaint/resource.h
+++ b/base/applications/mspaint/resource.h
@@ -221,3 +221,4 @@
#define IDS_PRINTRES 939
#define IDS_CANTPASTE 940
#define IDS_SAVEERROR 941
+#define IDS_CANTSENDMAIL 942
diff --git a/base/applications/mspaint/winproc.cpp b/base/applications/mspaint/winproc.cpp
index f930174d45d..7aa25091766 100644
--- a/base/applications/mspaint/winproc.cpp
+++ b/base/applications/mspaint/winproc.cpp
@@ -666,6 +666,13 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
if (pd.hDevNames)
GlobalFree(pd.hDevNames);
break;
+ case IDM_FILESEND:
+ canvasWindow.finishDrawing();
+ if (!OpenMailer(m_hWnd, g_szFileName))
+ {
+ ShowError(IDS_CANTSENDMAIL);
+ }
+ break;
case IDM_FILEASWALLPAPERPLANE:
RegistrySettings::SetWallpaper(g_szFileName, RegistrySettings::TILED);
break;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3463a3fba35489c36301f…
commit 3463a3fba35489c36301f11a7f3b164c2570257c
Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com>
AuthorDate: Wed Aug 9 05:54:52 2023 -0400
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Aug 9 11:54:52 2023 +0200
[USETUP] Update Portuguese (pt-PT) translation (#5508)
Fix a typo, and add three forgotten error codes to pt-PT language.
Co-authored-by: SecurityAndStuff <74931194+SecurityAndStuff(a)users.noreply.github.com>
---
base/setup/usetup/lang/pt-PT.h | 51 +++++++++++++++++++++++++++---------------
1 file changed, 33 insertions(+), 18 deletions(-)
diff --git a/base/setup/usetup/lang/pt-PT.h b/base/setup/usetup/lang/pt-PT.h
index 3338810b0ac..6ee892d49ba 100644
--- a/base/setup/usetup/lang/pt-PT.h
+++ b/base/setup/usetup/lang/pt-PT.h
@@ -1389,7 +1389,7 @@ static MUI_ENTRY ptPTInstallDirectoryEntries[] =
{
6,
8,
- "O instalador ir\240 copiar os arquivos para a parti\207\306o seleccionada.",
+ "O instalador ir\240 copiar os ficheiros para a parti\207\306o seleccionada.",
TEXT_STYLE_NORMAL,
TEXT_ID_STATIC
},
@@ -1455,7 +1455,7 @@ static MUI_ENTRY ptPTFileCopyEntries[] =
{
0,
13,
- "arquivos do ReactOS para a pasta de instala\207\306o.",
+ "ficheiros do ReactOS para a pasta de instala\207\306o.",
TEXT_STYLE_NORMAL | TEXT_ALIGN_CENTER,
TEXT_ID_STATIC
},
@@ -1702,7 +1702,7 @@ static MUI_ENTRY ptPTPrepareCopyEntries[] =
{
6,
8,
- "O instalador est\240 a preparar o computador para copiar os arquivos",
+ "O instalador est\240 a preparar o computador para copiar os ficheiros",
TEXT_STYLE_NORMAL,
TEXT_ID_STATIC
},
@@ -1716,7 +1716,7 @@ static MUI_ENTRY ptPTPrepareCopyEntries[] =
{
0,
0,
- "A montar a lista de arquivos a serem copiados...",
+ "A montar a lista de ficheiros a serem copiados...",
TEXT_TYPE_STATUS | TEXT_PADDING_BIG,
TEXT_ID_STATIC
},
@@ -1741,7 +1741,7 @@ static MUI_ENTRY ptPTSelectFSEntries[] =
{
6,
16,
- "Seleccione um sistema de arquivos para a nova parti\207\306o na lista abaixo.",
+ "Seleccione um sistema de ficheiros para a nova parti\207\306o na lista abaixo.",
0
},
{
@@ -1753,7 +1753,7 @@ static MUI_ENTRY ptPTSelectFSEntries[] =
{
6,
18,
- "sistema de arquivos desejado e pressione ENTER.",
+ "sistema de ficheiros desejado e pressione ENTER.",
0
},
{
@@ -1884,9 +1884,24 @@ MUI_ERROR ptPTErrorEntries[] =
" \x07 Para sair da instala\207\306o, pressione F3.",
"F3=Sair ENTER=Continuar"
},
+ {
+ // ERROR_NO_BUILD_PATH
+ "Falha ao criar os caminhos para o direct\242rio de instala\207\306o do ReactOS!\n"
+ "ENTER = Reiniciar o computador"
+ },
+ {
+ // ERROR_SOURCE_PATH
+ "N\306o pode excluir a parti\207\306o que cont\202m a fonte de instala\207\306o!\n"
+ "ENTER = Reiniciar o computador"
+ },
+ {
+ // ERROR_SOURCE_DIR
+ "N\306o pode instalar o ReactOS dentro do direct\242rio de origem da instala\207\306o!\n"
+ "ENTER = Reiniciar o computador"
+ },
{
// ERROR_NO_HDD
- "N\306o foi poss\241vel localizar um disco r\241digo.\n",
+ "N\306o foi poss\241vel localizar um disco r\241gido.\n",
"ENTER=Reiniciar"
},
{
@@ -1896,17 +1911,17 @@ MUI_ERROR ptPTErrorEntries[] =
},
{
// ERROR_LOAD_TXTSETUPSIF
- "N\306o foi poss\241vel carregar o arquivo TXTSETUP.SIF.\n",
+ "N\306o foi poss\241vel carregar o ficheiro TXTSETUP.SIF.\n",
"ENTER=Reiniciar"
},
{
// ERROR_CORRUPT_TXTSETUPSIF
- "O arquivos TXTSETUP.SIF est\240 corrompido.\n",
+ "O ficheiro TXTSETUP.SIF est\240 corrompido.\n",
"ENTER=Reiniciar"
},
{
// ERROR_SIGNATURE_TXTSETUPSIF,
- "O arquivo TXTSETUP.SIF est\240 com a assinatura incorrecta.\n",
+ "O ficheiro TXTSETUP.SIF est\240 com a assinatura incorrecta.\n",
"ENTER=Reiniciar"
},
{
@@ -1987,12 +2002,12 @@ MUI_ERROR ptPTErrorEntries[] =
},
{
// ERROR_IMPORT_HIVE,
- "N\306o foi poss\241vel importar o arquivo de estrutura.",
+ "N\306o foi poss\241vel importar o ficheiro de estrutura.",
"ENTER=Reiniciar"
},
{
// ERROR_FIND_REGISTRY
- "N\306o foi poss\241vel encontrar os arquivos do registo.",
+ "N\306o foi poss\241vel encontrar os ficheiros do registo.",
"ENTER=Reiniciar"
},
{
@@ -2007,22 +2022,22 @@ MUI_ERROR ptPTErrorEntries[] =
},
{
// ERROR_INVALID_CABINET_INF,
- "O arquivo cab n\306o cont\202m um arquivo inf v\240lido.\n",
+ "O ficheiro cab n\306o cont\202m um ficheiro inf v\240lido.\n",
"ENTER=Reiniciar"
},
{
// ERROR_CABINET_MISSING,
- "N\306o foi poss\241vel econtrar o arquivo cab.\n",
+ "N\306o foi poss\241vel encontrar o ficheiro cab.\n",
"ENTER=Reiniciar"
},
{
// ERROR_CABINET_SCRIPT,
- "O arquivo cab n\306o cont\202m um script de instala\207\306o.\n",
+ "O ficheiro cab n\306o cont\202m um script de instala\207\306o.\n",
"ENTER=Reiniciar"
},
{
// ERROR_COPY_QUEUE,
- "N\306o foi poss\241vel abrir a lista de arquivos para c\242pia.\n",
+ "N\306o foi poss\241vel abrir a lista de ficheiros para c\242pia.\n",
"ENTER=Reiniciar"
},
{
@@ -2033,13 +2048,13 @@ MUI_ERROR ptPTErrorEntries[] =
{
// ERROR_TXTSETUP_SECTION,
"N\306o foi poss\241vel encontrar a sec\207\306o '%S' no\n"
- "arquivo TXTSETUP.SIF.\n",
+ "ficheiro TXTSETUP.SIF.\n",
"ENTER=Reiniciar"
},
{
// ERROR_CABINET_SECTION,
"N\306o foi poss\241vel encontrar a sec\207\306o '%S' no\n"
- "arquivo cab.\n",
+ "ficheiro cab.\n",
"ENTER=Reiniciar"
},
{