fixes copying bitmap to clipboard (no transparency, issue #1771) and mousewheel problem issue #2006

git-svn-id: trunk@9210 -
This commit is contained in:
jesus 2006-04-30 00:59:22 +00:00
parent 8f3f7091ba
commit 0fd39df1a1
3 changed files with 10 additions and 8 deletions

View File

@ -1390,6 +1390,7 @@ Begin
if lWinControl.FCompStyle <> csComboBox then if lWinControl.FCompStyle <> csComboBox then
begin begin
Msg := LM_MOUSEWHEEL; Msg := LM_MOUSEWHEEL;
Button := Lo(WParam);
WheelDelta := SmallInt(Hi(WParam)); WheelDelta := SmallInt(Hi(WParam));
State := GetShiftState; State := GetShiftState;
UserData := Pointer(GetWindowLong(Window, GWL_USERDATA)); UserData := Pointer(GetWindowLong(Window, GWL_USERDATA));

View File

@ -486,6 +486,7 @@ Function TWin32WidgetSet.ClipboardGetOwnerShip(ClipboardType: TClipboardType;
DataStream.Position:=0; DataStream.Position:=0;
if FormatID=CF_BITMAP then begin if FormatID=CF_BITMAP then begin
Bitmap:= TBitmap.Create; Bitmap:= TBitmap.Create;
Bitmap.TransparentColor := clNone;
Bitmap.LoadFromStream(DataStream); Bitmap.LoadFromStream(DataStream);
Windows.SetClipboardData(FormatID, Bitmap.Handle); Windows.SetClipboardData(FormatID, Bitmap.Handle);
Bitmap.Free; Bitmap.Free;

View File

@ -585,16 +585,16 @@ type
Result: LRESULT; Result: LRESULT;
end; end;
//TODO: make compatible with WM_MOUSEWHEEL ?
PLMMouseEvent = ^TLMMouseEvent; PLMMouseEvent = ^TLMMouseEvent;
TLMMouseEvent = record TLMMouseEvent = record
Msg : Cardinal; Msg: cardinal;
Button : LongInt; // as TMouseButton, 1=left, 2=right, 3=middle Button: Word; // 1=left, 2=right, 3=middle
WheelDelta : Longint; { -1 for up, 1 for down } WheelDelta: SmallInt; // -1 for up, 1 for down
State : TShiftState; X: Smallint; // under gtk this is longint
X : Integer; Y: Smallint; // ditto
Y : Integer; Result: Longint; // to fit std message size
UserData : Pointer; UserData: pointer; // used under gtk
State: TShiftState; // in win is the equivalent of button
end; end;
TLMLButtonDown = TLMMouse; TLMLButtonDown = TLMMouse;