Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Probleme mit Delphi Flash Edit und Paste ctrl v (https://www.delphipraxis.net/20748-probleme-mit-delphi-flash-edit-und-paste-ctrl-v.html)

morbo 22. Apr 2004 14:33


Probleme mit Delphi Flash Edit und Paste ctrl v
 
Hi,
ich habe ein Flash Movie in Delphi embedded. Dieser Flash Film enthält Flash Edit Felder.

Wenn ich das Edit Feld von rechts nach links markiere und mit dem Cursor nicht über dem Feld stehenbleibe,
kann ich nicht (Copy Paste) per ctrl v Inhalte in das Feld pasten.

Irgendwelche Ideen?

Gruß

sakura 22. Apr 2004 14:35

Re: Probleme mit Delphi Flash Edit und Paste ctrl v
 
Wahrscheinlich das gleiche Problem (und die gleiche Lösung) wie hier: http://www.delphipraxis.net/internal_redirect.php?t=580

...:cat:...

morbo 22. Apr 2004 15:28

Re: Probleme mit Delphi Flash Edit und Paste ctrl v
 
Zitat:

Zitat von sakura
Wahrscheinlich das gleiche Problem (und die gleiche Lösung) wie hier: http://www.delphipraxis.net/internal_redirect.php?t=580

...:cat:...

Hi,
Du hattest Recht. Das Problem scheint das genau das gleiche zu sein. Ich hab das Beispiel mal kurz umgeschrieben und es funktioniert scheinbar tadellos. Vielen Dank.


Hier das Beispiel mit fkt. Copy Paste.


Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, OleCtrls, ShockwaveFlashObjects_TLB,ActiveX, StdCtrls;

type
  TForm1 = class(TForm)
    ShockwaveFlash1: TShockwaveFlash;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
    FOleInPlaceActiveObject: IOleInPlaceActiveObject;
    procedure MsgHandler(var Msg: TMsg; var Handled: Boolean);
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  Application.OnMessage := MsgHandler;
end;

procedure TForm1.MsgHandler(var Msg: TMsg; var Handled: Boolean);
const
// DialogKeys: set of Byte = [VK_LEFT, VK_RIGHT, VK_BACK, VK_UP, VK_DOWN,
//    $30..$39, $41..42, $44..$55, $57, $59..$5A, $43, $56];
 DialogKeys: set of Byte = [$43, $56];
var
  iOIPAO: IOleInPlaceActiveObject;
  Dispatch: IDispatch;

begin

  if (ShockwaveFlash1 = nil) then
  begin
    Handled := System.False;
    Exit;
  end;

  if ((Msg.message = WM_KEYDOWN) or (Msg.message = WM_KEYUP)) then begin
    if (Msg.wParam in DialogKeys) then begin
//      Handled := (IsDialogMessage(ShockwaveFlash1.Handle, Msg) = System.true);
     Handled := System.true;
     if FOleInPlaceActiveObject = nil then begin
        Dispatch := ShockwaveFlash1.DefaultDispatch;
        if Dispatch <> nil then begin
          Dispatch.QueryInterface(IOleInPlaceActiveObject, iOIPAO);
            if iOIPAO <> nil then
              FOleInPlaceActiveObject := iOIPAO;
        end;
      end;
      FOleInPlaceActiveObject.TranslateAccelerator(Msg);
    end;
  end;
end;

initialization
  OleInitialize(nil);

finalization
  OleUninitialize;
end.


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:13 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz