Control Panel Doesn't Respond to WM_WININICHANGE MessagesLast reviewed: July 22, 1997Article ID: Q68360 |
3.00 3.10
WINDOWS
kbprg
The information in this article applies to:
SUMMARYThe Control Panel application does not respond to WM_WININICHANGE messages under Windows. Microsoft considered including this functionality; however, it was decided that, because the Control Panel changes various items in the system configuration file (WIN.INI), responding to a WM_WININICHANGE message could cause a conflict. (For example, if another application changes the text color while the Control Panel has its color dialog displayed, what is the proper action for the Control Panel?) To work around this potential problem, the Control Panel reinitializes itself each time a new dialog box is displayed. However, this initialization does not involve querying the WIN.INI file with GetProfileString().
MORE INFORMATIONWindows caches the WIN.INI file. Therefore, if a regular text editor (other than Notepad) is used to modify the file, the disk file is updated, however, the cache is not. When a WM_WININICHANGE message is broadcast to all top-level windows, each application can check the WIN.INI cache for relevant changes. However, applications will not look at the WIN.INI file on disk. One way to update the cache is to exit Windows and restart. Another way to update the cache is to call WriteProfileString(NULL,NULL,NULL), which forces a flush of the cache. A subsequent call to GetProfileString() will cause the WIN.INI file on disk to be read into the cache. However, the changes will not be reflected by the Control Panel unless the user exits and re-enters Windows. Reflecting changes to WIN.INI in the Control Panel without first exiting Windows is under consideration for inclusion in a future release of Windows.
|
Additional reference words: 3.00 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |