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); };