网站首页  词典首页

请输入您要查询的函数:

 

术语 animatewindow
释义 AnimateWindow
语法:
BOOL AnimateWindow( HWND hwnd,
DWORD dwTime,
DWORD dwFlags
);
AnimateWindow的函数
该AnimateWindow的功能,使您能够生产时,显示或隐藏窗口的特殊效果。有四种类型的动画:卷,幻灯片,折叠或展开,和α-混合褪色。
参数
hwnd
[in]句柄窗口动画。调用线程必须拥有此窗口。
dwTime
[in]指定需要多久才能发挥毫秒动画。通常,需要200毫秒的动画播放。
dwFlags
[in]指定动画类型。此参数可以是一个或多个下列值。请注意,默认情况下,这些标志生效时显示一个窗口。生效时,隐瞒了一个窗口,使用AW_HIDE并与相应的标志一个逻辑OR运算。
AW_SLIDE
使用幻灯片动画。默认情况下,推出动画使用。这个标志被忽略AW_CENTER时使用。
AW_ACTIVATE
激活窗口。不要使用这个AW_HIDE价值。
AW_BLEND
使用一个褪色的效果。这个标志才可以使用,如果hwnd是顶层窗口。
AW_HIDE
隐藏窗口。默认情况下,窗口显示。
AW_CENTER
使窗口似乎向内坍塌,如果AW_HIDE使用或扩大对外AW_HIDE如果不使用。各种指示标志没有任何效果。
AW_HOR_POSITIVE
富有活力的窗口,从左至右。此标志可用于滚动或滑动动画。这是被忽略时AW_CENTER或AW_BLEND使用。
AW_HOR_NEGATIVE
从右到左富有活力的窗口。此标志可用于滚动或滑动动画。这是被忽略时AW_CENTER或AW_BLEND使用。
AW_VER_POSITIVE
从富有活力从上到下窗口。此标志可用于滚动或滑动动画。这是被忽略时AW_CENTER或AW_BLEND使用。
AW_VER_NEGATIVE
从底部富有活力的窗口顶部。此标志可用于滚动或滑动动画。这是被忽略时AW_CENTER或AW_BLEND使用。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。该函数将失败,在下列情况下:
如果窗口使用窗口地区。 Windows XP中:这不会导致函数失败。
如果该窗口已经可见,您要显示窗口。
如果该窗口已经隐藏的,您要隐藏的窗口。
如果是为幻灯片或指定推出动画没有方向。
当试图动画与AW_BLEND子窗口。
如果线程不拥有窗口。请注意,在这种情况下,AnimateWindow的失败,但GetLastError函数返回ERROR_SUCCESS。
为了获得更多错误信息,调用GetLastError函数。
备注
要显示或隐藏没有特殊效果窗口中,使用ShowWindow。
以幻灯片或当滚动动画,您必须指定方向。它可以是AW_HOR_POSITIVE,AW_HOR_NEGATIVE,AW_VER_POSITIVE,或AW_VER_NEGATIVE。
您可以结合AW_HOR_POSITIVE或AW_VER_POSITIVE或AW_VER_NEGATIVE窗口的动画斜AW_HOR_NEGATIVE。
为窗口和它的子窗口的窗口程序,处理任何WM_PRINT或WM_PRINTCLIENT消息。对话框,控制,共同控制已经处理WM_PRINTCLIENT。默认窗口过程已经处理WM_PRINT。
如果一个子窗口显示部分剪辑,动画时,它将被截断的地方洞。
AnimateWindow的支持RTL的窗口。
避免动画一个窗口,有一个阴影,因为它产生视觉注意力,颠簸的动画。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低经营systemsWindows 98时,Windows 2000
参见
视窗概述,ShowWindow,WM_PRINT,WM_PRINTCLIENT
==英文原文==AnimateWindow Function
The AnimateWindow function enables you to produce special effects when showing or hiding windows. There are four types of animation: roll, slide, collapse or expand, and alpha-blended fade.
Syntax
BOOL AnimateWindow( HWND hwnd,
DWORD dwTime,
DWORD dwFlags
);
Parameters
hwnd
[in] Handle to the window to animate. The calling thread must own this window.
dwTime
[in] Specifies how long it takes to play the animation, in milliseconds. Typically, an animation takes 200 milliseconds to play.
dwFlags
[in] Specifies the type of animation. This parameter can be one or more of the following values. Note that, by default, these flags take effect when showing a window. To take effect when hiding a window, use AW_HIDE and a logical OR operator with the appropriate flags.
AW_SLIDE
Uses slide animation. By default, roll animation is used. This flag is ignored when used with AW_CENTER.
AW_ACTIVATE
Activates the window. Do not use this value with AW_HIDE.
AW_BLEND
Uses a fade effect. This flag can be used only if hwnd is a top-level window.
AW_HIDE
Hides the window. By default, the window is shown.
AW_CENTER
Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used. The various direction flags have no effect.
AW_HOR_POSITIVE
Animates the window from left to right. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_HOR_NEGATIVE
Animates the window from right to left. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_VER_POSITIVE
Animates the window from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_VER_NEGATIVE
Animates the window from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. The function will fail in the following situations:
If the window uses the window region. Windows XP: This does not cause the function to fail.
If the window is already visible and you are trying to show the window.
If the window is already hidden and you are trying to hide the window.
If there is no direction specified for the slide or roll animation.
When trying to animate a child window with AW_BLEND.
If the thread does not own the window. Note that, in this case, AnimateWindow fails but GetLastError returns ERROR_SUCCESS.
To get extended error information, call the GetLastError function.
Remarks
To show or hide a window without special effects, use ShowWindow .
When using slide or roll animation, you must specify the direction. It can be either AW_HOR_POSITIVE, AW_HOR_NEGATIVE, AW_VER_POSITIVE, or AW_VER_NEGATIVE.
You can combine AW_HOR_POSITIVE or AW_HOR_NEGATIVE with AW_VER_POSITIVE or AW_VER_NEGATIVE to animate a window diagonally.
The window procedures for the window and its child windows should handle any WM_PRINT or WM_PRINTCLIENT messages. Dialog boxes, controls, and common controls already handle WM_PRINTCLIENT. The default window procedure already handles WM_PRINT.
If a child window is displayed partially clipped, when it is animated it will have holes where it is clipped.
AnimateWindow supports RTL windows.
Avoid animating a window that has a drop shadow because it produces visually distracting, jerky animations.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 98, Windows 2000
See Also
Windows Overview , ShowWindow , WM_PRINT , WM_PRINTCLIENT
==原始网址==http://msdn.microsoft.com/en-us/library/ms632669(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:23:14