• delphi 微软手写输入法

    delphi 微软手写输入法源码 interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleServer, MSINKAUTLib_TLB, ExtCtrls, StdCtrls, MSINKAUTLib; type TForm1 = class(TForm) InkCLT: TInkCollector; Memo1: TMemo; Panel1: TPanel; Button1: TButton; InkRecognizerContext1: TInkRecognizerContext; procedure FormCreate(Sender: TObject); procedure InkCLTStroke(ASender: TObject; const Cursor: IInkCursor; const Stroke: IInkStrokeDisp; var Cancel: WordBool); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin InkCLT.hWnd := panel1.Handle; InkCLT.Enabled := true; InkCLT.DefaultDrawingAttributes.Color := clRed; // 墨水颜色 InkCLT.DefaultDrawingAttributes.Width := 200; // 笔的宽度 end; procedure TForm1.InkCLTStroke(ASender: TObject; const Cursor: IInkCursor; const Stroke: IInkStrokeDisp; var Cancel: WordBool); begin Memo1.Lines.Clear; Memo1.Lines.Add(Stroke.Ink.Strokes.ToString); end; procedure TForm1.Button1Click(Sender: TObject); begin InkCLT.Ink.DeleteStrokes(InkCLT.Ink.Strokes); Panel1.Refresh; end; end.

    4
    213
    9.38MB
    2014-04-22
    14
关注 私信
上传资源赚积分or赚钱