Re: user32: Add check for the need to redraw static control after STM_SETIMAGE and STM_SETICON
Ilya Shpigor wrote:
Hi,
This patch fix the redrawing static controls after the processing STM_SETIMAGE and STM_SETICON messages with errors.
--- + if ((style & SS_TYPEMASK) != SS_ICON) return (HICON)-1; ... + if ((style & SS_TYPEMASK) != SS_BITMAP) return (HBITMAP)-1; ... + if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return (HENHMETAFILE)-1; --- Add tests for that please (MSDN tells about 0 return value on error).
On Saturday 26 September 2009 12:09:30 Nikolay Sivov wrote:
--- + if ((style & SS_TYPEMASK) != SS_ICON) return (HICON)-1; ... + if ((style & SS_TYPEMASK) != SS_BITMAP) return (HBITMAP)-1; ... + if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return (HENHMETAFILE)-1; ---
Add tests for that please (MSDN tells about 0 return value on error).
Yes, MSDN tells about 0. The -1 value is used for detecting the errors inside Wine and blocking the static controls redrawing. Then the 0 value is returned to application: - STATIC_TryPaintFcn( hwnd, full_style ); + if (lResult != -1) + STATIC_TryPaintFcn( hwnd, full_style ); + else + lResult = 0; Tests for checking STM_SETIMAGE and STM_SETICON messages processing had been sent above: [TRY 3] user32/tests: Add tests for STM_SETIMAGE and STM_SETICON message processing Is there a better way to block this redrawing? -- Best regards, Ilya Shpigor.
"Ilya Shpigor" <shpigor(a)etersoft.ru> wrote:
Yes, MSDN tells about 0. The -1 value is used for detecting the errors inside Wine and blocking the static controls redrawing. Then the 0 value is returned to application:
- STATIC_TryPaintFcn( hwnd, full_style ); + if (lResult != -1) + STATIC_TryPaintFcn( hwnd, full_style ); + else + lResult = 0;
Tests for checking STM_SETIMAGE and STM_SETICON messages processing had been sent above:
[TRY 3] user32/tests: Add tests for STM_SETIMAGE and STM_SETICON message processing
Is there a better way to block this redrawing?
First thing to do (as usual) is to add the test to show the drawing behaviour. -- Dmitry.
participants (3)
-
Dmitry Timoshkov -
Ilya Shpigor -
Nikolay Sivov