Solved

SCREEN SAVER problem

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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
matchUp  challenge 9 134
JQuery serialize and unserialize 8 271
How do I get Window Title of all opened process? 4 61
Example code 13 43
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

751 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