给MouseMove发送lParam鼠标位置消息

/*利用联合体的方式*/
union
{
long lpt[2];
}
param; param.lpt[0] = 200;
param.lpt[1] = 200;
LPARAM lParam;
lParam = (LPARAM)param.lpt;
SendMessage(WM_MOUSEMOVE,NULL,lParam);

/*利用位移的方式(宏) 更优化*/
LPARAM lParam = MAKELONG(200,200);
SendMessage(WM_MOUSEMOVE,NULL,lParam);

你可能感兴趣的:(优化,null)