|
|
| version 1.6, 2004/07/01 11:42:54 | version 1.9, 2005/02/11 21:17:22 |
|---|---|
| Line 12 struct _dprm *next; | Line 12 struct _dprm *next; |
| UINT16 width; | UINT16 width; |
| UINT16 num; | UINT16 num; |
| VRAMHDL icon; | VRAMHDL icon; |
| char str[96]; | OEMCHAR str[96]; |
| } _DLGPRM, *DLGPRM; | } _DLGPRM, *DLGPRM; |
| #define PRMNEXT_EMPTY ((DLGPRM)-1) | #define PRMNEXT_EMPTY ((DLGPRM)-1) |
| Line 29 typedef struct { | Line 29 typedef struct { |
| typedef struct { | typedef struct { |
| void *font; | void *font; |
| short fontsize; | SINT16 fontsize; |
| short scrollbar; | SINT16 scrollbar; |
| short dispmax; | SINT16 dispmax; |
| short basepos; | SINT16 basepos; |
| } DLGLIST; | } DLGLIST; |
| typedef struct { | typedef struct { |
| short minval; | SINT16 minval; |
| short maxval; | SINT16 maxval; |
| int pos; | int pos; |
| UINT8 type; | UINT8 type; |
| UINT8 moving; | UINT8 moving; |
| Line 108 static BOOL seaprmempty(void *vpItem, vo | Line 108 static BOOL seaprmempty(void *vpItem, vo |
| return(FALSE); | return(FALSE); |
| } | } |
| static DLGPRM resappend(MENUDLG dlg, const char *str) { | static DLGPRM resappend(MENUDLG dlg, const OEMCHAR *str) { |
| DLGPRM prm; | DLGPRM prm; |
| Line 123 static DLGPRM resappend(MENUDLG dlg, con | Line 123 static DLGPRM resappend(MENUDLG dlg, con |
| prm->icon = NULL; | prm->icon = NULL; |
| prm->str[0] = '\0'; | prm->str[0] = '\0'; |
| if (str) { | if (str) { |
| milsjis_ncpy(prm->str, str, sizeof(prm->str)); | milstr_ncpy(prm->str, str, NELEMENTS(prm->str)); |
| } | } |
| } | } |
| return(prm); | return(prm); |
| Line 169 static DLGHDL dlghdlsea(MENUDLG dlg, MEN | Line 169 static DLGHDL dlghdlsea(MENUDLG dlg, MEN |
| return((DLGHDL)listarray_enum(dlg->dlg, dsbyid, (void *)(long)id)); | return((DLGHDL)listarray_enum(dlg->dlg, dsbyid, (void *)(long)id)); |
| } | } |
| static BOOL gettextsz(DLGHDL hdl, POINT_T *sz) { | static BRESULT gettextsz(DLGHDL hdl, POINT_T *sz) { |
| DLGPRM prm; | DLGPRM prm; |
| Line 223 static void getmid(POINT_T *pt, const RE | Line 223 static void getmid(POINT_T *pt, const RE |
| } | } |
| static BOOL _cre_settext(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT _cre_settext(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| const char *str; | const OEMCHAR *str; |
| str = (char *)arg; | str = (OEMCHAR *)arg; |
| if (str == NULL) { | if (str == NULL) { |
| str = str_null; | str = str_null; |
| } | } |
| Line 240 const char *str; | Line 240 const char *str; |
| static void dlg_text(MENUDLG dlg, DLGHDL hdl, | static void dlg_text(MENUDLG dlg, DLGHDL hdl, |
| const POINT_T *pt, const RECT_T *rect) { | const POINT_T *pt, const RECT_T *rect) { |
| VRAMHDL icon; | VRAMHDL icon; |
| const char *string; | const OEMCHAR *string; |
| int color; | int color; |
| POINT_T fp; | POINT_T fp; |
| POINT_T p; | POINT_T p; |
| if (hdl->prm == NULL) { | if (hdl->prm == NULL) { |
| return; | return; |
| Line 285 const char *string; | Line 285 const char *string; |
| // ---- base | // ---- base |
| static BOOL dlgbase_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT dlgbase_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| RECT_T rct; | RECT_T rct; |
| Line 300 static BOOL dlgbase_create(MENUDLG dlg, | Line 300 static BOOL dlgbase_create(MENUDLG dlg, |
| rct.left = 0; | rct.left = 0; |
| rct.top = 0; | rct.top = 0; |
| rct.bottom = MENUDLG_CYCAPTION; | rct.bottom = MENUDLG_CYCAPTION; |
| menuvram_caption(hdl->vram, &rct, MICON_NULL, (char *)arg); | menuvram_caption(hdl->vram, &rct, MICON_NULL, (OEMCHAR *)arg); |
| return(SUCCESS); | return(SUCCESS); |
| dbcre_err: | dbcre_err: |
| Line 311 dbcre_err: | Line 311 dbcre_err: |
| static void dlgbase_paint(MENUDLG dlg, DLGHDL hdl) { | static void dlgbase_paint(MENUDLG dlg, DLGHDL hdl) { |
| char *title; | OEMCHAR *title; |
| title = NULL; | title = NULL; |
| if (hdl->prm) { | if (hdl->prm) { |
| Line 459 static void *dlglist_setfont(DLGHDL hdl, | Line 459 static void *dlglist_setfont(DLGHDL hdl, |
| if ((pt.y <= 0) || (pt.y >= 65536)) { | if ((pt.y <= 0) || (pt.y >= 65536)) { |
| pt.y = 16; | pt.y = 16; |
| } | } |
| hdl->c.dl.fontsize = (short)pt.y; | hdl->c.dl.fontsize = (SINT16)pt.y; |
| hdl->c.dl.dispmax = (short)(hdl->vram->height / pt.y); | hdl->c.dl.dispmax = (SINT16)(hdl->vram->height / pt.y); |
| return(ret); | return(ret); |
| } | } |
| Line 483 static void dlglist_reset(MENUDLG dlg, D | Line 483 static void dlglist_reset(MENUDLG dlg, D |
| hdl->c.dl.basepos = 0; | hdl->c.dl.basepos = 0; |
| } | } |
| static BOOL dlglist_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT dlglist_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| int width; | int width; |
| int height; | int height; |
| Line 683 static BOOL dlglist_append(MENUDLG dlg, | Line 683 static BOOL dlglist_append(MENUDLG dlg, |
| while(*sto) { | while(*sto) { |
| sto = &((*sto)->next); | sto = &((*sto)->next); |
| } | } |
| *sto = resappend(dlg, (char *)arg); | *sto = resappend(dlg, (OEMCHAR *)arg); |
| if (*sto) { | if (*sto) { |
| r = dlglist_drawsub(hdl, hdl->prmcnt, FALSE); | r = dlglist_drawsub(hdl, hdl->prmcnt, FALSE); |
| hdl->prmcnt++; | hdl->prmcnt++; |
| Line 725 static BOOL dlglist_setex(MENUDLG dlg, D | Line 725 static BOOL dlglist_setex(MENUDLG dlg, D |
| } | } |
| resattachicon(dlg, dp, arg->icon, hdl->c.dl.fontsize, | resattachicon(dlg, dp, arg->icon, hdl->c.dl.fontsize, |
| hdl->c.dl.fontsize); | hdl->c.dl.fontsize); |
| milsjis_ncpy(dp->str, arg->str, sizeof(dp->str)); | milstr_ncpy(dp->str, arg->str, NELEMENTS(dp->str)); |
| return(dlglist_drawsub(hdl, arg->pos, (arg->pos == hdl->val))); | return(dlglist_drawsub(hdl, arg->pos, (arg->pos == hdl->val))); |
| } | } |
| Line 749 enum { | Line 749 enum { |
| DLCUR_INBAR = 2, | DLCUR_INBAR = 2, |
| DLCUR_DOWN = 3, | DLCUR_DOWN = 3, |
| DLCUR_PGUP = 4, | DLCUR_PGUP = 4, |
| DLCUR_PGDN = 5 | DLCUR_PGDN = 5, |
| DLCUR_INCUR = 6 | |
| }; | }; |
| static int dlglist_getpc(DLGHDL hdl, int x, int y) { | static int dlglist_getpc(DLGHDL hdl, int x, int y) { |
| Line 841 static void dlglist_onclick(MENUDLG dlg, | Line 842 static void dlglist_onclick(MENUDLG dlg, |
| case DLCUR_INLIST: | case DLCUR_INLIST: |
| val = dlglist_getpos(hdl, y); | val = dlglist_getpos(hdl, y); |
| if ((val == hdl->val) && (val != -1)) { | if ((val == hdl->val) && (val != -1)) { |
| dlg->proc(DLGMSG_COMMAND, hdl->id, 1); | dlg->dragflg = DLCUR_INCUR; |
| } | |
| else { | |
| dlglist_setval(dlg, hdl, val); | |
| dlg->proc(DLGMSG_COMMAND, hdl->id, 0); | |
| } | } |
| dlglist_setval(dlg, hdl, val); | |
| dlg->proc(DLGMSG_COMMAND, hdl->id, 0); | |
| break; | break; |
| case 1: | case 1: |
| Line 884 static void dlglist_onclick(MENUDLG dlg, | Line 883 static void dlglist_onclick(MENUDLG dlg, |
| static void dlglist_move(MENUDLG dlg, DLGHDL hdl, int x, int y, int focus) { | static void dlglist_move(MENUDLG dlg, DLGHDL hdl, int x, int y, int focus) { |
| int flg; | int flg; |
| int val; | |
| int height; | int height; |
| x -= (MENU_LINE * 2); | x -= (MENU_LINE * 2); |
| Line 891 static void dlglist_move(MENUDLG dlg, DL | Line 891 static void dlglist_move(MENUDLG dlg, DL |
| flg = dlglist_getpc(hdl, x, y); | flg = dlglist_getpc(hdl, x, y); |
| switch(dlg->dragflg) { | switch(dlg->dragflg) { |
| case DLCUR_INLIST: | case DLCUR_INLIST: |
| if (flg == 0) { | case DLCUR_INCUR: |
| dlglist_setval(dlg, hdl, dlglist_getpos(hdl, y)); | if (flg == DLCUR_INLIST) { |
| dlg->proc(DLGMSG_COMMAND, hdl->id, 0); | val = dlglist_getpos(hdl, y); |
| if (val != hdl->val) { | |
| dlg->dragflg = DLCUR_INLIST; | |
| dlglist_setval(dlg, hdl, val); | |
| dlg->proc(DLGMSG_COMMAND, hdl->id, 0); | |
| } | |
| } | } |
| break; | break; |
| Line 933 static void dlglist_rel(MENUDLG dlg, DLG | Line 938 static void dlglist_rel(MENUDLG dlg, DLG |
| dlglist_setbtn(hdl, dlg->dragflg - 1); | dlglist_setbtn(hdl, dlg->dragflg - 1); |
| drawctrls(dlg, hdl); | drawctrls(dlg, hdl); |
| break; | break; |
| case DLCUR_INCUR: | |
| dlg->proc(DLGMSG_COMMAND, hdl->id, 1); | |
| break; | |
| } | } |
| (void)focus; | (void)focus; |
| } | } |
| Line 960 static void dlgslider_setflag(DLGHDL hdl | Line 969 static void dlgslider_setflag(DLGHDL hdl |
| else { | else { |
| type = 2 + (21 << 8) + (11 << 16); | type = 2 + (21 << 8) + (11 << 16); |
| } | } |
| hdl->c.ds.type = (BYTE)type; | hdl->c.ds.type = (UINT8)type; |
| if (!(hdl->flag & MSS_VERT)) { | if (!(hdl->flag & MSS_VERT)) { |
| hdl->c.ds.sldh = (BYTE)(type >> 16); | hdl->c.ds.sldh = (UINT8)(type >> 16); |
| hdl->c.ds.sldv = (BYTE)(type >> 8); | hdl->c.ds.sldv = (UINT8)(type >> 8); |
| } | } |
| else { | else { |
| hdl->c.ds.sldh = (BYTE)(type >> 8); | hdl->c.ds.sldh = (UINT8)(type >> 8); |
| hdl->c.ds.sldv = (BYTE)(type >> 16); | hdl->c.ds.sldv = (UINT8)(type >> 16); |
| } | } |
| } | } |
| Line 1012 static int dlgslider_setpos(DLGHDL hdl, | Line 1021 static int dlgslider_setpos(DLGHDL hdl, |
| return(val); | return(val); |
| } | } |
| static BOOL dlgslider_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT dlgslider_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| hdl->c.ds.minval = (short)(long)arg; | hdl->c.ds.minval = (SINT16)(long)arg; |
| hdl->c.ds.maxval = (short)((long)arg >> 16); | hdl->c.ds.maxval = (SINT16)((long)arg >> 16); |
| hdl->c.ds.moving = 0; | hdl->c.ds.moving = 0; |
| dlgslider_setflag(hdl); | dlgslider_setflag(hdl); |
| hdl->c.ds.pos = dlgslider_setpos(hdl, 0); | hdl->c.ds.pos = dlgslider_setpos(hdl, 0); |
| Line 1202 static void *dlgtablist_setfont(DLGHDL h | Line 1211 static void *dlgtablist_setfont(DLGHDL h |
| return(ret); | return(ret); |
| } | } |
| static BOOL dlgtablist_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT dlgtablist_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| RECT_T rct; | RECT_T rct; |
| Line 1336 static void dlgtablist_append(MENUDLG dl | Line 1345 static void dlgtablist_append(MENUDLG dl |
| while(*sto) { | while(*sto) { |
| sto = &((*sto)->next); | sto = &((*sto)->next); |
| } | } |
| res = resappend(dlg, (char *)arg); | res = resappend(dlg, (OEMCHAR *)arg); |
| if (res) { | if (res) { |
| *sto = res; | *sto = res; |
| fontmng_getsize(hdl->c.dtl.font, (char *)arg, &pt); | fontmng_getsize(hdl->c.dtl.font, (OEMCHAR *)arg, &pt); |
| res->width = pt.x; | res->width = pt.x; |
| hdl->prmcnt++; | hdl->prmcnt++; |
| } | } |
| Line 1376 static void dlgtablist_onclick(MENUDLG d | Line 1385 static void dlgtablist_onclick(MENUDLG d |
| static void dlgedit_paint(MENUDLG dlg, DLGHDL hdl) { | static void dlgedit_paint(MENUDLG dlg, DLGHDL hdl) { |
| RECT_T rct; | RECT_T rct; |
| POINT_T pt; | POINT_T pt; |
| const char *string; | const OEMCHAR *string; |
| rct = hdl->rect; | rct = hdl->rect; |
| menuvram_box2(dlg->vram, &rct, | menuvram_box2(dlg->vram, &rct, |
| Line 1581 static void dlgtext_paint(MENUDLG dlg, D | Line 1590 static void dlgtext_paint(MENUDLG dlg, D |
| static void dlgtext_itemset(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static void dlgtext_itemset(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| const void *str; | const OEMCHAR *str; |
| if (hdl->prm) { | if (hdl->prm) { |
| str = (char *)arg; | str = (OEMCHAR *)arg; |
| if (str == NULL) { | if (str == NULL) { |
| str = str_null; | str = str_null; |
| } | } |
| milsjis_ncpy(hdl->prm->str, str, sizeof(hdl->prm->str)); | milstr_ncpy(hdl->prm->str, str, NELEMENTS(hdl->prm->str)); |
| fontmng_getsize(hdl->c.dt.font, str, &hdl->c.dt.pt); | fontmng_getsize(hdl->c.dt.font, str, &hdl->c.dt.pt); |
| } | } |
| (void)dlg; | (void)dlg; |
| Line 1630 static void iconpaint(MENUDLG dlg, DLGHD | Line 1639 static void iconpaint(MENUDLG dlg, DLGHD |
| } | } |
| } | } |
| static BOOL dlgicon_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT dlgicon_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| hdl->prm = resappend(dlg, NULL); | hdl->prm = resappend(dlg, NULL); |
| resattachicon(dlg, hdl->prm, (UINT16)(long)arg, | resattachicon(dlg, hdl->prm, (UINT16)(long)arg, |
| Line 1648 static void dlgicon_paint(MENUDLG dlg, D | Line 1657 static void dlgicon_paint(MENUDLG dlg, D |
| } | } |
| } | } |
| static BOOL dlgvram_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT dlgvram_create(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| hdl->c.dv.vram = (VRAMHDL)arg; | hdl->c.dv.vram = (VRAMHDL)arg; |
| (void)dlg; | (void)dlg; |
| Line 1691 static void dlgbox_paint(MENUDLG dlg, DL | Line 1700 static void dlgbox_paint(MENUDLG dlg, DL |
| // ---- procs | // ---- procs |
| static BOOL _cre(MENUDLG dlg, DLGHDL hdl, const void *arg) { | static BRESULT _cre(MENUDLG dlg, DLGHDL hdl, const void *arg) { |
| (void)dlg; | (void)dlg; |
| (void)hdl; | (void)hdl; |
| (void)arg; | (void)arg; |
| return(0); | return(SUCCESS); |
| } | } |
| #if 0 // not used | #if 0 // not used |
| Line 1731 static void _moverel(MENUDLG dlg, DLGHDL | Line 1740 static void _moverel(MENUDLG dlg, DLGHDL |
| (void)focus; | (void)focus; |
| } | } |
| typedef BOOL (*DLGCRE)(MENUDLG dlg, DLGHDL hdl, const void *arg); | typedef BRESULT (*DLGCRE)(MENUDLG dlg, DLGHDL hdl, const void *arg); |
| typedef void (*DLGPAINT)(MENUDLG dlg, DLGHDL hdl); | typedef void (*DLGPAINT)(MENUDLG dlg, DLGHDL hdl); |
| typedef void (*DLGSETVAL)(MENUDLG dlg, DLGHDL hdl, int val); | typedef void (*DLGSETVAL)(MENUDLG dlg, DLGHDL hdl, int val); |
| typedef void (*DLGCLICK)(MENUDLG dlg, DLGHDL hdl, int x, int y); | typedef void (*DLGCLICK)(MENUDLG dlg, DLGHDL hdl, int x, int y); |
| Line 1862 static BOOL dc_cb2(void *vpItem, void *v | Line 1871 static BOOL dc_cb2(void *vpItem, void *v |
| if (hdl->flag & MENU_REDRAW) { | if (hdl->flag & MENU_REDRAW) { |
| hdl->flag &= ~MENU_REDRAW; | hdl->flag &= ~MENU_REDRAW; |
| if ((!(hdl->flag & MENU_DISABLE)) && | if ((!(hdl->flag & MENU_DISABLE)) && |
| ((unsigned int)hdl->type < (sizeof(dlgpaint)/sizeof(DLGPAINT)))) { | ((UINT)hdl->type < NELEMENTS(dlgpaint))) { |
| dlgpaint[hdl->type](dlg, hdl); | dlgpaint[hdl->type](dlg, hdl); |
| menubase_setrect(dlg->vram, &hdl->rect); | menubase_setrect(dlg->vram, &hdl->rect); |
| } | } |
| Line 1930 static int defproc(int msg, MENUID id, l | Line 1939 static int defproc(int msg, MENUID id, l |
| } | } |
| BOOL menudlg_create(int width, int height, const char *str, | BRESULT menudlg_create(int width, int height, const OEMCHAR *str, |
| int (*proc)(int msg, MENUID id, long param)) { | int (*proc)(int msg, MENUID id, long param)) { |
| MENUBASE *mb; | MENUBASE *mb; |
| Line 2035 void menudlg_destroy(void) { | Line 2044 void menudlg_destroy(void) { |
| // ---- | // ---- |
| BOOL menudlg_appends(const MENUPRM *res, int count) { | BRESULT menudlg_appends(const MENUPRM *res, int count) { |
| BOOL r; | BRESULT r; |
| r = SUCCESS; | r = SUCCESS; |
| while(count--) { | while(count--) { |
| Line 2048 BOOL menudlg_appends(const MENUPRM *res, | Line 2057 BOOL menudlg_appends(const MENUPRM *res, |
| return(r); | return(r); |
| } | } |
| BOOL menudlg_append(int type, MENUID id, MENUFLG flg, const void *arg, | BRESULT menudlg_append(int type, MENUID id, MENUFLG flg, const void *arg, |
| int posx, int posy, int width, int height) { | int posx, int posy, int width, int height) { |
| MENUDLG dlg; | MENUDLG dlg; |
| Line 2093 BOOL menudlg_append(int type, MENUID id, | Line 2102 BOOL menudlg_append(int type, MENUID id, |
| dhdl.prm = NULL; | dhdl.prm = NULL; |
| dhdl.prmcnt = 0; | dhdl.prmcnt = 0; |
| dhdl.val = 0; | dhdl.val = 0; |
| if (((unsigned int)type >= (sizeof(dlgcre)/sizeof(DLGCRE))) || | if (((UINT)type >= NELEMENTS(dlgcre)) || |
| (dlgcre[type](dlg, &dhdl, arg))) { | (dlgcre[type](dlg, &dhdl, arg))) { |
| goto mda_err; | goto mda_err; |
| } | } |
| Line 2159 void menudlg_moving(int x, int y, int bt | Line 2168 void menudlg_moving(int x, int y, int bt |
| y -= hdl->rect.top; | y -= hdl->rect.top; |
| dlg->btn = 1; | dlg->btn = 1; |
| dlg->lastid = hdl->id; | dlg->lastid = hdl->id; |
| if ((unsigned int)hdl->type < | if ((UINT)hdl->type < NELEMENTS(dlgclick)) { |
| (sizeof(dlgclick)/sizeof(DLGCLICK))) { | |
| dlgclick[hdl->type](dlg, hdl, x, y); | dlgclick[hdl->type](dlg, hdl, x, y); |
| } | } |
| } | } |
| Line 2172 void menudlg_moving(int x, int y, int bt | Line 2180 void menudlg_moving(int x, int y, int bt |
| focus = rect_in(&hdl->rect, x, y); | focus = rect_in(&hdl->rect, x, y); |
| x -= hdl->rect.left; | x -= hdl->rect.left; |
| y -= hdl->rect.top; | y -= hdl->rect.top; |
| if ((unsigned int)hdl->type < (sizeof(dlgmov)/sizeof(DLGMOV))) { | if ((UINT)hdl->type < NELEMENTS(dlgmov)) { |
| dlgmov[hdl->type](dlg, hdl, x, y, focus); | dlgmov[hdl->type](dlg, hdl, x, y, focus); |
| } | } |
| if (btn == 2) { | if (btn == 2) { |
| dlg->btn = 0; | dlg->btn = 0; |
| if ((unsigned int)hdl->type < | if ((UINT)hdl->type < NELEMENTS(dlgrel)) { |
| (sizeof(dlgrel)/sizeof(DLGREL))) { | |
| dlgrel[hdl->type](dlg, hdl, focus); | dlgrel[hdl->type](dlg, hdl, focus); |
| } | } |
| } | } |
| Line 2238 void *menudlg_msg(int ctrl, MENUID id, v | Line 2245 void *menudlg_msg(int ctrl, MENUID id, v |
| case DMSG_SETVAL: | case DMSG_SETVAL: |
| ret = (void *)hdl->val; | ret = (void *)hdl->val; |
| if ((unsigned int)hdl->type < | if ((UINT)hdl->type < NELEMENTS(dlgsetval)) { |
| (sizeof(dlgsetval)/sizeof(DLGSETVAL))) { | |
| dlgsetval[hdl->type](dlg, hdl, (int)arg); | dlgsetval[hdl->type](dlg, hdl, (int)arg); |
| } | } |
| break; | break; |
| Line 2300 void *menudlg_msg(int ctrl, MENUID id, v | Line 2306 void *menudlg_msg(int ctrl, MENUID id, v |
| case DMSG_ITEMRESET: | case DMSG_ITEMRESET: |
| if ((dlg->btn) && (dlg->lastid == hdl->id)) { | if ((dlg->btn) && (dlg->lastid == hdl->id)) { |
| dlg->btn = 0; | dlg->btn = 0; |
| if ((unsigned int)hdl->type < | if ((UINT)hdl->type < NELEMENTS(dlgrel)) { |
| (sizeof(dlgrel)/sizeof(DLGREL))) { | |
| dlgrel[hdl->type](dlg, hdl, FALSE); | dlgrel[hdl->type](dlg, hdl, FALSE); |
| } | } |
| } | } |