Mercurial > dwindows
comparison win/dw.c @ 429:f977c80a1dfa
Check for inconsistent parameters in dw_box_pack_start() and
dw_box_pack_end(). Throw up messagebox if an error.
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 27 May 2003 03:41:57 +0000 |
parents | 4fe2df53ec9f |
children | 98d6c00fe11e |
comparison
equal
deleted
inserted
replaced
428:fdf111cb0986 | 429:f977c80a1dfa |
---|---|
4718 */ | 4718 */ |
4719 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) | 4719 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) |
4720 { | 4720 { |
4721 Box *thisbox; | 4721 Box *thisbox; |
4722 | 4722 |
4723 if ( width == 0 && hsize == FALSE ) | |
4724 dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); | |
4725 if ( height == 0 && vsize == FALSE ) | |
4726 dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); | |
4727 | |
4723 thisbox = (Box *)GetWindowLong(box, GWL_USERDATA); | 4728 thisbox = (Box *)GetWindowLong(box, GWL_USERDATA); |
4724 if(thisbox) | 4729 if(thisbox) |
4725 { | 4730 { |
4726 int z; | 4731 int z; |
4727 Item *tmpitem, *thisitem = thisbox->items; | 4732 Item *tmpitem, *thisitem = thisbox->items; |
7509 */ | 7514 */ |
7510 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) | 7515 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) |
7511 { | 7516 { |
7512 Box *thisbox; | 7517 Box *thisbox; |
7513 | 7518 |
7519 if ( width == 0 && hsize == FALSE ) | |
7520 dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); | |
7521 if ( height == 0 && vsize == FALSE ) | |
7522 dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); | |
7523 | |
7514 thisbox = (Box *)GetWindowLong(box, GWL_USERDATA); | 7524 thisbox = (Box *)GetWindowLong(box, GWL_USERDATA); |
7515 if(thisbox) | 7525 if(thisbox) |
7516 { | 7526 { |
7517 int z; | 7527 int z; |
7518 Item *tmpitem, *thisitem = thisbox->items; | 7528 Item *tmpitem, *thisitem = thisbox->items; |