static int winDialogSetTrayImageAttrib(Ihandle *ih, const char *value) { if (winDialogCheckTray(ih)) { HICON hIcon = (HICON)iupImageGetIcon(value); if (hIcon) winDialogTrayMessage(ih->handle, NIM_MODIFY, hIcon, NULL); } return 1; }
static int winDialogSetTrayTipAttrib(Ihandle *ih, const char *value) { if (winDialogCheckTray(ih)) { int balloon = IupGetInt(ih, "TRAYTIPBALLOON"); /* must use IupGetInt to use inheritance */ if (balloon) winDialogTrayBalloonMessage(ih, value); else winDialogTrayMessage(ih->handle, NIM_MODIFY, NULL, value); } return 1; }
static int winDialogSetTrayAttrib(Ihandle *ih, const char *value) { int tray = iupStrBoolean(value); if (iupAttribGet(ih, "_IUPDLG_HASTRAY")) { if (!tray) { winDialogTrayMessage(ih->handle, NIM_DELETE, NULL, NULL); iupAttribSetStr(ih, "_IUPDLG_HASTRAY", NULL); } } else { if (tray) { winDialogTrayMessage(ih->handle, NIM_ADD, NULL, NULL); iupAttribSetStr(ih, "_IUPDLG_HASTRAY", "YES"); } } return 1; }
static int winDialogCheckTray(Ihandle *ih) { if (iupAttribGet(ih, "_IUPDLG_HASTRAY")) return 1; if (iupAttribGetBoolean(ih, "TRAY")) { winDialogTrayMessage(ih->handle, NIM_ADD, NULL, NULL); iupAttribSetStr(ih, "_IUPDLG_HASTRAY", "YES"); return 1; } return 0; }
static int winDialogSetTrayTipAttrib(Ihandle *ih, const char *value) { if (winDialogCheckTray(ih)) winDialogTrayMessage(ih->handle, NIM_MODIFY, NULL, (PSTR)value); return 1; }