mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:13:03 +00:00
[MSPAINT] Improve Undo/Redo and finishing tool (#4324)
- Fix Undo/Redo mechanism. - Finish drawing when the tool is to be chanaged and when the file is to be saved. - Add ToolBase::OnFinishDraw to virtualize finishing drawing. - Extend bClearRedo parameter to ImageModel::Undo. - Add ImageModel::DrawSelectionBackground and ImageModel::DeleteSelection methods. - Fix some WM_PAINT message handling. CORE-17969
This commit is contained in:
parent
c5b029d0fc
commit
0839711566
14 changed files with 313 additions and 151 deletions
|
@ -19,9 +19,9 @@ LRESULT CPaletteWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& b
|
|||
HBRUSH oldBrush;
|
||||
int i, a, b;
|
||||
|
||||
DefWindowProc(WM_PAINT, wParam, lParam);
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC = BeginPaint(&ps);
|
||||
|
||||
HDC hDC = GetDC();
|
||||
for(b = 2; b < 30; b++)
|
||||
for(a = 2; a < 29; a++)
|
||||
if ((a + b) % 2 == 1)
|
||||
|
@ -54,7 +54,7 @@ LRESULT CPaletteWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& b
|
|||
DeleteObject(SelectObject(hDC, oldBrush));
|
||||
DeleteObject(SelectObject(hDC, oldPen));
|
||||
}
|
||||
ReleaseDC(hDC);
|
||||
EndPaint(&ps);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue