mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 11:59:20 +02:00
win32: always call default window proc for WM_PAINT progressbar handler if it has marquee style (fixes bug #0015064)
git-svn-id: trunk@22692 -
This commit is contained in:
parent
77f497ae43
commit
40861cdaf8
@ -540,6 +540,17 @@ begin
|
|||||||
AStatusBar.Invalidate;
|
AStatusBar.Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function ProgressBarWndProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
|
||||||
|
LParam: Windows.LParam): LResult; stdcall;
|
||||||
|
begin
|
||||||
|
// Marquee progress bar on vista/w7 required to call default window proc to
|
||||||
|
// setup the timer
|
||||||
|
if (Msg = WM_PAINT) and ThemeServices.ThemesEnabled and
|
||||||
|
(GetWindowLong(Window, GWL_STYLE) and PBS_MARQUEE = PBS_MARQUEE) then
|
||||||
|
CallDefaultWindowProc(Window, Msg, WParam, LParam);
|
||||||
|
Result := WindowProc(Window, Msg, WParam, LParam);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TWin32WSProgressBar }
|
{ TWin32WSProgressBar }
|
||||||
|
|
||||||
class function TWin32WSProgressBar.CreateHandle(const AWinControl: TWinControl;
|
class function TWin32WSProgressBar.CreateHandle(const AWinControl: TWinControl;
|
||||||
@ -562,6 +573,7 @@ begin
|
|||||||
Flags := Flags or PBS_MARQUEE;
|
Flags := Flags or PBS_MARQUEE;
|
||||||
end;
|
end;
|
||||||
pClassName := PROGRESS_CLASS;
|
pClassName := PROGRESS_CLASS;
|
||||||
|
SubClassWndProc := @ProgressBarWndProc;
|
||||||
end;
|
end;
|
||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, False);
|
FinishCreateWindow(AWinControl, Params, False);
|
||||||
|
Loading…
Reference in New Issue
Block a user