Home > Back-end >  C builder USES the interaction gestures, to realize double refers to the zoom function of images
C builder USES the interaction gestures, to realize double refers to the zoom function of images

Time:10-02

Hello, I want to use c + + builder to realize double refers to the zoom function of images, with interaction gestures, only to find some Delphi code, how to transplant?
Thank you

 var 
FLastDIstance: Integer;
Procedure TForm1. FormGesture (Sender: TObject;
Const EventInfo: TGestureEventInfo; Var Handled: Boolean);
Var
LObj: IControl;
LWeb: TWebBrowser;
The begin
LObj:=Self. ObjectAtPoint (ClientToScreen (EventInfo. Location));
If LObj is TWebBrowser then
The begin
If (not (TInteractiveGestureFlag. GfBegin in EventInfo. Flags)) and (not (TInteractiveGestureFlag. GfEnd in EventInfo. Flags)) then
The begin
{zoom the WebBrowser}
LWeb:=TWebBrowser (LObj. GetObject);
LWeb. Width:=LWeb. Width + 2 * ((EventInfo. Short - FLastDIstance)/3);
LWeb. Height:=LWeb. Height + 2 * ((EventInfo. Short - FLastDIstance)/3);
LWeb. Position. : X=LWeb. Position. The X-ray (EventInfo. Short - FLastDIstance)/3;
LWeb. Position. Y:=LWeb Position. The Y - (EventInfo. Short - FLastDIstance)/3;
The end;
FLastDistance:=EventInfo. Short;
The end;
The end;

CodePudding user response:

If (not (TInteractiveGestureFlag. GfBegin in EventInfo. Flags)) and (not (TInteractiveGestureFlag. GfEnd in EventInfo. Flags))
Mainly is the how conversion, there is no corresponding statement, a header file

CodePudding user response:

reference 1st floor haoyunppp response:
if (not (TInteractiveGestureFlag. GfBegin in EventInfo. Flags)) and (not (TInteractiveGestureFlag. GfEnd in EventInfo. Flags))
Mainly is the how conversion, there is no corresponding statement, header file


If ((EventInfo. Flags. The Contains (TInteractiveGestureFlag: : gfBegin)==false) & amp; & (EventInfo. Flags. The Contains (TInteractiveGestureFlag: : gfEnd)==false))

CodePudding user response:

reference 1st floor haoyunppp response:
if (not (TInteractiveGestureFlag. GfBegin in EventInfo. Flags)) and (not (TInteractiveGestureFlag. GfEnd in EventInfo. Flags))
Mainly is the how conversion, there is no corresponding statement, header file

CodePudding user response:

This isn't some control brought by yourself?
  • Related