Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7816863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:01:44+00:00 2026-06-02T06:01:44+00:00

I drew a square to the screen using Rectangle(), and I want to make

  • 0

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( ).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:01:47+00:00Added an answer on June 2, 2026 at 6:01 am

    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:

    • Draw Rectangle
    • How to Rotate an Object (this example shows how to draw a rotated square!)

    With GDI, you can either use Polygon and calculate the coordinates with sine and cosine, or apply a linear transformation with SetWorldTransform.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to "fill" a surface of a sphere that I drew using
Using matplotlib in Python I drew a 3D graph. When I rotate the graph
I want to implement a simple SceneGraph in Haskell using Data.Tree consisting of Transform
I have two images that are very similar. So for example suppose I drew
I'm using Gnuplot to draw a graph. In the graph I drew three smooth
So yeah, Basically I drew something on a form using Graphics. Now if I
I drew a little graph in paint that explains my problem: But it doesn't
I'm using Drew Wilson's autosuggest . It's working as it's supposed to. However, I
Currently I have a 3D Cube that I drew by writing coordinates, that can
I'm trying to convert an openGL [edit: card that I drew(?):) thx unwind]containing a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.