DELPHI WM_CopyData 用法
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
procedure MyCopyDataMsg(Var Msg : TMessage); Message WM_COPYDATA;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
cdds : TCopyDataStruct;
begin
cdds.dwData := 0;
cdds.cbData := length(Edit1.Text)+1;
cdds.lpData := pchar(Edit1.Text);
SendMessage(Handle,WM_COPYDATA,0,LongWord(@cdds));
end;
procedure TForm1.MyCopyDataMsg(var Msg: TMessage);
var
cdds : TcopyDataStruct;
begin
if msg.Msg = WM_COPYDATA then
begin
cdds := PcopyDataStruct(Msg.LParam)^;
edit2.Text := (Pchar(cdds.lpData));
end;
end;
end.
DELPHI WM_CopyData 用法的更多相关文章
- (转载)delphi checklistbox用法
delphi checklistbox用法 在Delphi中checklistbox中高亮选中(不论是否Checked)能够进行操作么?删除,上下移动等等 删除:CheckListBox.Delete ...
- Delphi TStringHelper用法详解
Delphi TStringHelper用法详解 (2013-08-27 22:45:42) 转载▼ 标签: delphi_xe5 it 分类: Delphi Delphi XE4的TStringHe ...
- delphi TStringList 用法详解
转自: http://blog.163.com/you888@188/blog/static/67239619201472365642633/ delphi TStringList 用法详解 2014 ...
- delphi webbrowser用法集锦
delphi webbrowser用法集锦 (2012-05-13 08:29:00) 标签: it 分类: 软件_Software WebBrowser1.GoHome; //到浏览器默认主页 We ...
- delphi json用法
用法:uses Superobject, Sperjsondelphi里有json单元. procedure TForm2.SuperObjectClick(Sender: TObject); var ...
- Delphi - StringReplace用法
StringReplace用法 在开发过程中,有时候我们需要对字符串进行替换操作,屏蔽或者和谐某些字符,可使用Delphi自带的函数StringReplace函数. 通过代码进行说明: //函数原型 ...
- Delphi IDHTTP用法详解(六种用法)
一.IDHTTP的基本用法 IDHttp和WebBrowser一样,都可以实现抓取远端网页的功能,但是http方式更快.更节约资源,缺点是需要手动维护cook,连接等 IDHttp的创建,需要引入ID ...
- delphi checklistbox用法
在Delphi中checklistbox中高亮选中(不论是否Checked)能够进行操作么?删除,上下移动等等 删除:CheckListBox.DeleteSelected; 上下移: CheckLi ...
- Delphi IDHTTP用法详解
一.IDHTTP的基本用法 IDHttp和WebBrowser一样,都可以实现抓取远端网页的功能,但是http方式更快.更节约资源,缺点是需要手动维护cook,连接等 IDHttp的创建,需要引入 ...
随机推荐
- 从windows到linux的shell脚本编码和格式问题
从windows到linux的shell脚本编码和格式问题 从windows到Linux的shell脚本编码和格式问题 1.异常问题 :set ff=unix 启动脚本在启动时报错比如执行sh s ...
- 微信小程序开发(request请求后台获取不到data)
1微信的request的post请求后台获取不到data(当初这个问题纠结了好久好久),原因是post传递的data是json格式而不是key,value的格式,所以获取不到相应的data就是post ...
- 转载-MyBatis学习总结
MyBatis学习总结(八)——Mybatis3.x与Spring4.x整合 孤傲苍狼 2015-02-07 00:09 阅读:89825 评论:54 MyBatis学习总结(七)——Myba ...
- 1073 Scientific Notation (20 分)
1073 Scientific Notation (20 分) Scientific notation is the way that scientists easily handle very la ...
- H-Index II @python
Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize ...
- 微信公众平台测试帐号的注册与使用(自己的服务器<---->微信后台<---->测式公众号)
打开注册的网址:http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login 用手机微信扫描网页左边的二维码,然后在手机上确认即可: 至此 ...
- mysql导入导出数据中文乱码解决方法小结(1、navicat导入问题已解决,创建连接后修改连接属性,选择高级->将使用Mysql字符集复选框去掉,下拉框选择GBK->导入sql文件OK;2、phpmyadmin显示乱码的问题也解决,两步:1.将sql文件以utf8的字符集编码另存,2.将文件中sql语句中的字段字符集编码改成utf8,导入OK)
当向 MySQL 数据库插入一条带有中文的数据形如 insert into employee values(null,'张三','female','1995-10-08','2015-11-12',' ...
- git如何查看某个人提交的日志。
我们知道,在git进行cherry-pick的时候,找到commit id是至关重要, 如果我们是很多人在一个分支开发,开发完了之后,发现某个人的功能,需要单独cherry-pick到另外一分支上去. ...
- python中获取当前路径并添加到系统路径
import os import sys sys.path.append(os.getcwd())
- iOS线程开发小结
在iOS开发线程操作时,一般方法名决定是否开启新线程(async,sync),队列类型(全局队列,串行队列)决定开启多少条线程 1.快速线程调用 *开启后台线程执行任务 [self performSe ...