Sign in to follow this  

Desktop Sprites - Advice Needed

This topic is 3462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I use MS VC++ 2008 and Vista. I need advice on how to code one of those desktop apps that use transparent sprites on the actual desktop without a window around them. Traditionally they can be minimized as a tray icon. I just need to be pointed at a tutorial or sample code or anything really. I have about two years experience coding 3D and 2D animation with game engines (using VC++) but I have no idea where to start to build a desktop sprite. For example, these apps create a transparent background sprite (female, sheep, cartoon animation, 3D model animated, fly, ... whatever...) that typically dances or crawls in a corner of the desktop. Any advice greatly appreciated. m0ng00se http://www.freewebs.com/m0ng00se/ Home of BACKSTREETS 3D

Share this post


Link to post
Share on other sites
In the end they are windows as well, just with a few gadgets:

1) Pre Windows2000 you can use regions to create a sort of colorkey
2) With XP you can use layered windows to achieve alpha transparency

Most of the time you want your gadget to be click-through (ie. not take the focus when clicked on). This can mostly be achieved by NOT passing WM_LBUTTONDOWN (and similar) to DefWindowProc. I think there was also a window style that helped along with that.

Share this post


Link to post
Share on other sites
So they're really just an ordinary Windows game with some sort of colorkey to make the window transparent? I sort of know how to do that already with a static graphic but not an animated one. Mainly because I do all my animation with game engines not native Windows API code.

Do you know if it can be done using a game engine? It sounds like I need to write directly to the DirectX API?

m0ng00se

Share this post


Link to post
Share on other sites
I've only ever experimented with regions. The problem here will be that you need to recreate the regions for every frame. This might not run too fast.

The technique used to render a frame might be pretty exchangeable but you have to grab a frame to calculate the region. That's where software rendering (GDI) might be an advantage.

You might want to check the layered window stuff; that probably allows for an easier method.

Share this post


Link to post
Share on other sites

This topic is 3462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this