|
|
| version 1.6, 2004/07/01 11:42:54 | version 1.8, 2005/02/07 14:51:03 |
|---|---|
| Line 1862 static BOOL dc_cb2(void *vpItem, void *v | Line 1862 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 2093 BOOL menudlg_append(int type, MENUID id, | Line 2093 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 2159 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 2171 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 2236 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 2297 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); |
| } | } |
| } | } |