Many people use the computer to change the color of the system window to a wink (85, 95, 205), in the design of the interface background of the software need to consider that the background color is based on the system's window color to determine.
When using AWT, you can get the Windows System window color through Java.awt.SystemColor.window. When using SWT, you cannot get the system window color if you use Display.getsystemcolor (ID). But through the display of the Getsystemcolor method can inspire us to write a method to get the system window color, the following is the code:
int pixel = Org.eclipse.swt.internal.win32.OS.GetSysColor (OS. Color_window); Color Windowcolor = color.win32_new (Display,pixel);
When there is a problem with the above code, the Checkdevice () procedure when Display.getsystemcolor (ID) is omitted, and the fetch process may have an error.
This article from "Winger" blog, declined reprint!
SWT gets Windows system window color