April 24th, 2003, 10:27 AM
mouse events in visual c++
I'm trying to do a game interface in visual c++ but i'm having loads of problems.
I want to be able to use the mouse to drag the pieces into a position. The problem is, that I don't know how to get the bitmap that the mouse clicks and make it follow the mouse.
void CNineMensMorrisInterfaceDlg::OnMouseMove(UINT nFlags, CPoint point)
//check to see if the left mouse button is down
if ((nFlags & MK_LBUTTON) == MK_LBUTTON)
//get this devicecontext
bitmap1 = dc.GetCurrentBitmap();//returns a pointer to the current bitmap
i don't even know if the getCurrentBitmap is what i should be doing there.
i'd appreciate any suggestions
April 24th, 2003, 10:49 AM
That feature is called "drag and drop". I haven't played with it myself, but at least with the name you should be able to find it described.