Mercurial > dwindows
changeset 129:e47c52b37cdd
Code cleanup and OS/2 and Windows.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 20 Oct 2002 06:36:18 +0000 |
parents | ac616f625443 |
children | 54014258099a |
files | os2/dw.c win/dw.c |
diffstat | 2 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Sun Oct 20 06:28:28 2002 +0000 +++ b/os2/dw.c Sun Oct 20 06:36:18 2002 +0000 @@ -835,7 +835,7 @@ _do_resize(pagebox, rc.xRight - rc.xLeft, rc.yTop - rc.yBottom); } - page = (ULONG)WinSendMsg(hwnd, BKM_QUERYPAGEID, page, MPFROM2SHORT(BKA_NEXT, BKA_MAJOR)); + page = (ULONG)WinSendMsg(hwnd, BKM_QUERYPAGEID, (MPARAM)page, MPFROM2SHORT(BKA_NEXT, BKA_MAJOR)); } } @@ -1446,7 +1446,7 @@ case WM_CHAR: /* A Similar problem to the MLE, if ESC just return */ if(SHORT1FROMMP(mp2) == 283) - return TRUE; + return (MRESULT)TRUE; break; } @@ -1509,7 +1509,7 @@ * window hangs for reasons unknown. (in an MLE) */ else if(SHORT1FROMMP(mp2) == 283) - return TRUE; + return (MRESULT)TRUE; break; case WM_SIZE: @@ -2287,7 +2287,7 @@ { if(type == BOXHORZ) { - int newx = x - SPLITBAR_WIDTH, newy = y; + int newx = x - SPLITBAR_WIDTH; float ratio = (float)percent/(float)100.0; HWND handle = (HWND)dw_window_get_data(hwnd, "_dw_topleft"); Box *tmp = WinQueryWindowPtr(handle, QWP_USER); @@ -2309,7 +2309,7 @@ } else { - int newx = x, newy = y - SPLITBAR_WIDTH; + int newy = y - SPLITBAR_WIDTH; float ratio = (float)percent/(float)100.0; HWND handle = (HWND)dw_window_get_data(hwnd, "_dw_topleft"); Box *tmp = WinQueryWindowPtr(handle, QWP_USER); @@ -2729,7 +2729,6 @@ switch(msg) { -#if 0 /* Why doesn't this work? */ case WM_PAINT: { HPS hps; @@ -2737,7 +2736,7 @@ POINTL ptl[2]; if(oldproc) - return oldproc(hwnd, msg, mp1, mp2); + oldproc(hwnd, msg, mp1, mp2); hps = WinBeginPaint(hwnd, 0, 0); WinQueryWindowRect(hwnd, &rcl); @@ -2752,7 +2751,6 @@ WinEndPaint(hps); } return MRFROMSHORT(FALSE); -#endif case WM_SETFOCUS: _run_event(hwnd, msg, mp1, mp2); break; @@ -6622,10 +6620,9 @@ */ void dw_splitbar_set(HWND handle, float percent) { - /* We probably need to force a redraw here */ float *mypercent = (float *)dw_window_get_data(handle, "_dw_percent"); int type = (int)dw_window_get_data(handle, "_dw_type"); - int width, height; + unsigned long width, height; if(mypercent) *mypercent = percent;
--- a/win/dw.c Sun Oct 20 06:28:28 2002 +0000 +++ b/win/dw.c Sun Oct 20 06:36:18 2002 +0000 @@ -6612,11 +6612,16 @@ */ void dw_splitbar_set(HWND handle, float percent) { - /* We probably need to force a redraw here */ float *mypercent = (float *)dw_window_get_data(handle, "_dw_percent"); + int type = (int)dw_window_get_data(handle, "_dw_type"); + unsigned long width, height; if(mypercent) *mypercent = percent; + + dw_window_get_pos_size(handle, NULL, NULL, &width, &height); + + _handle_splitbar_resize(handle, percent, type, width, height); } /*