zoukankan      html  css  js  c++  java
  • Delphi自定义了一个消息 范例

    //自己定义了一个消息 范例
    unit Unit1;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;

    const
      my_messagedisp=Wm_user+201;

    type
      TForm1 = class(TForm)
        Memo1: TMemo;
        Button1: TButton;
        
    procedure Button1Click(Sender: TObject);
      
    private
        { Private declarations }
        procedure  mymesspro2(var mymess: TMessage); message  my_messagedisp;
      
    public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}
    procedure TForm1.mymesspro2(var mymess: TMessage);
    begin
         memo1.Lines.Add('无法读取相关参数');
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      SendMessage(Form1.Handle,my_messagedisp,0,0); //测试通过
    end;

    end.

  • 相关阅读:
    各种机器学习方法概念
    深入理解拉格朗日乘子法(Lagrange Multiplier) 和KKT条件
    肤色识别
    创建自己的窗口消息
    模糊C均值
    Fisher线性判别
    用遗传算法加强足球游戏的人工智能
    人工智能-遗传算法解决推箱子问题现实
    LBP特征
    VC 制作系统托盘程序实现将窗口最小化到系统托
  • 原文地址:https://www.cnblogs.com/tulater/p/1412927.html
Copyright © 2011-2022 走看看