I want to change color of title bar of my application using mfc library..I used this code:
void CDlgMine::OnNcPaint()
{
int aElements[2] = { COLOR_WINDOW, COLOR_HOTLIGHT };
DWORD aOldColors[2];
DWORD aNewColors[2];
aNewColors[0] = RGB(255,255, 255); // light gray
aNewColors[1] = RGB(0, 0, 255); // dark purple
int flag = COLOR_HOTLIGHT;
SetSysColors(2, aElements, aNewColors);
}
but sometimes my title bar becomes ble and sometimes becomes white without title..I don't know why