mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:33:16 +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
|
@ -547,7 +547,6 @@ struct TextTool : ToolBase
|
|||
|
||||
// Draw the text
|
||||
INT style = (toolsModel.IsBackgroundTransparent() ? 0 : 1);
|
||||
imageModel.PushImageForUndo();
|
||||
Text(hdc, rc.left, rc.top, rc.right, rc.bottom, m_fg, m_bg, szText,
|
||||
textEditWindow.GetFont(), style);
|
||||
}
|
||||
|
@ -568,12 +567,11 @@ struct TextTool : ToolBase
|
|||
BOOL bTextBoxShown = ::IsWindowVisible(textEditWindow);
|
||||
if (bTextBoxShown && textEditWindow.GetWindowTextLength() > 0)
|
||||
{
|
||||
imageModel.PushImageForUndo();
|
||||
draw(m_hdc);
|
||||
|
||||
if (selectionModel.m_rc.IsRectEmpty())
|
||||
if (::IsRectEmpty(&selectionModel.m_rc))
|
||||
{
|
||||
textEditWindow.ShowWindow(SW_HIDE);
|
||||
textEditWindow.SetWindowText(NULL);
|
||||
quit();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -613,6 +611,7 @@ struct TextTool : ToolBase
|
|||
|
||||
void OnFinishDraw() override
|
||||
{
|
||||
imageModel.PushImageForUndo();
|
||||
draw(m_hdc);
|
||||
quit();
|
||||
ToolBase::OnFinishDraw();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue