static char* winButtonGetBgColorAttrib(Ihandle* ih) { /* the most important use of this is to provide the correct background for images */ if (iupwin_comctl32ver6 && ih->data->type&IUP_BUTTON_IMAGE && !iupAttribGet(ih, "IMPRESS")) { COLORREF cr; if (iupwinDrawGetThemeButtonBgColor(ih->handle, &cr)) return iupStrReturnStrf("%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); } if (iupAttribGet(ih, "IMPRESS")) return iupBaseNativeParentGetBgColorAttrib(ih); else return NULL; }
static char* winToggleGetBgColorAttrib(Ihandle* ih) { /* the most important use of this is to provide the correct background for images */ if (iupwin_comctl32ver6 && ih->data->type==IUP_TOGGLE_IMAGE) { COLORREF cr; if (iupwinDrawGetThemeButtonBgColor(ih->handle, &cr)) return iupStrReturnStrf("%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); } if (ih->data->type == IUP_TOGGLE_TEXT) return iupBaseNativeParentGetBgColorAttrib(ih); else return IupGetGlobal("DLGBGCOLOR"); }
static char* winButtonGetBgColorAttrib(Ihandle* ih) { /* the most important use of this is to provide the correct background for images */ if (iupwin_comctl32ver6 && !iupAttribGet(ih, "IMPRESS")) { COLORREF cr; if (iupwinDrawGetThemeButtonBgColor(ih->handle, &cr)) { char* str = iupStrGetMemory(20); sprintf(str, "%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); return str; } } if (iupAttribGet(ih, "IMPRESS")) return iupBaseNativeParentGetBgColorAttrib(ih); else return NULL; }