summaryrefslogtreecommitdiff
path: root/wintable/new/draw.h
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-12-11 16:43:05 -0500
committerPietro Gagliardi <[email protected]>2014-12-11 16:43:56 -0500
commit8ea320220a8aad4f7c8208275f407ec985e4a6db (patch)
tree6eb9b98318b875fc8734ce5f1d2e34317b52556b /wintable/new/draw.h
parent9edf273ba79d55becaad7c6a922fbd17aec2c406 (diff)
Mostly finisshed up horizontal scrolling by hooking it up to everything else. The sample text draw doesn't seem to be working correctly, but I'm not sure /when/ it breaks right now...
Diffstat (limited to 'wintable/new/draw.h')
-rw-r--r--wintable/new/draw.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/wintable/new/draw.h b/wintable/new/draw.h
index 4f30036..e64b613 100644
--- a/wintable/new/draw.h
+++ b/wintable/new/draw.h
@@ -37,6 +37,8 @@ static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
for (i = 0; i < t->nColumns; i++) {
SendMessage(t->header, HDM_GETITEMRECT, (WPARAM) i, (LPARAM) (&r));
+ r.left -= t->hscrollpos;
+ r.right -= t->hscrollpos;
r.top = client.top;
r.bottom = client.bottom;
FillRect(dc, &r, GetSysColorBrush(x));
@@ -47,7 +49,7 @@ static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
ZeroMemory(&p, sizeof (struct drawCellParams));
p.row = 0;
p.column = 0;
- p.x = r.left;
+ p.x = r.left - t->hscrollpos;
p.y = 100;
p.width = r.right - r.left;
p.height = rowHeight(t, dc, FALSE);