Help! I have 2 questions (Newb) :P

Started by
3 comments, last by r_taylor883 21 years, 10 months ago
Hi, I''m fairly new at programming...and have 2 questions. 1. I''m trying to make a screensaver but how do I make it start after say 5 mins and die when the mouse moves? 2. (This is a VC++ question lol i''m an idiot ) I''ve made an icon but how do I make my application use it? LOL sorry, i know this is sorta out of topic but id appreciate the help Cheers Rich
Advertisement
This belongs in the beginner forum, but umm, yeah.
1. Spend a few months learning more about programming, then just get have a timer count to 5 mins and get the mouse position every frame. If the position is different, stop the app!

2. Spend a few hours with a book on MSVC++. You add it as a resource and then tell your Window Class structure to use the icon by passing its resource name.

Go forth and learn!
quote:Original post by r_taylor883
I''m trying to make a screensaver but how do I make it start after say 5 mins

Windows will automatically start your screensaver once you select it in display properties.
quote:
and die when the mouse moves?

Handle WM_MOUSEMOVE and do DestroyWindow(hwnd); there.
---visit #directxdev on afternet <- not just for directx, despite the name
About the screensaver: Just make your application as a screen saver using the special library. Most information on windows tells you how to do this.

Or, you could just make a standard windows application and rename it to .scr. Then windows will give a different right click menu with options like configure, install, etc.

As for displaying a config box or whatever, Windows just passes a paramater to the app when it wants to do that. To work it out just put a messagebox to display the command line properties, and then try and open the config screen and it''ll tell you the params.

I figure it''s easy enough doing it this way, but then my compiler doesn''t have any options to create screensavers unlike Anonymous Posters.

Dave
Regards,Dave

This topic is closed to new replies.

Advertisement