Windows Interface Programming Article 1 bitmap display effect flying effect and stretching Effect

Source: Internet
Author: User

Reprinted please indicate the source, original address: http://blog.csdn.net/morewindows/article/details/8696726

Welcome to Weibo: http://weibo.com/MoreWindows

For Windows interface programming, the bitmap display special effect series directory is as follows:

1. The ninth part of Windows Interface Programming: bitmap display effect staggered

Http://blog.csdn.net/morewindows/article/details/8696720

2. Windows Interface Programming Article 10 bitmap display special effect blinds

Http://blog.csdn.net/morewindows/article/details/8696722

3. Windows Interface Programming 11th special bitmap display random block effects

Http://blog.csdn.net/morewindows/article/details/8696724

4. Windows Interface Programming 12th bitmap display special effects fly into effect and stretch Effect

Http://blog.csdn.net/morewindows/article/details/8696726

5. Windows Interface Programming 13th bitmap display special effects collection

Http://blog.csdn.net/morewindows/article/details/8696730

 

This article "Windows Interface Programming 12th bitmap display effect flying effect and stretching effect" will explain the bitmap flying effect and stretching effect. Flying into effect and stretch effect is very common, in the Windows Interface Programming sixth animation starting effect (animation effect display and hidden window) (http://blog.csdn.net/morewindows/article/details/8656068) you can experience the flying animation effect and stretching animation effect when the program window is started and exited.

Stretch from top down (picture cannot open, visit http://blog.csdn.net/morewindows/article/details/8696726)

Stretch from bottom up (picture cannot open, visit http://blog.csdn.net/morewindows/article/details/8696726)

From left to right (picture cannot open, please visit http://blog.csdn.net/morewindows/article/details/8696726)

Flying effect from right to left (picture cannot open, visit http://blog.csdn.net/morewindows/article/details/8696726)

In programming, as long as the display coordinate is calculated, the code is directly given:

// Flying and stretching-from top down // The Windows Interface Programming 12th bitmap display effect flying and stretching effect // http://blog.csdn.net/morewindows/article/details/8696726void animatedraw_flyingtoptobottom (HDC, HDC hdcmem, int nwidth, int nheight, uint nintervaltime = 2, bool bfade = true) {Int J; If (bfade) {for (j = 0; j <= nheight; j ++) {bitblt (HDC, 0, 0, nwidth, J, hdcmem, 0, 0, srccopy); sleep (nintervaltime) ;}} else {for (j = 0; j <= nheight; j ++) {bitblt (HDC, 0, 0, nwidth, J, hdcmem, 0, nheight-J, srccopy); sleep (nintervaltime );}} bitblt (HDC, 0, 0, nwidth, nheight, hdcmem, 0, 0, srccopy );} // fly in and stretch-from bottom up // Windows Interface Programming 12th bitmap display effect fly in and stretch effect // http://blog.csdn.net/morewindows/article/details/8696726void animatedraw_flyingbottomtotop (HDC, HDC hdcmem, int nwidth, int nheight, uint nintervaltime = 2, bool bfade = true) {Int J; If (bfade) {for (j = nheight; j> = 0; j --) {bitblt (HDC, 0, J, nwidth, nheight-J, hdcmem, 0, J, srccopy); sleep (nintervaltime) ;}} else {for (j = nheight; j> = 0; j --) {bitblt (HDC, 0, J, nwidth, nheight-J, hdcmem, 0, 0, srccopy); sleep (nintervaltime );}} bitblt (HDC, 0, 0, nwidth, nheight, hdcmem, 0, 0, srccopy );} // fly in and stretch-from left to right // Windows Interface Programming 12th bitmap show effect fly in and stretch effect // http://blog.csdn.net/morewindows/article/details/8696726void animatedraw_flyinglefttoright (HDC, HDC hdcmem, int nwidth, int nheight, uint nintervaltime = 2, bool bfade = true) {int I; If (bfade) {for (I = 0; I <= nwidth; I ++) {bitblt (HDC, 0, 0, I, nheight, hdcmem, 0, 0, srccopy); sleep (nintervaltime) ;}} else {for (I = 0; I <= nwidth; I ++) {bitblt (HDC, 0, 0, I, nheight, hdcmem, nwidth-I, 0, srccopy); sleep (nintervaltime );}} bitblt (HDC, 0, 0, nwidth, nheight, hdcmem, 0, 0, srccopy );} // fly in and stretch-from right to left // Windows Interface Programming 12th bitmap show effect fly in and stretch effect // http://blog.csdn.net/morewindows/article/details/8696726void animatedraw_flyingrighttoleft (HDC, HDC hdcmem, int nwidth, int nheight, uint nintervaltime = 2, bool bfade = true) {int I; If (bfade) {for (I = nwidth; I> = 0; I --) {bitblt (HDC, I, 0, nwidth-I, nheight, hdcmem, I, 0, srccopy); sleep (nintervaltime) ;}} else {for (I = nwidth; I >= 0; I --) {bitblt (HDC, I, 0, nwidth-I, nheight, hdcmem, 0, 0, srccopy); sleep (nintervaltime );}} bitblt (HDC, 0, 0, nwidth, nheight, hdcmem, 0, 0, srccopy );}

Complete program in "Windows Interface Programming 13th bitmap display special effect Collection"

Http://blog.csdn.net/morewindows/article/details/8696730

Reprinted please indicate the source, original address: http://blog.csdn.net/morewindows/article/details/8696726

Welcome to Weibo: http://weibo.com/MoreWindows

 

Related Article

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.