Delphi 自定义消息 处理字符串
2014-01-15 16:07
369 查看
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes,
Graphics, Controls, Forms,
Dialogs, StdCtrls;
const
WM_aaa = wm_user + 200;
type
TForm1 = class(TForm)
Button1:
TButton;
Edit1:
TEdit;
procedure
Button1Click(Sender: TObject);
private
{ Private
declarations }
public
{ Public
declarations }
procedure
aaa(var msg: TMessage);message WM_aaa;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.aaa(var msg: TMessage);
begin
ShowMessage(PChar(msg.LParam));
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Caption1:array[0..255]of char;
sCaption :string;
begin
//
sCaption:=strpas(PChar(Caption1));
SendMessage(self.Handle,WM_aaa,0,integer(PChar(Edit1.Text)));
end;
interface
uses
Windows, Messages, SysUtils, Variants, Classes,
Graphics, Controls, Forms,
Dialogs, StdCtrls;
const
WM_aaa = wm_user + 200;
type
TForm1 = class(TForm)
Button1:
TButton;
Edit1:
TEdit;
procedure
Button1Click(Sender: TObject);
private
{ Private
declarations }
public
{ Public
declarations }
procedure
aaa(var msg: TMessage);message WM_aaa;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.aaa(var msg: TMessage);
begin
ShowMessage(PChar(msg.LParam));
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Caption1:array[0..255]of char;
sCaption :string;
begin
//
sCaption:=strpas(PChar(Caption1));
SendMessage(self.Handle,WM_aaa,0,integer(PChar(Edit1.Text)));
end;
相关文章推荐
- ORACLE 字符串处理函数
- VBA 处理字符串
- Delphi 自定义消息处理过程与Windows消息处理过程
- [ZZ]MFC 自定义消息
- 字符串处理 HDOJ Quicksum
- js 关于中文字符串的一些处理
- MFC 中WM_消息处理对应的处理函数
- EXCEL 自定义函数提取字符串中的数…
- PHP 字符串处理
- Delphi自定义消息应用
- 爪哇(Java)自定义的二个字符串高效处理方法,在静寂一个半月之后 推荐
- 在delphi中判断字符串是否数字,以及精度处理函数
- C语言习题 整数转换成字符串
- JavaScript 字符串(String)对象
- C# 消息处理机制及自定义过滤方式
- windows 无窗口进程间消息通…
- Delphi截获webbrowser中关闭及右键消息处理一例
- 自定义异常-Exception -2
- Hdu 2457 DNA repair (字符串_AC自…
- 使用OpenCV 读取和处理任意…