Module: wine Branch: master Commit: 250855bfb0fd5535757bc4707cae7b36c321afac URL: http://source.winehq.org/git/wine.git/?a=commit;h=250855bfb0fd5535757bc4707c...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Tue Jun 15 00:07:40 2010 -0400
wordpad: Fix failing GetDlgItem that forced screen repaint.
The rebar is the parent of the ruler, not the top level window, so GetDlgItem was returning NULL when the window is resized. As a result the screen was being invalidated and repainted instead of the ruler.
---
programs/wordpad/wordpad.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 3b8b6bc..d73a79b 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -2546,7 +2546,7 @@ static LRESULT OnSize( HWND hWnd, WPARAM wParam, LPARAM lParam ) HWND hwndEditor = preview_isactive() ? GetDlgItem(hWnd, IDC_PREVIEW) : GetDlgItem(hWnd, IDC_EDITOR); HWND hwndStatusBar = GetDlgItem(hWnd, IDC_STATUSBAR); HWND hwndReBar = GetDlgItem(hWnd, IDC_REBAR); - HWND hRulerWnd = GetDlgItem(hWnd, IDC_RULER); + HWND hRulerWnd = GetDlgItem(hwndReBar, IDC_RULER); int rebarHeight = 0;
if (hwndStatusBar)