摘要:
{整数求和函数,使用指定类型的开放数组}function Fun1(arr: array of Integer): Integer;var n: Integer;begin Result := 0; for n in arr do Inc(Result, n);end;{整数、浮点数或布尔值的求和函数,使用无类型的开放数组}function Fun2(arr: array of const): Double;var i: Integer;begin Result := 0; for i := Low(arr) to High(arr) do begin case arr[i].VType of 阅读全文
摘要:
function SetDrawingEffect( const drawingEffect: IUnknown; //颜色接口; 该接口需自己定义和实现, 只要能存取颜色即可 textRange: TDwriteTextRange //要设置的范围): HResult; stdcall;测试代码:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Direct2D, D2D1;const SID_IColorDrawingEff 阅读全文