afx_msg void OnDevModeChange( LPSTR lpDeviceName );
lpDeviceName
Points to the device name specified in the Windows initialization file, WIN.INI.
Called for all top-level CWnds when the user changes device-mode settings.
This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_DEVMODECHANGE message.
CWnd::Default, WM_DEVMODECHANGE