MASM32 programming to realize the fading effect of windows

Source: Internet
Author: User
Tags function prototype

Because the work is too busy, long time no write program code, but the fun of writing programs I am happy.

Every day to deal with the computer, a busy forget to rest, make the eyes are spent ~

In order to protect the eyes, I decided to write a timed mandatory rest procedure ~

Although there are a lot of such programs, but DIY is still good ~

First consider the implementation of the Countdown prompt window, you want to let the window gradually out ~

This is accomplished using the API function AnimateWindow encapsulated in user32.dll.

The function prototype is:

BOOLAnimateWindow(
   HWNDhwnd,//指定产生动画窗口的句柄;
   DWORDdwTime,//指明动画持续的时间(以微秒计),完成一个动画的标准时间为200微秒;
   DWORDdwFlags//指定动画类型。这个参数可以是一个或多个标志的组合。
 );

dwflags Valid values::

Aw_slide: Use sliding type. The default is the scrolling type. Be ignored when using Aw_center flag;

Aw_activate: Activates the window. This sign cannot be used after the use of the Aw_hide logo;

Aw_blend: To achieve fade out effect. This flag can only be used when the HWND is a top-level window;

Aw_hide: Hides the window, by default displays the window;

Aw_center: If the aw_hide flag is used, the window is overlapped, that is, the window is shrunk, and if the AW_HIDE flag is not used, the window is expanded to expand the window;

Aw_hor_positive: Displays the window from left to right. This flag can be used in scrolling animations and slide animations. When the Aw_center flag is used, the flag is ignored;

Aw_ver_positive: Displays the window from top to bottom. This flag can be used in scrolling animations and slide animations. When the Aw_center flag is used, the flag is ignored;

Aw_ver_negative: Displays the window from the bottom up. This flag can be used in scrolling animations and slide animations. When the Aw_center flag is used, the flag is ignored;

Return value: If the function succeeds, the return value is not 0; if the function fails, the return value is zero.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.