win32: also handle correct when themes are not enabled

git-svn-id: trunk@17092 -
This commit is contained in:
paul 2008-10-22 05:21:41 +00:00
parent 1628077528
commit 48793b3843
2 changed files with 75 additions and 75 deletions

View File

@ -343,9 +343,11 @@ begin
end;
CN_NOTIFY:
if Sender is TCustomTrackBar then
with TLMessage(Message) do
Result := SendMessage(Handle, Msg, WParam, LParam);
if (Sender is TCustomTrackBar) then
Result := SendMessage(Handle, Msg, WParam, LParam)
else
Result := CallDefaultWindowProc(Handle, Msg, WParam, LParam);
else
if TLMessage(Message).Msg >= WM_USER then
with TLMessage(Message) do

View File

@ -613,12 +613,11 @@ var
Details: TThemedElementDetails;
NMHdr: PNMHDR;
begin
if ThemeServices.ThemesEnabled then
begin
// Paul: next is a slightly modified code of TThemeManager.TrackBarWindowProc
// of Mike Lischke Theme manager library (Mike granted us permition to use his code)
case Msg of
CN_NOTIFY:
if ThemeServices.ThemesEnabled then
begin
NMHdr := PNMHDR(LParam);
if NMHdr^.code = NM_CUSTOMDRAW then
@ -693,13 +692,12 @@ begin
end;
end;
end;
end;
else
Result := WindowProc(Window, Msg, WParam, LParam);
end;
end
else
Result := CallDefaultWindowProc(Window, Msg, WParam, LParam);
else
Result := WindowProc(Window, Msg, WParam, LParam);
end;
end;
{ TWin32WSTrackBar }