summaryrefslogtreecommitdiff
path: root/wintable/new/draw.h
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-12-14 16:23:32 -0500
committerPietro Gagliardi <[email protected]>2014-12-14 16:23:32 -0500
commit33f7ac1142c6670a3045f9dba02a5fb32738b8fa (patch)
treefc9a1a475e3323132ca0152e840263015eb4de2d /wintable/new/draw.h
parentf56ae488f0c9cf073f9b7ba2b4bde616ea702e59 (diff)
Unified all column width accesses to a columnWidth() function.
Diffstat (limited to 'wintable/new/draw.h')
-rw-r--r--wintable/new/draw.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/wintable/new/draw.h b/wintable/new/draw.h
index f2f40ea..626f23f 100644
--- a/wintable/new/draw.h
+++ b/wintable/new/draw.h
@@ -57,7 +57,6 @@ static void drawCell(struct table *t, HDC dc, struct drawCellParams *p)
static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
{
intptr_t i, j;
- RECT r;
int x = 0;
HFONT prevfont, newfont;
struct drawCellParams p;
@@ -76,9 +75,7 @@ static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
p.x = client.left - t->hscrollpos;
for (j = 0; j < t->nColumns; j++) {
p.column = j;
- // TODO error check
- SendMessage(t->header, HDM_GETITEMRECT, (WPARAM) j, (LPARAM) (&r));
- p.width = r.right - r.left;
+ p.width = columnWidth(t, p.column);
drawCell(t, dc, &p);
p.x += p.width;
}