summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-12-12 16:37:48 -0500
committerPietro Gagliardi <[email protected]>2014-12-12 16:37:48 -0500
commit7f7ea0044eff2933627e16d657635a8c1fcdce3e (patch)
tree1b3e08a6cd7116ffb9cc8b6ce8a148f9362cd555
parent2da55f35a61285d4476208b583ae310042c63b04 (diff)
Added vscroll to the drawing code. Now to figure out why it stops early...
-rw-r--r--wintable/new/draw.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/wintable/new/draw.h b/wintable/new/draw.h
index 2624b6c..dce90a7 100644
--- a/wintable/new/draw.h
+++ b/wintable/new/draw.h
@@ -27,11 +27,11 @@ static void drawCell(struct table *t, HDC dc, struct drawCellParams *p)
// TODO then vertical center content
n = wsprintf(msg, L"(%d,%d)", p->row, p->column);
- FillRect(dc, &r, (HBRUSH) (current + 1));
+/* FillRect(dc, &r, (HBRUSH) (current + 1));
current++;
if (current >= 31)
current = 0;
-
+*/
r.left += p->xoff;
if (DrawTextExW(dc, msg, n, &r, DT_END_ELLIPSIS | DT_LEFT | DT_NOPREFIX | DT_SINGLELINE, NULL) == 0)
panic("error drawing Table cell text");
@@ -56,7 +56,7 @@ current = 0;
p.xoff = SendMessageW(t->header, HDM_GETBITMAPMARGIN, 0, 0);
p.y = client.top;
- for (i = 0; i < t->count; i++) {
+ for (i = t->vscrollpos; i < t->count; i++) {
p.row = i;
p.x = client.left - t->hscrollpos;
for (j = 0; j < t->nColumns; j++) {