win32 interface: fixed scroll wheel message in a listbox (bug #9018)

git-svn-id: trunk@11294 -
This commit is contained in:
vincents 2007-06-07 13:43:43 +00:00
parent ba3e478722
commit b3246f94ce
2 changed files with 14 additions and 11 deletions

View File

@ -1607,17 +1607,13 @@ begin
end;
// the mousewheel message is for us
// windows handles combobox's mousewheel messages
if (lWinControl=nil) or (lWinControl.FCompStyle <> csComboBox) then
begin
Msg := LM_MOUSEWHEEL;
Button := LOWORD(WParam);
WheelDelta := SmallInt(HIWORD(WParam));
State := GetShiftState;
Result := 0;
UserData := Pointer(GetWindowLong(Window, GWL_USERDATA));
WinProcess := false;
end;
Msg := LM_MOUSEWHEEL;
Button := LOWORD(WParam);
WheelDelta := SmallInt(HIWORD(WParam));
State := GetShiftState;
Result := 0;
UserData := Pointer(GetWindowLong(Window, GWL_USERDATA));
WinProcess := false;
end;
end;
{$IFDEF EnableWMDropFiles}

View File

@ -161,6 +161,13 @@ var
if not TWinControl(Sender).HandleAllocated then
exit;
with TLMessage(Message) do begin
Result := CallDefaultWindowProc(Handle, Msg, WParam, LParam);
// Windows handled it, so exit here.
if Result<>0 then exit;
end;
// send scroll message
FillChar(ScrollInfo, sizeof(ScrollInfo), #0);
ScrollInfo.cbSize := sizeof(ScrollInfo);