在线观看MFC魏紫

void CK nob::OnLButtonDown(UINT nFlags,CPoint)

{ // TODO:在此添加您的消息处理程序代码和/或调用default

味精味精;

* set capture(GetSafeHwnd());

while(::GetMessage(& amp;msg,NULL,NULL,NULL))

{

CPoint ptTmp = (0,0);

if(::GetCapture()!= GetSafeHwnd())

打破;

else if(msg . message & lt;WM _ MOUSEFIRST | | msg.message & gtWM_MOUSELAST)

{//如果消息与鼠标无关,

*翻译消息(& amp味精);

* dispatch message(& amp;味精);

}

else if(msg . message = = WM _ MOUSEMOVE)

{//按住并移动

pt tmp . x =(short)LOWORD(msg . lparam);

int iChangeValue =(pt tmp . x-point . x)/4;

m _ ICU rvalue+= iChangeValue;

CPoint ptTmp = (0,0);

pt tmp . x =(short)LOWORD(msg . lparam);

pt tmp . y =(short)hi word(msg . lparam);

SetValue(m _ ICU rvalue);

CWnd::OnMouseMove(nFlags,point);

}

else if(msg . message = = WM _ LBUTTONUP)

{//按下并释放。

get parent()-& gt;SendMessage(WM _ KNOBVALUECHANGED,NULL,NULL);

ReleaseCapture()。

打破;

}

}

CWnd::OnLButtonDown(nFlags,point);

}