如题

解决方案 »

  1.   

    SendMessage(
        HWND hWnd, // handle of destination window
        UINT Msg, // message to send
        WPARAM wParam, // first message parameter
        LPARAM lParam  // second message parameter
       );
      

  2.   

    PreTranslateMessage?
    WH_GETMESSAGE?
      

  3.   

    我忘了说明,我在用Win32ASM不是delphi,SendMessage(Button1->Parent->Parent->Handle, WM_COMMAND, NULL, NULL)是不可行的
      

  4.   

    我搞定了
    LONG SetWindowLong(          HWND hWnd,
        int nIndex,
        LONG dwNewLong
    );GWL_WNDPROC
    Sets a new address for the window procedure.Windows NT/2000/XP: You cannot change this attribute if the window does not belong to the same process as the calling thread.