diff options
| author | Pietro Gagliardi <[email protected]> | 2014-12-12 15:20:34 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-12-12 15:20:34 -0500 |
| commit | 2da55f35a61285d4476208b583ae310042c63b04 (patch) | |
| tree | c5163275ff9ce765360e61cb0e152e28b99652f6 /wintable/new/resize.h | |
| parent | 2013a3a753c6f6ffd1d33cd3862a41f17763ada4 (diff) | |
Added vertical scroll. The drawing code will now need updating...
Diffstat (limited to 'wintable/new/resize.h')
| -rw-r--r-- | wintable/new/resize.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/wintable/new/resize.h b/wintable/new/resize.h index 365146c..00087de 100644 --- a/wintable/new/resize.h +++ b/wintable/new/resize.h @@ -7,15 +7,33 @@ HANDLER(resizeHandler) { WINDOWPOS *wp; + RECT client; + intptr_t height; if (uMsg != WM_WINDOWPOSCHANGED) return FALSE; wp = (WINDOWPOS *) lParam; if ((wp->flags & SWP_NOSIZE) != 0) return FALSE; + + // TODO does wp store the window rect or the client rect? + if (GetClientRect(t->hwnd, &client) == 0) + panic("error getting Table client rect in resizeHandler()"); + // TODO do this before calling updateTableWidth() (which calls repositionHeader()?)? + client.top -= t->headerHeight; + + // update the width... // this will call repositionHeader(); there's a good reason... (see comments) // TODO when I clean that mess up, remove this comment updateTableWidth(t); + + // ...and the height + // TODO find out if order matters + height = client.bottom - client.top; + t->vpagesize = height / rowht(t); + // do a dummy scroll to reflect those changes + vscrollby(t, 0); + *lResult = 0; return TRUE; } |
