摘要: 本例效果图: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2:... 阅读全文
posted @ 2008-05-13 16:57 万一 阅读(6553) 评论(15) 推荐(1)
摘要: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Memo1: TMemo; procedure FormCreate... 阅读全文
posted @ 2008-05-13 14:07 万一 阅读(2635) 评论(1) 推荐(0)
摘要: StrAlloc : 给 PChar 指针分配空间, 并填充 #0; StrBufSize : PChar 缓冲区大小. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 =... 阅读全文
posted @ 2008-05-13 13:43 万一 阅读(2824) 评论(0) 推荐(0)
摘要: //StrPas: 转换 PChar 为 string; 现在可以直接赋值, 很少用了. var p: PChar; s: string; begin p := 'Delphi'; s := StrPas(p); ShowMessage(s); {Delphi} end; //StrNew、StrDispose: 建立与销毁 PChar. var p: PChar; ... 阅读全文
posted @ 2008-05-13 13:13 万一 阅读(8579) 评论(0) 推荐(0)
摘要: 其实这也是个 Copy 函数, 和 Move 没有关系. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) procedure FormCreat... 阅读全文
posted @ 2008-05-13 09:59 万一 阅读(2466) 评论(0) 推荐(0)