03 2009 档案

摘要:使用Delphi来跟我学COM (第一部 基本知识) 欢迎大家的光临... ... (36分) 分类:新作发表 Tense (2001-11-07 16:38:00) 第一章 在Delphi中使用接口 1.1 定义接口: 目的:什么是接口,以及和抽象类的关联以及不同点。 抽象类(备注理解接口最简单的方法) 永远不能创建一个抽象类的实例; 本身不能实现功能,依靠派生类实现; ... 阅读全文
posted @ 2009-03-30 16:53 谭志宇 阅读(929) 评论(0) 推荐(0) 编辑
摘要:(1) idispatch是COM object的接口, 在Delphi中通常指一个OleObject. (2) OleVariant是一种COM object兼容的Variant类型, 可以通用任何Ole Automation 类型, 他与CreateOle... 阅读全文
posted @ 2009-03-25 01:57 谭志宇 阅读(491) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2009-03-24 18:11 谭志宇 阅读(5) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2009-03-19 04:01 谭志宇 阅读(10) 评论(0) 推荐(0) 编辑
摘要:procedure TForm3.FormCreate(Sender: TObject); begin Self.Paint; end; function ByteToHex(Src: Byte): String; begin SetLength(Result, 2); asm MOV EDI, [Result] MOV EDI, [ED... 阅读全文
posted @ 2009-03-17 17:11 谭志宇 阅读(343) 评论(0) 推荐(0) 编辑
摘要:///////////////////////////////////////////// 透明的控件, 一般继承自TGraphicControl的 (就是那些没有handle属性, 不能有focus的控件, 如image) 都有Transparent属性. 对TW... 阅读全文
posted @ 2009-03-13 11:12 谭志宇 阅读(3368) 评论(0) 推荐(0) 编辑
摘要:procedure TForm1.FormCreate(Sender: TObject); var i:integer; begin for i:=0 to ComponentCount-1 do if Components[i] is TEdit then (Components[i] as TEdit).OnKeyPress:=EditKeyPress; end; ... 阅读全文
posted @ 2009-03-13 00:26 谭志宇 阅读(1034) 评论(0) 推荐(0) 编辑
摘要:TButtonTest = class(TGraphicControl) public constructor Create(aOwner: TComponent); override; protected procedure Paint; override; end; constru... 阅读全文
posted @ 2009-03-12 16:34 谭志宇 阅读(175) 评论(0) 推荐(0) 编辑
摘要:DELPHI常见属性说明: ALIGN 设置组件对齐(同其父容器)方式 BORDERSTYLE 设置组件边框形状 CAPTION 设置组件标题 CTL3D 设置组件边框是否为3D模式,若BORDERSTYLE设置为BSNONE则此属性无效 COLOR 设定组件背景颜色 CURSOR 设定鼠标经过组件时光标所显示的形状 ENABLED 设定组件是否能使用,当设为FALSE时组件会呈灰色 FONT 设... 阅读全文
posted @ 2009-03-12 13:33 谭志宇 阅读(1455) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2009-03-12 10:33 谭志宇 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2009-03-06 11:49 谭志宇 阅读(5) 评论(0) 推荐(0) 编辑
摘要:#include using namespace std; class ta { public: ta() { coutfun(); delete a; return 0; } DELPHI代码 type Ta = class public constructor create(); procedure Test; virtual; destru... 阅读全文
posted @ 2009-03-06 02:27 谭志宇 阅读(222) 评论(0) 推荐(0) 编辑
摘要:1 WebBrowser1.Width := TControl(WebBrowser1).Parent.ClientWidth + 3; WebBrowser1.Height := TControl(WebBrowser1).Parent.ClientHeight + 3; WebBrowser1.Left := -2; WebBrowser1.Top... 阅读全文
posted @ 2009-03-05 21:31 谭志宇 阅读(3496) 评论(0) 推荐(0) 编辑
摘要:Function Str_Gb2UniCode(text:String):String; var i,j,len: integer; cur: integer; t: String; ws: widestring; begin Result:=''; ws:=text; len:=length(ws); i:=1; j:=0; while i #include void En... 阅读全文
posted @ 2009-03-05 11:47 谭志宇 阅读(987) 评论(0) 推荐(0) 编辑
摘要:#include #include #include using namespace std; void find(char *IpPath) { char szFind[100]; char szFile[100]; WIN32_FIND_DATA FindFileData; strcpy(szFind,IpPath); strcat(szFind,... 阅读全文
posted @ 2009-03-05 00:19 谭志宇 阅读(181) 评论(0) 推荐(0) 编辑
摘要:剖析Delphi中的构造和析构 1 Delphi中的对象模型: 2 1.1 对象名表示什么? 2 1.2 对象存储在哪里? 2 1.3 对象中存储了什么?它们是如何存储的? 3 2 构造函数与创建对象 5 2.1 什么是构造函数?(“特殊的”类方法) 5 2.2 对象的创建的全过程 5 2.3构造函数另类用法(使用类引用实现构造函数的多态性) 6 3 析构函数与销毁对象 7 3.1 什么是析构函... 阅读全文
posted @ 2009-03-04 21:33 谭志宇 阅读(619) 评论(0) 推荐(1) 编辑
摘要:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include typedef struct node { int value; struct node* next; }node, *node_list; vo... 阅读全文
posted @ 2009-03-02 01:13 谭志宇 阅读(670) 评论(0) 推荐(0) 编辑
摘要:#include using namespace std; int main() { int a[30]; for(int i = 1; i <= 30; i++) a[i-1] = i; int num = 30, j= 0; int *current = a; while (num != 1) { if ((current == a+30 ) || (*current =... 阅读全文
posted @ 2009-03-02 01:12 谭志宇 阅读(191) 评论(0) 推荐(0) 编辑
摘要:---- 大概大家还记得Delphi的范例程序中的那个浏览器的例子吧。在那个例子中,利用控件THttp的属性和方法制作了一个浏览器。该例子用于理解THttp控件的使用方法,确实不错。但很少有人会用它作为一个真正的浏览器,原因很简单,功能太有限了,不支持Frame,不支持Script脚本语言,不能以本地文件方式查看HTML文件等等。大部分用户在使用IE或Navigator;我们程序员也乐意使用现成... 阅读全文
posted @ 2009-03-01 04:43 谭志宇 阅读(731) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; int main() { int*a = (int*)malloc(11 * sizeof(int)); size_t size=_msize(a); cout<<size / sizeof(int)<<endl; free(a); return 0; ... 阅读全文
posted @ 2009-03-01 04:37 谭志宇 阅读(246) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示