We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


The framework calls this member function after a change has been made to the Windows initialization file, WIN.INI.

afx_msg void OnWinIniChange(
   LPCTSTR lpszSection 


Points to a string that specifies the name of the section that has changed. (The string does not include the square brackets that enclose the section name.)

The SystemParametersInfo Windows function calls OnWinIniChange after an application uses the function to change a setting in the WIN.INI file.

To send the WM_WININICHANGE message to all top-level windows, an application can use the SendMessage Windows function with its hwnd parameter set to HWND_BROADCAST.

If an application changes many different sections in WIN.INI at the same time, the application should send one WM_WININICHANGE message with lpszSection set to NULL. Otherwise, an application should send WM_WININICHANGE each time it makes a change to WIN.INI.

If an application receives an OnWinIniChange call with lpszSection set to NULL, the application should check all sections in WIN.INI that affect the application.


This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.

Header: afxwin.h