如何触发EDIT控件的鼠标单击,鼠标移动等消息啊,100分,高手帮忙

解决方案 »

  1.   

    SendMessage(youEdit.m_hwnd,WM_LBUTTONDOWN,0,0);
    SendMessage(youEdit.m_hwnd,WM_LBUTTONUP,0,0);SendMessage(youEdit.m_hwnd,WM_MOUSEMOVE,0,0);and so on
      

  2.   

    移动: OnMouseMove
    单击:OnLButtonDown
      

  3.   

    就是上面的方法
    只要有edit的句柄就可以了
      

  4.   

    你在类向导里给这个Edit控件声明一个Control的变量再调用我给你的函数即可。
      

  5.   

    ::PostMessage(GetDlgItem(IDC_EDIT1)->m_hWnd,WM_LBUTTONDOWN,0,0);
      

  6.   

    preTranslateMessage(MSG *pMsg)中响应
    判断pMsg->messages是否是WM_MOUSEMOVE,WM_LButtonDown、、、、、、
      

  7.   

    Puzzle……,How about to create a new class derived from CEdit and handle the message.
      

  8.   

    BOOL CXXX::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    switch(pMsg->message)
    {
    case WM_MOUSEMOVE:
                 .
                 .
                 .
                 .
    }
    }
      

  9.   

    The CXXX::PreTranslateMessage processes the message generated by class CXXX, but not the message generated by its child windows such as a edit control.