I this tutorial you will learn how to poll the mouse events in a UserArea to draw a rectangle on screen, learn about "while" loops, and see how to debug your application if it seems like it has frozen or not doing what you expect it to be doing.
Note: In Part 11 ( • C++ Plugin Development for Cinema 4D. Part... ) I have updated the way the mouse drag is handled. Please refer to this video for more information.