Beispiel #1
0
COLORREF CRefTop(lpCRefStack s)
{
  if (s->i > 0) {
    return s->s[s->i - 1];
  }
  else {
    fprintf(stderr, "Error : no top, stack is empty !\n");
    return MYRGB(0,0,0);
  }
}
Beispiel #2
0
#ifdef _DEBUG
	#define new DEBUG_NEW
#endif _DEBUG

#define MyB(rgb)	((BYTE)(rgb))
#define MyG(rgb)	((BYTE)(((WORD)(rgb)) >> 8))
#define MyR(rgb)	((BYTE)((rgb)>>16))
#define MYRGB(hex)	RGB(MyR(hex), MyG(hex), MyB(hex))

#define NDEFAULTCOLORS (sizeof(CColorCombo::m_DefaultColors)/sizeof(COLORENTRY))

COLORREF CColorCombo::m_SavedColor = CLR_NONE;
COLORCOMBOENTRY* CColorCombo::m_pComboList = NULL;
const COLORENTRY CColorCombo::m_DefaultColors[] = {
	MYRGB(0x4682B4), "Steel blue",
	MYRGB(0x041690), "Royal blue",
	MYRGB(0x6495ED), "Cornflower blue",
	MYRGB(0xB0C4DE), "Light steel blue",
	MYRGB(0x7B68EE), "Medium slate blue",
	MYRGB(0x6A5ACD), "Slate blue",
	MYRGB(0x483D8B), "Dark slate blue",
	MYRGB(0x191970), "Midnight blue",
	MYRGB(0x000080), "Navy",
	MYRGB(0x00008B), "Dark blue",
	MYRGB(0x0000CD), "Medium blue",
	MYRGB(0x0000FF), "Blue",
	MYRGB(0x1E90FF), "Dodger blue",
	MYRGB(0x00BFFF), "Deep sky blue",
	MYRGB(0x87CEFA), "Light sky blue",
	MYRGB(0x87CEEB), "Sky blue",
Beispiel #3
0
BOOL CRefIsInit(lpCRefStack s)
{
  return ((s->i == 1) && (CRefTop(s) == MYRGB(0,0,0)));
}