I drew a square to the screen using Rectangle(), and I want to make that square rotate clockwise by 1 degree every time the ‘r’ key is pressed.
I know how to set up the pressing of ‘r’, but I have no clue where to even begin with making the rotation happen. Any ideas?
It is Win32 Project. Im still new to this windows programming so its nothing fancy. All Iv done is made a Win32 Project, made the blank empty window, and drew a square with Rectangle( ).
There are lots of methods. Microsoft generally wants you to draw using Direct2D, so you may consider looking into that. For Direct2D, there are two examples in the MSDN Library:
With GDI, you can either use
Polygonand calculate the coordinates with sine and cosine, or apply a linear transformation withSetWorldTransform.