Filled in the draw() function for testing header resizes (when that is implemented).

This commit is contained in:
Pietro Gagliardi 2014-12-08 10:40:51 -05:00
parent 2f95837155
commit 7cfda3ad61
1 changed files with 12 additions and 1 deletions

View File

@ -2,7 +2,18 @@
static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
{
Rectangle(dc, 20, 20, 200, 200);
LRESULT i, n;
RECT r;
int x = 0;
n = SendMessageW(t->header, HDM_GETITEMCOUNT, 0, 0);
for (i = 0; i < n; i++) {
SendMessage(t->header, HDM_GETITEMRECT, (WPARAM) i, (LPARAM) (&r));
r.top = client.top;
r.bottom = client.bottom;
FillRect(dc, &r, GetSysColorBrush(x));
x++;
}
}
// TODO handle WM_PRINTCLIENT flags?