Fortune Telling Collection - Ziwei fortune-telling - How to draw a rectangle that can be rotated with VC MFC
How to draw a rectangle that can be rotated with VC MFC
Let me talk about an idea first. I defined a rectangle, in which five variables-Cpoint Center, INTA, INTB, FLOAT Angle and FLOAT W were maintained, corresponding to the center point, length and width, angle and angular velocity respectively, and defined a public method Update, which passed a time parameter float interval and a DC. According to these parameters, four points are generated (time multiplied by angular velocity is the angle of rotation, and the other is the geometry problem of lol in middle school), which are drawn by MoveToEx and LineTo. Then, you can set the OnTime message in the CView class so that updates are called every once in a while.
Hehe, pure theory, I hope you can succeed:)
- Previous article:Good travel novel, happy ending,
- Next article:Ruby Lin Wei Zi wedding photos
- Related articles
- Why do boys put toilet paper at the bedside?
- The story of the movie "The Trapped Beast in South Zhan Zhao"
- Is Wei Zi's voice in Princess Zhu Huan Ruby Lin's own voice?
- Lagerstroemia indica
- Supplementary introduction of Chang 'an Dream Dragon Palace Sect
- Hometown of Hu Ziwei
- What is the city flower of Tai 'an?
- What is jojo's eighth role introduction?
- Excuse me, what are the plots about Ruby Lin's injury in her play? Like a knife or something. ..
- Wei Zi 60 Degrees True and False