From 7713c913875ebea0af7cfd21840981a94dab654d Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 20 Dec 2014 20:12:08 -0500 Subject: Started writing the checkbox drawing code. Just a red box again for now. --- wintable/new/draw.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wintable/new/draw.h b/wintable/new/draw.h index 3d20383..0659f54 100644 --- a/wintable/new/draw.h +++ b/wintable/new/draw.h @@ -55,6 +55,13 @@ static void drawCell(struct table *t, HDC dc, struct drawCellParams *p) n = wsprintf(msg, L"(%d,%d)", p->row, p->column); if (DrawTextExW(dc, msg, n, &r, DT_END_ELLIPSIS | DT_LEFT | DT_NOPREFIX | DT_SINGLELINE, NULL) == 0) panic("error drawing Table cell text"); + break; + case tableColumnCheckbox: + r.right = r.left + t->checkboxWidth; + r.bottom = r.top + t->checkboxHeight; + SetDCBrushColor(dc, RGB(255, 0, 0)); + FillRect(dc, &r, GetStockObject(DC_BRUSH)); + break; } } -- cgit v1.2.3