https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5675604d2886f843087fe…
commit 5675604d2886f843087fe99743d7fdee5c52d795
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Jun 14 20:17:49 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Wed Jun 14 20:17:49 2023 +0900
[MSPAINT] CMiniatureWindow: Avoid too small
CORE-18867
---
base/applications/mspaint/miniature.cpp | 9 +++++++++
base/applications/mspaint/miniature.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/base/applications/mspaint/miniature.cpp
b/base/applications/mspaint/miniature.cpp
index d496a7f74a7..223b38e176a 100644
--- a/base/applications/mspaint/miniature.cpp
+++ b/base/applications/mspaint/miniature.cpp
@@ -106,3 +106,12 @@ LRESULT CMiniatureWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM
lParam, BOOL&
EndPaint(&ps);
return 0;
}
+
+LRESULT CMiniatureWindow::OnGetMinMaxInfo(UINT nMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
+{
+ // Avoid too small
+ LPMINMAXINFO pInfo = (LPMINMAXINFO)lParam;
+ pInfo->ptMinTrackSize.x = 100;
+ pInfo->ptMinTrackSize.y = 75;
+ return 0;
+}
diff --git a/base/applications/mspaint/miniature.h
b/base/applications/mspaint/miniature.h
index c8126de691a..e1ec6657f88 100644
--- a/base/applications/mspaint/miniature.h
+++ b/base/applications/mspaint/miniature.h
@@ -21,6 +21,7 @@ public:
MESSAGE_HANDLER(WM_CLOSE, OnClose)
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
+ MESSAGE_HANDLER(WM_GETMINMAXINFO, OnGetMinMaxInfo)
END_MSG_MAP()
HWND DoCreate(HWND hwndParent);
@@ -32,4 +33,5 @@ private:
LRESULT OnEraseBkgnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnGetMinMaxInfo(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);
};