mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:02:56 +00:00
[MSPAINT] Establish Undo/Redo management (#5347)
- Painting the canvas is done by overlaying the multiple layers. - Drawing each overlay is implemented as polymorphism of OOP. - Refine the Undo/Redo mechanism. - Some adjustments. CORE-17969
This commit is contained in:
parent
b7071f67a8
commit
e8c7e30030
25 changed files with 721 additions and 504 deletions
|
@ -61,7 +61,7 @@ void CTextEditWindow::FixEditPos(LPCTSTR pszOldText)
|
|||
SelectObject(hDC, m_hFontZoomed);
|
||||
TEXTMETRIC tm;
|
||||
GetTextMetrics(hDC, &tm);
|
||||
szText += TEXT("x"); // This is a trick to enable the last newlines
|
||||
szText += TEXT("x"); // This is a trick to enable the g_ptEnd newlines
|
||||
const UINT uFormat = DT_LEFT | DT_TOP | DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP |
|
||||
DT_EXPANDTABS | DT_WORDBREAK;
|
||||
DrawText(hDC, szText, -1, &rcText, uFormat | DT_CALCRECT);
|
||||
|
@ -235,7 +235,7 @@ HWND CTextEditWindow::Create(HWND hwndParent)
|
|||
const DWORD style = ES_LEFT | ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL |
|
||||
WS_CHILD | WS_THICKFRAME;
|
||||
HWND hwnd = ::CreateWindowEx(0, WC_EDIT, NULL, style, 0, 0, 0, 0,
|
||||
hwndParent, NULL, hProgInstance, NULL);
|
||||
hwndParent, NULL, g_hinstExe, NULL);
|
||||
if (hwnd)
|
||||
{
|
||||
#undef SubclassWindow // Don't use this macro
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue