共用方式為


High Contrast Parameter

The high contrast parameter indicates whether the user wants a high contrast between the colors used for foreground and background visuals.

The user controls the setting of the high contrast parameter by using the Accessibility Control Panel application or another application for customizing the environment. Applications use the SPI_GETHIGHCONTRAST and SPI_SETHIGHCONTRAST flags with the SystemParametersInfo function to get and set the high contrast parameter.

During initialization and when processing WM_SYSCOLORCHANGE messages, applications should determine the state of the high contrast parameter. To make this determination, applications should call SystemParametersInfo with the SPI_GETHIGHCONTRAST flag to obtain a HIGHCONTRAST structure. If the dwFlags member of the HIGHCONTRAST structure has the HCF_HIGHCONTRASTON bit set, then the high contrast feature is enabled, and applications should do the following:

  • Map all colors to a single pair of foreground and background colors. Use the GetSysColor function to determine the appropriate foreground and background colors, using either a combination of COLOR_WINDOWTEXT and COLOR_WINDOW or a combination of COLOR_BTNTEXT and COLOR_BTNFACE. The GetSysColor function returns the colors selected by the user through the Control Panel.
  • Omit any bitmapped images that would typically be displayed behind text. Such images are visually distracting to a user who needs high contrast.
  • Images that would typically be drawn in multiple colors should be drawn using the foreground and background colors selected for text.

Also, applications use the SPI_GETDISABLEOVERLAPPEDCONTENT and SPI_SETDISABLEOVERLAPPEDCONTENT flags with the SystemParametersInfo function to get and set overlapped content parameter. Display features such as background images, textured backgrounds, water marks on documents, alpha-blending, and transparency can reduce the contrast between the foreground and background, making it harder for users with low vision to see objects on the screen. This flag enables applications to determine whether such overlapped content has been disabled