mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:23:01 +00:00
[MSPAINT] Use CF_DIB instead of CF_BITMAP (#5349)
CF_BITMAP is not recommended format for copying. In fact, Win10 won't accept it. - Use CF_DIB clipboard format instead of CF_BITMAP in copying. - Use CF_ENHMETAFILE, CF_DIB, or CF_BITMAP in pasting. - Add BitmapToClipboardDIB, BitmapFromClipboardDIB, and BitmapFromHEMF helper functions to dib.cpp. - Re-enable paste by fixing the bug that is embugged in the previous commit. - Enable Cut, Copy, Paste, and Delete on text editing box by modifying OnInitMenuPopup. - Add IDS_CANTPASTE resource string to show message on paste failure. CORE-18867
This commit is contained in:
parent
aaa0cb6724
commit
9f56e67bc2
38 changed files with 320 additions and 45 deletions
|
@ -205,8 +205,12 @@ void SelectionModel::InsertFromHBITMAP(HBITMAP hBm, INT x, INT y)
|
|||
|
||||
m_rc.left = x;
|
||||
m_rc.top = y;
|
||||
m_rc.right = m_rc.left + GetDIBWidth(hBm);
|
||||
m_rc.bottom = m_rc.top + GetDIBHeight(hBm);
|
||||
m_rc.right = x + GetDIBWidth(hBm);
|
||||
m_rc.bottom = y + GetDIBHeight(hBm);
|
||||
|
||||
// If m_rc and m_rcOld were same, the image cannot be pasted to the canvas.
|
||||
// See also SelectionModel::Landing
|
||||
::SetRect(&m_rcOld, -2, -2, -1, -1); // Outside of image
|
||||
|
||||
ClearMask();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue