为什么按下鼠标,拖动鼠标,然后松开鼠标时,对 WM_LBUTTONDOWN,程序有响应,但是对 WM_LBUTTON不响应? 5
代码如下:caseWM_LBUTTONDOWN:var_Get(p_event->p_vout,"mouse-button-down",&val);val.i_int|=...
代码如下:
case WM_LBUTTONDOWN:
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int |= 1;
var_Set( p_event->p_vout, "mouse-button-down", val );
PostMessage(p_event->p_vout->p_sys->hparent, WM_LBUTTONDOWN, msg.wParam, MAKELPARAM(pt.x, pt.y));
if(hwnd != 0)
PostMessage(hwnd, WM_LBUTTONDOWN, msg.wParam, MAKELPARAM(pt.x, pt.y));
DirectXPopupMenu( p_event, false );
break;
case WM_LBUTTONUP:
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int &= ~1;
var_Set( p_event->p_vout, "mouse-button-down", val );
var_SetBool( p_event->p_vout, "mouse-clicked", true );
PostMessage(p_event->p_vout->p_sys->hparent, WM_LBUTTONUP, msg.wParam, MAKELPARAM(pt.x, pt.y));
if(hwnd != 0)
PostMessage(hwnd, WM_LBUTTONUP, msg.wParam, MAKELPARAM(pt.x, pt.y));
break; 展开
case WM_LBUTTONDOWN:
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int |= 1;
var_Set( p_event->p_vout, "mouse-button-down", val );
PostMessage(p_event->p_vout->p_sys->hparent, WM_LBUTTONDOWN, msg.wParam, MAKELPARAM(pt.x, pt.y));
if(hwnd != 0)
PostMessage(hwnd, WM_LBUTTONDOWN, msg.wParam, MAKELPARAM(pt.x, pt.y));
DirectXPopupMenu( p_event, false );
break;
case WM_LBUTTONUP:
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int &= ~1;
var_Set( p_event->p_vout, "mouse-button-down", val );
var_SetBool( p_event->p_vout, "mouse-clicked", true );
PostMessage(p_event->p_vout->p_sys->hparent, WM_LBUTTONUP, msg.wParam, MAKELPARAM(pt.x, pt.y));
if(hwnd != 0)
PostMessage(hwnd, WM_LBUTTONUP, msg.wParam, MAKELPARAM(pt.x, pt.y));
break; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询