comparison os2/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 fac2afe7bda3
comparison
equal deleted inserted replaced
428:fdf111cb0986 429:f977c80a1dfa
4974 */ 4974 */
4975 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) 4975 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
4976 { 4976 {
4977 Box *thisbox; 4977 Box *thisbox;
4978 4978
4979 if ( width == 0 && hsize == FALSE )
4980 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);
4981 if ( height == 0 && vsize == FALSE )
4982 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);
4983
4979 if(WinWindowFromID(box, FID_CLIENT)) 4984 if(WinWindowFromID(box, FID_CLIENT))
4980 { 4985 {
4981 box = WinWindowFromID(box, FID_CLIENT); 4986 box = WinWindowFromID(box, FID_CLIENT);
4982 thisbox = WinQueryWindowPtr(box, QWP_USER); 4987 thisbox = WinQueryWindowPtr(box, QWP_USER);
4983 } 4988 }
7612 * pad: Number of pixels of padding around the item. 7617 * pad: Number of pixels of padding around the item.
7613 */ 7618 */
7614 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) 7619 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
7615 { 7620 {
7616 Box *thisbox; 7621 Box *thisbox;
7622
7623 if ( width == 0 && hsize == FALSE )
7624 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);
7625 if ( height == 0 && vsize == FALSE )
7626 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);
7617 7627
7618 if(WinWindowFromID(box, FID_CLIENT)) 7628 if(WinWindowFromID(box, FID_CLIENT))
7619 { 7629 {
7620 box = WinWindowFromID(box, FID_CLIENT); 7630 box = WinWindowFromID(box, FID_CLIENT);
7621 thisbox = WinQueryWindowPtr(box, QWP_USER); 7631 thisbox = WinQueryWindowPtr(box, QWP_USER);