Theming & code duplication

Robert Shearman rob at codeweavers.com
Wed Jul 27 10:36:36 CDT 2005


Frank Richter wrote:

>Hi,
>somewhat recently I sent some code to wine-patches to add button
>theming; if you have glanced at it, despite utilizing subclassing, code
>was duplicated from the button code in user.
>
>In particular, the themed button does its own state management. The
>reason is that upon state changes, the user32 button control does some
>repaints internally, ie calling the paint function directly - those
>can't obviously be hooked by subclassing alone. In early versions I had
>the themed button painted over after state-changing messages, but that
>causes visible flickering (since the button is first painted in
>"classic" style and the themed style is painted above that).
>  
>

You could make the code to using RedrawWindow(... RDW_UPDATENOW), 
assuming that the paint functions it is calling are for the whole 
control, not a component of the control.

-- 
Rob Shearman




More information about the wine-devel mailing list