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
begin
Msg := LM_MOUSEWHEEL;
Button := Lo(WParam);
WheelDelta := SmallInt(Hi(WParam));
State := GetShiftState;
UserData := Pointer(GetWindowLong(Window, GWL_USERDATA));

View File

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

View File

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