summaryrefslogtreecommitdiff
path: root/wintable/main.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-20 22:04:24 -0400
committerPietro Gagliardi <[email protected]>2014-10-20 22:04:24 -0400
commit0437ecd40355fa2ac918a151b8d7af7a3fad6ed8 (patch)
tree80e957c0cd846be9a2ca8d3e0778959dd169f914 /wintable/main.c
parentc4a2bdc2a6f3b0adc3aea3700d88b1bbae7699ca (diff)
Undid all the scrolling muckery. Going to need to figure this out for real...
Diffstat (limited to 'wintable/main.c')
-rw-r--r--wintable/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/wintable/main.c b/wintable/main.c
index 5648e9c..d3aa0c9 100644
--- a/wintable/main.c
+++ b/wintable/main.c
@@ -152,7 +152,7 @@ static void vscrollto(struct table *t, intptr_t newpos)
// negative because ScrollWindowEx() is "backwards"
if (ScrollWindowEx(t->hwnd, 0, (-(newpos - t->firstVisible)) * rowHeight(t),
- &scrollArea, &scrollArea, NULL, NULL,
+ NULL, NULL, NULL, NULL,
SW_ERASE | SW_INVALIDATE) == ERROR)
abort();
t->firstVisible = newpos;
@@ -290,12 +290,10 @@ static void drawItems(struct table *t, HDC dc, RECT cliprect)
abort();
if (GetWindowOrgEx(dc, &prevOrigin) == 0)
abort();
- // notice this calculation: we discount t->headerHeight so that (0,0) shows up at (0, t->headerHeight)
- if (SetWindowOrgEx(dc, prevOrigin.x, prevOrigin.y + (t->firstVisible * tm.tmHeight - t->headerHeight), NULL) == 0)
+ if (SetWindowOrgEx(dc, prevOrigin.x, prevOrigin.y + (t->firstVisible * tm.tmHeight), NULL) == 0)
abort();
// see http://blogs.msdn.com/b/oldnewthing/archive/2003/07/29/54591.aspx and http://blogs.msdn.com/b/oldnewthing/archive/2003/07/30/54600.aspx
- // this is also why we kept cliprect unaware of t->headerHeight above
first = cliprect.top / tm.tmHeight;
if (first < 0)
first = 0;