我想实现点击关闭按钮的时候把窗口防置到托盘区,就像最小化时动画缩小到任务栏一样。我记得有一个api来着?谁知道?要求在98下兼容!谢各位!!

解决方案 »

  1.   

    BOOL AnimateWindow(
      HWND hwnd,     // handle to the window to animate
      DWORD dwTime,  // duration of animation
      DWORD dwFlags  // animation type
    );
    AW_SLIDE|AW_BLEND|.........
      

  2.   

    他不能实现!!他只能实现基本的滑动,而没有缩小动画阿!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. 
      

  3.   

    也不是,有一个动态弹出的api
      

  4.   

    把窗体的父窗体设为GetDesktopWindow,然后SetWindowPlacement,把最小化的位置放到系统区,然后最小化就有这样的动画了。
      

  5.   

    楼主想要的API是这个DrawAnimatedRect()吧.就是实现窗口最大化最小化的动画的.
    ^-^ 是的话就JF咯
    可以参考:
    http://www.codeproject.com/dialog/canidialog.aspDraws a wire-frame rectangle and animates it to indicate the opening of an icon or the minimizing or maximizing of a window.BOOL DrawAnimatedRects(
       int idAni,
       CONST RECT *lprcFrom,
       CONST RECT *lprcTo
    );
    Parameters
    idAni 
    Specifies the type of animation. If you specify IDANI_CAPTION, the window caption will animate from the position specified by lprcFrom to the position specified by lprcTo. The effect is similar to minimizing or maximizing a window. 
    lprcFrom 
    Pointer to a RECT structure specifying the location and size of the icon or minimized window. 
    lprcTo 
    Pointer to a RECT structure specifying the location and size of the restored window 
    Return Value
    Nonzero if the function succeeds; otherwise 0.Res
    This member function emulates the functionality of the function DrawAnimatedRects, as described in the Platform SDK.See Also
    CWnd Overview | Class Members | Hierarchy Chart--------------------------------------------------------------------------------Send feedback on this topic to Microsoft© Microsoft Corporation. All rights reserved.