Hi,我是InvidentXp你们能帮助我解决一下DX的问题吗?那个金山公司的游戏修改器里面有个游戏录像机听说过吗?他是怎么用DX来截取屏幕来保存为AVI的?还有那个声音是怎么抓下来的?请次教,万分感谢!

解决方案 »

  1.   

    转贴:
    DirectX SDK自带的一个演示程序
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
      Dialogs, DSFilters, DirectShow, StdCtrls, OleServer, dspack, ExtCtrls,
      ComCtrls;type
      TForm1 = class(TForm)
        FilterGraph: TDSFilterGraph2;
        Button1: TButton;
        DSVideoWindow1: TDSVideoWindow;
        Image1: TImage;
        FilterSampleGrabber: TFilterSampleGrabber;
        OpenDialog: TOpenDialog;
        StatusBar1: TStatusBar;
        procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
        procedure Button1Click(Sender: TObject);
        procedure FilterSampleGrabberBuffer(sender: TComponent;
          Buffer: TBufferCB);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    begin
      FilterGraph.Disconnect;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      if OpenDialog.Execute then
      begin
        FilterGraph.ClearGraph;
        FilterGraph.FilterGraph2.AddFilter(FilterSampleGrabber.BaseFilter, 'Grabber');
        FilterSampleGrabber.SetBMPCompatible(nil,24);
        FilterGraph.FilterGraph2.RenderFile(StringToOleStr(Opendialog.FileName),nil);
        FilterGraph.QueryInterfaces;
        FilterGraph.MediaControl.Run;
      end;
    end;procedure TForm1.FilterSampleGrabberBuffer(sender: TComponent;
      Buffer: TBufferCB);
    begin
      FilterSampleGrabber.GetBitmap(image1.Picture.Bitmap,Buffer);
      StatusBar1.SimpleText := floattostr(buffer.SampleTime);
    end;end.
      

  2.   

    怎么用DX连续抓啊,那个只能抓一张啊!在说也保存不了AVI
      

  3.   

    一张张抓出来了,再合成AVI文件
      

  4.   

    可是怎么合并呢?你的程序都用了什么啊?好象不只DelphiX!