Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i rotate the whole win from in 180 degree horizonataly.
Posted
Comments
Abhishek Sur 5-Sep-11 15:25pm    
Why do you want to use it in win32. Any specific reason ? WPF supports Transformation on its core.

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:
C++
x' = -x
y' = -y


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)".
 
Share this answer
 
v5
Comments
LaxmikantYadav 5-Sep-11 9:25am    
Is possible to rotate Non client area ?
CPallini 5-Sep-11 9:28am    
Probably, via subclassing, you may do whatever you want, I suppose. Do you really need it? Maybe there are better solutions.
Sergey Alexandrovich Kryukov 5-Sep-11 13:58pm    
As to this follow-up question, I can only suggest a workaround. Please see my solution.
--SA
Sergey Alexandrovich Kryukov 5-Sep-11 13:55pm    
Good explanation, my 5.
--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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900