[MSPAINT] Improve behaviour on memory shortage (#7780)

Improve UX on memory shortage.
JIRA issue: CORE-20020
- Clear history on memory shortage.
- Improve CCanvasWindow::OnPaint on memory
  shortage.
- Add null check in CCanvasWindow::DoDraw.
- Retire using of cache in CCanvasWindow.
This commit is contained in:
Katayama Hirofumi MZ 2025-03-25 10:45:23 +09:00 committed by GitHub
parent c930c8c464
commit 9563c07146
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 18 deletions

View file

@ -57,12 +57,11 @@ public:
protected:
HITTEST m_hitCanvasSizeBox;
POINT m_ptOrig; // The origin of drag start
HBITMAP m_ahbmCached[2]; // The cached buffer bitmaps
CRect m_rcResizing; // Resizing rectagle
HITTEST CanvasHitTest(POINT pt);
RECT GetBaseRect();
VOID DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint);
BOOL DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint);
VOID OnHVScroll(WPARAM wParam, INT fnBar);
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);