diff --git a/dlls/richedit/richedit.c b/dlls/richedit/richedit.c index aba1158442d..10d176a4a2c 100644 --- a/dlls/richedit/richedit.c +++ b/dlls/richedit/richedit.c @@ -147,8 +147,14 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, newstyle &= ~WS_VSCROLL; newstyle &= ~ES_AUTOHSCROLL; newstyle &= ~ES_AUTOVSCROLL; + newstyle &= ~ES_NUMBER; /* Reused as ES_DISABLENOSCROLL */ SetWindowLongA(hwnd,GWL_STYLE, newstyle); + /* Note that SetWindowLongA(hwnd,GWL_STYLE...) doesnt update + the style field in the text window as the edit structure is + not initialized until it processes this message. Therefore + update the style in the message itself */ + ((LPCREATESTRUCTA) lParam)->style = newstyle; return CallWindowProcA(lpfnEditWndProc, hwnd, uMsg, wParam, lParam); case WM_SETFOCUS :