如何在Win32中旋转表格 [英] How To Rotate Form in win32

查看:113
本文介绍了如何在Win32中旋转表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何旋转180度水平范围内的整个胜利.

How can i rotate the whole win from in 180 degree horizonataly.

推荐答案

您可以旋转窗口工作区绘画.例如,如果需要旋转窗口控件,则必须绘制自己(例如,无法轻松旋转窗口标题栏).
对于旋转的客户区画,每个像素都应进行以下转换:
You may just rotate the window client area paintings. If you need to rotate, for instance, window controls then you have to draw yourself them (and you cannot easily rotate, for instance, the window title bar).
For rotating client area paintings, each pixel should undergo the transformation:
x' = -x
y' = -y



其中{x'',y''}是新坐标,而{x,y}是旧坐标,均相对于窗口(客户区域)中心表示.

这意味着 点P(x,y)的新RGB值必须等于点Q(-x,-y)的旧RGB值" .



where {x'',y''} are the new coordinates, and {x,y} are the old ones, all expressed with respect the window (client area) center.

That means "the new RGB value of the point P(x,y) must be equal to the old RGB value of the point Q(-x,-y)".


回答有关非客户区域的后续问题:

我认为您不能旋转表格的非客户区域.我只建议一种解决方法.创建一个完全没有非客户区域的表单;没有标题栏或边框.模拟您要在客户区域中使用的非客户元素.一起旋转.

—SA
Answering a follow-up question about non-client area:

I don''t think you can rotate non-client area of the form. I would only suggest a work-around. Create a form with no non-client area at all; no title bars or borders. Simulate non-client elements you want in a client area. Rotate it all together.

—SA


这篇关于如何在Win32中旋转表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆