TWinControl.FObjectInstance 被注册为窗口回调函数 问题是DispatchMessage(Msg); 怎么找到这个回调函数的 谢谢!

解决方案 »

  1.   

    自己在msdn找了点料 
    MSG Structure--------------------------------------------------------------------------------The MSG structure contains message information from a thread's message queue. Syntaxtypedef struct {
        HWND hwnd;
        UINT message;
        WPARAM wParam;
        LPARAM lParam;
        DWORD time;
        POINT pt;
    } MSG, *PMSG;
    Membershwnd
    Handle to the window whose window procedure receives the message. 
    message
    Specifies the message identifier. Applications can only use the low word; the high word is reserved by the system. 
    wParam
    Specifies additional information about the message. The exact meaning depends on the value of the message member. 
    lParam
    Specifies additional information about the message. The exact meaning depends on the value of the message member. 
    time
    Specifies the time at which the message was posted. 
    pt
    Specifies the cursor position, in screen coordinates, when the message was posted. 
      

  2.   

    深入vcl 理解bcb的消息机制 (一) (二)(三)(cker )  http://blog.csdn.net/cker/archive/2001/06/09/4216.aspx 
    http://blog.csdn.net/cker/archive/2001/06/16/4217.aspx 
    http://blog.csdn.net/cker/archive/2001/06/25/4218.aspx 这是以前的一位csdn C++Builder大虾的独门资料~
    希望对你有帮助~Good luck~
      

  3.   

    用“VCL消息机制“关键字在csdn的全文检索中搜索,会有发现的~
      

  4.   

    以上是讲MSG的数据结构,并将一些数据类型加以说明,没什么难的,好好看看他的解释信息就明白了
      

  5.   

    constructor TWinControl.Create(AOwner: TComponent);
    begin
      inherited Create(AOwner);
      FObjectInstance := Classes.MakeObjectInstance(MainWndProc);
    procedure TWinControl.MainWndProc(var Message: TMessage);
    begin
      try
        try
          WindowProc(Message);
    看到这,猜也猜个差不多了应该
      

  6.   

    DispatchMessage(Msg)你要了解他是用來WINDOWS分發消息的.
    而消息主要在WINPROC編寫消息的處理,這是基本的WINDOWS消息機制.
    而procedure TWinControl.MainWndProc(var Message: TMessage);
    這正是把消息封到WINPROC中來.