Example #1
0
static int winValCtlColor(Ihandle* ih, HDC hdc, LRESULT *result)
{
  COLORREF cr;
  if (iupwinGetParentBgColor(ih, &cr))
  {
    SetDCBrushColor(hdc, cr);
    *result = (LRESULT)GetStockObject(DC_BRUSH);
    return 1;
  }
  return 0;
}
static int winToggleCtlColor(Ihandle* ih, HDC hdc, LRESULT *result)
{
    COLORREF cr;

    SetBkMode(hdc, TRANSPARENT);

    if (iupwinGetColorRef(ih, "FGCOLOR", &cr))
        SetTextColor(hdc, cr);

    if (iupwinGetParentBgColor(ih, &cr))
    {
        SetDCBrushColor(hdc, cr);
        *result = (LRESULT)GetStockObject(DC_BRUSH);
        return 1;
    }
    return 0;
}