@@ -101,36 +101,36 @@ THThemesClasses = class
101101 SetScrollRange
102102 ShowScrollBar
103103 }
104- TrampolineSetScrollPos : function (hWnd: HWND; nBar, nPos: Integer; bRedraw: BOOL): Integer; stdcall = nil ;
105- TrampolineSetScrollInfo : function (hWnd: HWND; BarFlag: Integer; const ScrollInfo: TScrollInfo; Redraw: BOOL): Integer; stdcall = nil ;
104+ // TrampolineSetScrollPos : function (hWnd: HWND; nBar, nPos: Integer; bRedraw: BOOL): Integer; stdcall = nil;
105+ // TrampolineSetScrollInfo : function (hWnd: HWND; BarFlag: Integer; const ScrollInfo: TScrollInfo; Redraw: BOOL): Integer; stdcall = nil;
106106
107107function Detour_UxTheme_DrawThemeText (hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; pszText: LPCWSTR; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD; const pRect: TRect): HRESULT; stdcall;
108108begin
109109 // AddLog('Detour_UxTheme_DrawThemeText', string(pszText));
110110 Exit(Trampoline_DrawThemeText(hTheme, hdc, iPartId, iStateId, pszText, iCharCount, dwTextFlags, dwTextFlags2, pRect));
111111end ;
112112
113- function Detour_WinApi_SetScrollPos (hWnd: HWND; nBar, nPos: Integer; bRedraw: BOOL): Integer; stdcall;
114- begin
115- ColorizerLock.Enter;
116- try
117- LastScrollWinControl:=FindControl(hWnd);
118- finally
119- ColorizerLock.Leave;
120- end ;
121- Exit(TrampolineSetScrollPos(hWnd, nBar, nPos, bRedraw));
122- end ;
123-
124- function Detour_WinApi_SetScrollInfo (hWnd: HWND; BarFlag: Integer; const ScrollInfo: TScrollInfo; Redraw: BOOL): Integer; stdcall;
125- begin
126- ColorizerLock.Enter;
127- try
128- LastScrollWinControl:=FindControl(hWnd);
129- finally
130- ColorizerLock.Leave;
131- end ;
132- Exit(TrampolineSetScrollInfo(hWnd, BarFlag, ScrollInfo, Redraw));
133- end ;
113+ // function Detour_WinApi_SetScrollPos(hWnd: HWND; nBar, nPos: Integer; bRedraw: BOOL): Integer; stdcall;
114+ // begin
115+ // ColorizerLock.Enter;
116+ // try
117+ // LastScrollWinControl:=FindControl(hWnd);
118+ // finally
119+ // ColorizerLock.Leave;
120+ // end;
121+ // Exit(TrampolineSetScrollPos(hWnd, nBar, nPos, bRedraw));
122+ // end;
123+ //
124+ // function Detour_WinApi_SetScrollInfo(hWnd: HWND; BarFlag: Integer; const ScrollInfo: TScrollInfo; Redraw: BOOL): Integer; stdcall;
125+ // begin
126+ // ColorizerLock.Enter;
127+ // try
128+ // LastScrollWinControl:=FindControl(hWnd);
129+ // finally
130+ // ColorizerLock.Leave;
131+ // end;
132+ // Exit(TrampolineSetScrollInfo(hWnd, BarFlag, ScrollInfo, Redraw));
133+ // end;
134134
135135type
136136 TWinControlClass = class (TWinControl);
@@ -759,6 +759,10 @@ function Detour_UxTheme_DrawThemeBackground(THEME: HTHEME; dc: HDC; iPartId, iS
759759 LSize.cy:=10 ;
760760 // LRect := Rect(0, 0, pRect.Width, pRect.Height);
761761 LRect := Rect(0 , 0 , LSize.Width, LSize.Height);
762+
763+ LBuffer.Canvas.Brush.Color:=LStyleServices.GetSystemColor(clWindow);
764+ LBuffer.Canvas.FillRect(LRect);
765+
762766 LBuffer.SetSize(LRect.Width, LRect.Height);
763767 LStyleServices.DrawElement(LBuffer.Canvas.Handle, LDetails, LRect);
764768 BitBlt(dc, pRect.Left, pRect.Top, LRect.Width, LRect.Height, LBuffer.Canvas.Handle, 0 , 0 , SRCCOPY);
@@ -832,6 +836,10 @@ function Detour_UxTheme_DrawThemeBackground(THEME: HTHEME; dc: HDC; iPartId, iS
832836 LSize.cy:=10 ;
833837 // LRect := Rect(0, 0, pRect.Width, pRect.Height);
834838 LRect := Rect(0 , 0 , LSize.Width, LSize.Height);
839+
840+ LBuffer.Canvas.Brush.Color:=LStyleServices.GetSystemColor(clWindow);
841+ LBuffer.Canvas.FillRect(LRect);
842+
835843 LBuffer.SetSize(LRect.Width, LRect.Height);
836844 LStyleServices.DrawElement(LBuffer.Canvas.Handle, LDetails, LRect);
837845 BitBlt(dc, pRect.Left, pRect.Top, LRect.Width, LRect.Height, LBuffer.Canvas.Handle, 0 , 0 , SRCCOPY);
@@ -1181,8 +1189,8 @@ procedure InstallHooksUXTheme;
11811189 TrampolineOpenThemeData := InterceptCreate(themelib, ' OpenThemeData' , @Detour_UxTheme_OpenThemeData);
11821190 TrampolineDrawThemeBackground := InterceptCreate(themelib, ' DrawThemeBackground' , @Detour_UxTheme_DrawThemeBackground);
11831191 TrampolineBaseVirtualTreeOriginalWMNCPaint := InterceptCreate(sVclIDEModule, sBaseVirtualTreeOriginalWMNCPaint, @Detour_TBaseVirtualTree_OriginalWMNCPaint);
1184- TrampolineSetScrollPos := InterceptCreate(user32, ' SetScrollPos' , @Detour_WinApi_SetScrollPos);
1185- TrampolineSetScrollInfo := InterceptCreate(user32, ' SetScrollInfo' , @Detour_WinApi_SetScrollInfo);
1192+ // TrampolineSetScrollPos := InterceptCreate(user32, 'SetScrollPos', @Detour_WinApi_SetScrollPos);
1193+ // TrampolineSetScrollInfo := InterceptCreate(user32, 'SetScrollInfo', @Detour_WinApi_SetScrollInfo);
11861194 end ;
11871195
11881196end ;
@@ -1194,8 +1202,8 @@ procedure RemoveHooksUXTheme;
11941202 InterceptRemove(@TrampolineBaseVirtualTreeOriginalWMNCPaint);
11951203 InterceptRemove(@TrampolineDrawThemeBackground);
11961204 InterceptRemove(@Trampoline_DrawThemeText);
1197- InterceptRemove(@TrampolineSetScrollPos);
1198- InterceptRemove(@TrampolineSetScrollInfo);
1205+ // InterceptRemove(@TrampolineSetScrollPos);
1206+ // InterceptRemove(@TrampolineSetScrollInfo);
11991207
12001208 if { $IFDEF DELPHIXE2_UP} StyleServices.Available { $ELSE} ThemeServices.ThemesAvailable { $ENDIF} then
12011209 begin
0 commit comments