Module: wine Branch: master Commit: 8242b651722c41564f165967a96978f2db36f4c2 URL: https://gitlab.winehq.org/wine/wine/-/commit/8242b651722c41564f165967a96978f...
Author: Jinoh Kang jinoh.kang.kr@gmail.com Date: Thu Dec 22 01:45:31 2022 +0900
regedit: Use the default WM_PAINT implementation for REGEDIT window.
---
programs/regedit/childwnd.c | 14 -------------- programs/regedit/main.c | 1 + 2 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c index c243a76c807..3f1797d31a0 100644 --- a/programs/regedit/childwnd.c +++ b/programs/regedit/childwnd.c @@ -79,17 +79,6 @@ static void ResizeWnd(int cx, int cy) EndDeferWindowPos(hdwp); }
-static void OnPaint(HWND hWnd) -{ - PAINTSTRUCT ps; - RECT rt; - - GetClientRect(hWnd, &rt); - BeginPaint(hWnd, &ps); - FillRect(ps.hdc, &rt, GetSysColorBrush(COLOR_BTNFACE)); - EndPaint(hWnd, &ps); -} - static LPWSTR CombinePaths(LPCWSTR pPaths[], int nPaths) { int i, len, pos; LPWSTR combined; @@ -455,9 +444,6 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa goto def; } break; - case WM_PAINT: - OnPaint(hWnd); - return 0; case WM_SETCURSOR: if (LOWORD(lParam) == HTCLIENT) { POINT pt; diff --git a/programs/regedit/main.c b/programs/regedit/main.c index b1035629726..4cc00d730a7 100644 --- a/programs/regedit/main.c +++ b/programs/regedit/main.c @@ -75,6 +75,7 @@ static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) wndclass.lpfnWndProc = ChildWndProc; wndclass.cbWndExtra = sizeof(HANDLE); wndclass.lpszClassName = szChildClass; + wndclass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); RegisterClassExW(&wndclass);
hMenuFrame = LoadMenuW(hInstance, MAKEINTRESOURCEW(IDR_REGEDIT_MENU));