C#中如何使用WindowProc窗口过程呢?

解决方案 »

  1.   

    int 消息号 = 1880;//传递的消息参数结构
    struct Infor
    {
        int me;
    }protected override void WndProc(ref Message m)
    {
        if (m.Msg == 消息号)   //处理自定义消息
        {
            Infor info = new Infor();
            info = (Infor)Marshal.PtrToStructure(m.LParam, typeof(Infor));
            MessageBox.Show(info.me.ToString());
        }    base.WndProc(ref m);  //系统默认消息
    }
      

  2.   


    在那个文件啊?From1.cs吗?
      

  3.   

    m.Msg 什么时候=消息号  
      

  4.   


    顶 狂顶
    softlove03
    收我做徒弟吧