Solved

SCREEN SAVER problem

Posted on 2002-03-12
4
282 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Looking for a specific application/software 2 114
List out all word 7 317
Modbus - whats the maximum I can store in one register? 4 80
sumHeights2  challenge 7 114
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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