Solved

SCREEN SAVER problem

Posted on 2002-03-12
4
285 Views
Last Modified: 2013-11-20
I have written a Windows Screen Saver. Now when I install it, I try to make it default screen saver for current user. For doing this I change registry entries at path <b>HKEY_CURRENT_USER\Control Panel\Desktop</b>, but after doing changes when I click on Screen Saver dialog box properties then I can't see my screen saver as default screen saver but if I restart my computer then after that I can see my screen saver as active one. I need to know that
 1. why I need to restart my computer to make my screen saver as active.
 2. should I have to do something other then changing registry entries, so that I don't need to restart my computer.

Please HELP me.
0
Comment
Question by:lkjhgfdsa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:Crius
ID: 6857448
Well, for the first part, you are making registry entries.

Registry entries are usually read only upon program startup, and that's why most programs that modify registry settings that affect the operating system have to reboot the operating system to read in the new values.

While I'm not sure it will help, you may want to study WM_SETTINGCHANGE help file in MSDN. It may be able to do what you want...
0
 

Author Comment

by:lkjhgfdsa
ID: 6859813
But WM_SETTINGCHANGE is required to be send to some WINDOW, but to whom should I send this message???
0
 
LVL 3

Accepted Solution

by:
Crius earned 40 total points
ID: 6861154
As stated from the MSDN help files under WM_SETTINGCHANGE:

WM_SETTINGCHANGE
The system sends the WM_SETTINGCHANGE message to all top-level windows when the SystemParametersInfo function changes a system-wide setting or when policy settings have changed.

Applications should send WM_SETTINGCHANGE to all top-level windows when they make changes to system parameters. (This message cannot be sent directly to a window.) To send the WM_SETTINGCHANGE message to all top-level windows, use the SendMessageTimeout function with the hwnd parameter set to HWND_BROADCAST.

A window receives this message through its WindowProc function.


I hope this works for you.. :)
0
 

Author Comment

by:lkjhgfdsa
ID: 7130156
Thanx, I found a function name from your comment, which is SystemParametersInfo, I used this function like this SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, ssTimeout, NULL, 0) to solve out my problem.

thanx.
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question