Reprinted please indicate the source, original address: http://blog.csdn.net/morewindows/article/details/8696720
Welcome to Weibo: http://weibo.com/MoreWindows
The bitmap display effect was first written as a exercise job when I first came into contact with Windows VC ++ programming. At that time, I felt that a simple bitblt function could be related to an animation, it is really creative ). In a twinkling of an eye, I want to graduate. Now I have sorted it out for everyone's entertainment and entertainment.
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 ninth bitmap display effect staggered effect" will explain the bitmap staggered display effect. As shown in:
Horizontal staggered (Images cannot be opened, please visit the http://blog.csdn.net/morewindows/article/details/8696720)
Vertical staggered (picture cannot open, please visit http://blog.csdn.net/morewindows/article/details/8696720)
In terms of programming, horizontal crossover only requires dividing the image into odd and even rows, and then gradually displaying one from top to bottom and one from bottom to top. Vertical staggered images can be divided into odd series and even columns, and then displayed from left to right and from right to left.
The following code is provided:
// Staggered-level // The ninth part of Windows Interface Programming bitmap display effect staggered effect // http://blog.csdn.net/morewindows/article/details/8696720void animatedraw_staggeredhorizontal (HDC, HDC hdcmem, int nwidth, int nheight, uint nintervaltime = 10) {int I, j; for (I = 0; I <= nheight; I + = 2) {for (j = I; j> 0; j-= 2) {// top-down bitblt (HDC, 0, J-1, nwidth, 1, hdcmem, 0, nheight-(I-j-1 ), srccopy); // bitblt (HDC, 0, nheight-J, nwidth, 1, hdcmem, 0, I-j, srccopy) from the bottom up of an even number of rows );} sleep (nintervaltime);} bitblt (HDC, 0, 0, nwidth, nheight, hdcmem, 0, 0, srccopy );} // staggered-vertical // The ninth part of Windows Interface Programming bitmap display effect staggered effect // http://blog.csdn.net/morewindows/article/details/8696720void animatedraw_staggeredvertical (HDC, HDC hdcmem, int nwidth, int nheight, uint nintervaltime = 10) {int I, j; for (I = 0; I <= nwidth; I ++ = 2) {for (j = I; j> 0; j-= 2) {// odd sequence from left to right bitblt (HDC, J-1, 0, 1, nheight, hdcmem, nwidth-(I-j-1 ), 0, srccopy); // bitblt (HDC, nwidth-J, 0, 1, nheight, hdcmem, I-j, 0, srccopy) from the right to the left );} 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
Next "Windows Interface Programming tenth article bitmap display special effects shutter effect" will explain the shutter effect, address in: http://blog.csdn.net/morewindows/article/details/8696722
Reprinted please indicate the source, original address: http://blog.csdn.net/morewindows/article/details/8696720
Welcome to Weibo: http://weibo.com/MoreWindows