Archived

This topic is now archived and is closed to further replies.

Help! I have 2 questions (Newb) :P

This topic is 5655 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''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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites