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

This commit is contained in:
Byeong-Sik Jeon 2006-09-16 09:43:07 +09:00 committed by Alexandre Julliard
parent 876c9d16cd
commit 53a48942a0
1 changed files with 3 additions and 0 deletions

View File

@ -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);