LeandroA - He corregido para classic style del estilo
'Theme =========================================================================
Private Declare Function DrawThemeBackGround Lib "uxtheme.dll" Alias "DrawThemeBackground" (ByVal hTheme As Long, ByVal lhdc As Long, ByVal iPartId As Long, ByVal iStateId As Long, pRect As RECT2, pClipRect As Any) As Long
Private Declare Function OpenThemeData Lib "uxtheme.dll" (ByVal hwnd As Long, ByVal pszClassList As Long) As Long
Private Declare Function CloseThemeData Lib "uxtheme.dll" (ByVal hTheme As Long) As Long
'Private Declare Function CreateSolidBrush Lib "gdi32.dll" (ByVal crColor As Long) As Long
'Private Declare Function OleTranslateColor Lib "oleaut32.dll" (ByVal lOleColor As Long, ByVal lHPalette As Long, lColorRef As Long) As Long
'Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function FillRect Lib "user32.dll" (ByVal hdc As Long, ByRef lpRect As RECT2, ByVal hBrush As Long) As Long
Private mUseThemeReBar As Boolean
Case WM_ERASEBKGND
'-- Flat style bug [?]
'bHandled = True'<<<<
'===============================================================================
GetClientRect UserControl.hwnd, uRct
hTheme = OpenThemeData(0&, StrPtr("ReBar")) '/\/\/\/\/\
If mUseThemeReBar And hTheme Then
If (hTheme) Then
Call DrawThemeBackGround(hTheme, wParam, 6, 0&, uRct, ByVal 0&)
Call CloseThemeData(hTheme)
End If
Else
' hBrush = CreateSolidBrush(TranslateColor(UserControl.BackColor))
'
' If hBrush Then
' FillRect wParam, uRct, hBrush
' DeleteObject hBrush
' End If
bHandled = True '<<<<
End If
'==========