mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[NOTEPAD]
- Preserve modification flag when toggling the "Word Wrap" option. Patch by Edijs Kolesnikovičs. CORE-7589 #resolve svn path=/trunk/; revision=61047
This commit is contained in:
parent
1722e89f78
commit
a5c44c54db
1 changed files with 8 additions and 1 deletions
|
@ -130,7 +130,7 @@ static void UpdateWindowCaption(void)
|
|||
{
|
||||
LoadString(Globals.hInstance, STRING_UNTITLED, szCaption, SIZEOF(szCaption));
|
||||
}
|
||||
|
||||
|
||||
StringCchCat(szCaption, SIZEOF(szCaption), _T(" - "));
|
||||
StringCchCat(szCaption, SIZEOF(szCaption), szNotepad);
|
||||
SetWindowText(Globals.hMainWnd, szCaption);
|
||||
|
@ -790,6 +790,7 @@ VOID DoCreateEditWindow(VOID)
|
|||
DWORD dwStyle;
|
||||
int iSize;
|
||||
LPTSTR pTemp = NULL;
|
||||
BOOL bModified = FALSE;
|
||||
|
||||
iSize = 0;
|
||||
|
||||
|
@ -812,6 +813,9 @@ VOID DoCreateEditWindow(VOID)
|
|||
|
||||
// Recover the text into the control.
|
||||
GetWindowText(Globals.hEdit, pTemp, iSize + 1);
|
||||
|
||||
if (SendMessage(Globals.hEdit, EM_GETMODIFY, 0, 0))
|
||||
bModified = TRUE;
|
||||
}
|
||||
|
||||
// Restore original window procedure
|
||||
|
@ -863,6 +867,9 @@ VOID DoCreateEditWindow(VOID)
|
|||
{
|
||||
SetWindowText(Globals.hEdit, pTemp);
|
||||
HeapFree(GetProcessHeap(), 0, pTemp);
|
||||
|
||||
if (bModified)
|
||||
SendMessage(Globals.hEdit, EM_SETMODIFY, TRUE, 0);
|
||||
}
|
||||
|
||||
// Sub-class a new window callback for row/column detection.
|
||||
|
|
Loading…
Reference in a new issue