Solved

SCREEN SAVER problem

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 94
notReplace  challenge 53 126
Sed question 2 84
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seveā€¦
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 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