• Zhiyi Zhang's avatar
    comctl32/toolbar: Don't use outside theme handles. · 8107462b
    Zhiyi Zhang authored
    Fix Spy++ Toolbar buttons have artifacts. Spy++ first creates a Toolbar window, then calls
    OpenThemeData(hwnd, "Rebar") with the Toolbar window. Then when the Toolbar control uses the theme
    handle from GetWindowTheme(), it gets a Rebar theme the next time it draws, thus drawing wrong theme
    parts.
    
    According the tests, not all of the common controls have such behaviors. Some of them do have theme
    handles opened by their window and then use that theme handle afterwards even it's changed from the
    outside. However, for other controls, the behaviors are not very consistent across all Windows
    versions. Also no applications depend on such behaviors for other controls yet. So, only modify the
    Toolbar control for now.
    Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    8107462b
toolbar.c 110 KB