cyprus106
Programmer
- Apr 30, 2001
- 654
I've got a TPanel that is moveable thanks to this source code in the OnMouseDown function:
/* release current mouse capture */
ReleaseCapture();
/* fake a caption hit */
SNDMSG(ColorPanel->Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
This WOULD be great except for the ReleaseCapture() call at the top. I've got source code in the OnMouseUp function that absolutely has to be in the OnMouseUp and it absolutely has to fire off. ReleaseCapture(), of course, releases the mouse click. So OnMouseUp doesn't fire off.
I could put it right at the end of OnMouseDown except for the fact that then it would fire off after every single OnMouseDown, not juat after the mouse click was released. I can't figure it out and I'm getting desperate here. Can anybody help??
Appreciated,
Cyprus
/* release current mouse capture */
ReleaseCapture();
/* fake a caption hit */
SNDMSG(ColorPanel->Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
This WOULD be great except for the ReleaseCapture() call at the top. I've got source code in the OnMouseUp function that absolutely has to be in the OnMouseUp and it absolutely has to fire off. ReleaseCapture(), of course, releases the mouse click. So OnMouseUp doesn't fire off.
I could put it right at the end of OnMouseDown except for the fact that then it would fire off after every single OnMouseDown, not juat after the mouse click was released. I can't figure it out and I'm getting desperate here. Can anybody help??
Appreciated,
Cyprus