Click here to Skip to main content
15,889,808 members
Articles / Desktop Programming / WTL
Article

Image Slider Style

Rate me:
Please Sign up or sign in to vote.
3.42/5 (17 votes)
2 Mar 20031 min read 109.7K   4.2K   53   15
A image slider, implements 20 transitional effects.

Sample Image - appspeed.gif

Introduction

I had written a program like PowerPoint, which needed some code for image slide show. In this demo project I implemented 20 transitional effects.

Using the code

To use the code just add ShowStyle.cpp and ShowStyle.h to your project. Then call MagicShow function to slide-show image.

bool MagicShow( HDC hSrcDC , int x , int y , HDC hDestDC , 
    int xd , int yd , int width , int height , 
    int iDelay, int iStep, int iStyle  );
ParameterTypeDescription
hSrcDCHDCHandle to the source device context
xintSpecifies the logical x-coordinate of the upper-left corner of the source rectangle
yintSpecifies the logical y-coordinate of the upper-left corner of the source rectangle
hDestDCHDCHandle to the destination device context
xdintSpecifies the logical x-coordinate of the upper-left corner of the destination rectangle
ydintSpecifies the logical y-coordinate of the upper-left corner of the destination rectangle
widthintSpecifies the logical width of the source and destination rectangles
heightintSpecifies the logical width of the source and destination rectangles
iDelayintThe delay time per step
iStepintDifferent for every style
iStyleintSlide style

Visit this link for my other Win32 software.

History

Date Posted: 03-03-2003

Copyright

The code is free, if you want to change the source code in order to improve the features, performance, etc., please send me the new source code so that I can have a look at it. The changed source code should contain descriptions of what you have changed, and of course your name. The only thing you MAY NOT CHANGE is the ORIGINAL COPYRIGHT INFORMATION.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generaldistorting the image Pin
JJD7-Feb-05 18:11
JJD7-Feb-05 18:11 
GeneralRe: distorting the image Pin
#realJSOP7-Oct-05 2:48
mve#realJSOP7-Oct-05 2:48 
Generalproblem with closing Pin
Marcin G2-Jun-03 6:27
Marcin G2-Jun-03 6:27 
Generalread image from jpg Pin
Marcin G15-May-03 10:50
Marcin G15-May-03 10:50 
GeneralNice Try! Pin
Chopper4-Mar-03 3:49
Chopper4-Mar-03 3:49 
GeneralRe: Nice Try! Pin
jedyking4-Mar-03 5:20
jedyking4-Mar-03 5:20 
GeneralRe: Nice Try! Pin
#realJSOP7-Oct-05 2:46
mve#realJSOP7-Oct-05 2:46 
GeneralRe: Nice Try! Pin
NormDroid4-Mar-03 9:16
professionalNormDroid4-Mar-03 9:16 
GeneralI assume you mean Pin
Gary Wheeler4-Mar-03 3:24
Gary Wheeler4-Mar-03 3:24 
GeneralRe: I assume you mean Pin
jedyking4-Mar-03 5:10
jedyking4-Mar-03 5:10 
GeneralI don't think so Pin
xuell003-Mar-03 20:46
xuell003-Mar-03 20:46 
GeneralReally cool, but.... Pin
Christian Graus3-Mar-03 9:37
protectorChristian Graus3-Mar-03 9:37 
GeneralRe: Really cool, but.... Pin
Marc Clifton3-Mar-03 11:23
mvaMarc Clifton3-Mar-03 11:23 
I agree, this could be an interesting topic. But given the code (see sample below) I can see why it's not discussed.

It gets a 1 from me.

bool MagicFun1( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun2( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun3( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun4( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun5( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun6( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun7( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun8( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun9( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun10( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun11( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun12( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun13( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun14( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun15( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun16( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun17( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun18( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun19( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);
bool MagicFun20( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);

typedef bool (*LPMAGICFUNCTION)( HDC hSrcDC , int x , int y , HDC hDestDC , int xd , int yd , int width , int height , int nDelay, int nStep);

LPMAGICFUNCTION MagicFuns[ MAGIC_STYLE_NUM ]=
{
	MagicFun1,
	MagicFun2,
	MagicFun3,
	MagicFun4,
	MagicFun5,
	MagicFun6,
	MagicFun7,
	MagicFun8,
	MagicFun9,
	MagicFun10,
	MagicFun11,
	MagicFun12,
	MagicFun13,
	MagicFun14,
	MagicFun15,
	MagicFun16,
	MagicFun17,
	MagicFun18,
	MagicFun19,
	MagicFun20
};


Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

GeneralRe: Really cool, but.... Pin
Christian Graus3-Mar-03 12:13
protectorChristian Graus3-Mar-03 12:13 
GeneralRe: Really cool, but.... Pin
dswigger6-Sep-03 19:45
dswigger6-Sep-03 19:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.