mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 08:51:29 +00:00
[MSPAINT] Fix Copy and Paste
Call GetSelectionContents in SelectionModel::GetBitmap. CORE-18920, CORE-18867
This commit is contained in:
parent
639739a7cd
commit
96c7fe4ccd
|
@ -349,8 +349,10 @@ void SelectionModel::StretchSkew(int nStretchPercentX, int nStretchPercentY, int
|
||||||
NotifyRefreshNeeded();
|
NotifyRefreshNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
HBITMAP SelectionModel::GetBitmap() const
|
HBITMAP SelectionModel::GetBitmap()
|
||||||
{
|
{
|
||||||
|
if (m_hbmColor == NULL)
|
||||||
|
GetSelectionContents(imageModel.GetDC());
|
||||||
return m_hbmColor;
|
return m_hbmColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
BOOL TakeOff();
|
BOOL TakeOff();
|
||||||
void Landing();
|
void Landing();
|
||||||
|
|
||||||
HBITMAP GetBitmap() const;
|
HBITMAP GetBitmap();
|
||||||
void GetSelectionContents(HDC hDCImage);
|
void GetSelectionContents(HDC hDCImage);
|
||||||
void DrawFramePoly(HDC hDCImage);
|
void DrawFramePoly(HDC hDCImage);
|
||||||
void DrawBackgroundPoly(HDC hDCImage, COLORREF crBg);
|
void DrawBackgroundPoly(HDC hDCImage, COLORREF crBg);
|
||||||
|
|
|
@ -648,10 +648,12 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
||||||
canvasWindow.Invalidate(FALSE);
|
canvasWindow.Invalidate(FALSE);
|
||||||
break;
|
break;
|
||||||
case IDM_EDITCOPY:
|
case IDM_EDITCOPY:
|
||||||
OpenClipboard();
|
if (OpenClipboard())
|
||||||
EmptyClipboard();
|
{
|
||||||
SetClipboardData(CF_BITMAP, CopyDIBImage(selectionModel.GetBitmap()));
|
EmptyClipboard();
|
||||||
CloseClipboard();
|
SetClipboardData(CF_BITMAP, CopyDIBImage(selectionModel.GetBitmap()));
|
||||||
|
CloseClipboard();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case IDM_EDITCUT:
|
case IDM_EDITCUT:
|
||||||
/* Copy */
|
/* Copy */
|
||||||
|
|
Loading…
Reference in a new issue