Program that draws a erasable rectangle based on the movement of the mouse

the program that draws an erasable rectangle based on the movement of the mouse using logic operation and finally rectangle should be displayed when there is no movement of mouse … can u plz help me with this ?? give me an idea how to do it ??or even sorce code if possible plz

Is this an assignment? If so, your instructor has probably given you guidelines for implementing this.

One of many possible ways you could do this is with GLUT. Check out it’s mouse motion and mouse button callbacks.

yes its an assignment question. he didnt instruct us he told us to search in the internet and do. so can u help me with mouse motion function plzz please type the motion function or explain me how to do it or give an idea!!thanks

Just websearch either of those callback registration functions in combination with the word “tutorial” and you’ll come up with information and sample code you can use.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.