Byeong-Sik Jeon : notepad: Keep the modify information of edit control when toggle wrap line.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Sep 20 05:33:54 CDT 2006


Module: wine
Branch: master
Commit: 53a48942a0b09d213ca6abe3d815346f4878e9c3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=53a48942a0b09d213ca6abe3d815346f4878e9c3

Author: Byeong-Sik Jeon <wjsqudtlr at gmail.com>
Date:   Sat Sep 16 09:43:07 2006 +0900

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

---

 programs/notepad/dialog.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c
index a78b75b..a4f7de5 100644
--- a/programs/notepad/dialog.c
+++ b/programs/notepad/dialog.c
@@ -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);
     




More information about the wine-cvs mailing list