Puzzle……,How about to create a new class derived from CEdit and handle the message.
BOOL CXXX::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code here and/or call the base class switch(pMsg->message) { case WM_MOUSEMOVE: . . . . } }
The CXXX::PreTranslateMessage processes the message generated by class CXXX, but not the message generated by its child windows such as a edit control.
SendMessage(youEdit.m_hwnd,WM_LBUTTONUP,0,0);SendMessage(youEdit.m_hwnd,WM_MOUSEMOVE,0,0);and so on
单击:OnLButtonDown
只要有edit的句柄就可以了
判断pMsg->messages是否是WM_MOUSEMOVE,WM_LButtonDown、、、、、、
{
// TODO: Add your specialized code here and/or call the base class
switch(pMsg->message)
{
case WM_MOUSEMOVE:
.
.
.
.
}
}