Win32的窗口缩放动画 [英] Win32 Window resize animation

查看:531
本文介绍了Win32的窗口缩放动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要调整动画的窗口我32的应用程序。我已经到处找,但我无法找到的Win32 / MFC APIs来这样做。动画的行为我需要的是非常简单的。它只是扩大了窗口的高度。请让我知道我能做到这一点的行为。

I want to resize a Window with animation in my 32 application. I have searched everywhere but I couldn't find Win32/MFC APIs to do so. The animation behavior I need is very simple. It's just scaling up the height of the Window. Kindly let me know how can I achieve this behavior.

推荐答案

您可以实现使用GDI一些自定义动画效果。通过获取的坐标和API使用GetWindowRect窗口的位置开始。隐藏使用的ShowWindow窗口。现在,在定时器使用的drawRect,FillRect等绘制的动画。我会建议使用填充系统窗口颜色的矩形。然后显示/使用的ShowWindow动画完成时再调整窗口的大小。

You can achieve some custom animation effects using GDI. Start by getting the coordinates and position of the window using GetWindowRect. Hide the window using ShowWindow. Now draw your animation using DrawRect, FillRect, etc in a timer. I would recommend filling the rectangle using the system window color. Then show/resize the window again using ShowWindow when the animation is complete.

这篇关于Win32的窗口缩放动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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