在一个程序中试着调用了如下代码,非常杯具又奇怪的发现VS2005,VC6.0,MSDN整个界面全变了颜色,看着非常别扭。
所以请问怎么改回默认的颜色或风格?
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// Window elements to change.
int aiElements[3] = {COLOR_ACTIVEBORDER,
COLOR_ACTIVECAPTION,
COLOR_WINDOW};
// Array of RGB values.
DWORD aColors[3];
// Define the new colors.
aColors[0] = RGB(0x80, 0x00, 0x80); // dark purple
aColors[1] = RGB(0x00, 0x80, 0x80); // dark cyan
aColors[2] = RGB(0xC0, 0xC0, 0xC0); // light gray
// Set the window elements in aiElements to the colors
// specified in aColors.
SetSysColors(3, aiElements, aColors);
}
所以请问怎么改回默认的颜色或风格?
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// Window elements to change.
int aiElements[3] = {COLOR_ACTIVEBORDER,
COLOR_ACTIVECAPTION,
COLOR_WINDOW};
// Array of RGB values.
DWORD aColors[3];
// Define the new colors.
aColors[0] = RGB(0x80, 0x00, 0x80); // dark purple
aColors[1] = RGB(0x00, 0x80, 0x80); // dark cyan
aColors[2] = RGB(0xC0, 0xC0, 0xC0); // light gray
// Set the window elements in aiElements to the colors
// specified in aColors.
SetSysColors(3, aiElements, aColors);
}
你把操作系统的窗口的颜色给改了,你打开其它软件看看是不是也改了
你在桌面属性里看看能不能改成原来默认的颜色和风格