Commit 53a48942 authored by Byeong-Sik Jeon's avatar Byeong-Sik Jeon Committed by Alexandre Julliard

notepad: Keep the modify information of edit control when toggle wrap line.

parent 876c9d16
......@@ -597,6 +597,7 @@ VOID DIALOG_EditTimeDate(VOID)
VOID DIALOG_EditWrap(VOID)
{
BOOL modify = FALSE;
static const WCHAR editW[] = { 'e','d','i','t',0 };
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL |
ES_AUTOVSCROLL | ES_MULTILINE;
......@@ -612,6 +613,7 @@ VOID DIALOG_EditWrap(VOID)
return;
}
GetWindowText(Globals.hEdit, pTemp, size);
modify = SendMessage(Globals.hEdit, EM_GETMODIFY, 0, 0);
DestroyWindow(Globals.hEdit);
GetClientRect(Globals.hMainWnd, &rc);
if( Globals.bWrapLongLines ) dwStyle |= WS_HSCROLL | ES_AUTOHSCROLL;
......@@ -620,6 +622,7 @@ VOID DIALOG_EditWrap(VOID)
NULL, Globals.hInstance, NULL);
SendMessage(Globals.hEdit, WM_SETFONT, (WPARAM)Globals.hFont, (LPARAM)FALSE);
SetWindowTextW(Globals.hEdit, pTemp);
SendMessage(Globals.hEdit, EM_SETMODIFY, (WPARAM)modify, 0);
SetFocus(Globals.hEdit);
HeapFree(GetProcessHeap(), 0, pTemp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment