summaryrefslogtreecommitdiff
path: root/wintable/imagelist_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-11-18 13:52:54 -0500
committerPietro Gagliardi <[email protected]>2014-11-18 13:53:53 -0500
commitcb2642765a4058c4cfabf844bda50dbf60d1264e (patch)
tree4e255f8a3598752223f7c832ebc98b62df1219d0 /wintable/imagelist_windows.c
parent8175bd411ace416bab17725ef800ec1c6859930c (diff)
Started the work to handle checkboxes. For now, we draw just a red rectangle; when we do events this will change color dynamically. When I hook up the control to its parent, I will move from these rectangles to the actual checkbox images. In the meantime, fix some pointer bugs in imagelist_windows.c as well.
Diffstat (limited to 'wintable/imagelist_windows.c')
-rw-r--r--wintable/imagelist_windows.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wintable/imagelist_windows.c b/wintable/imagelist_windows.c
index 2527d16..e194f49 100644
--- a/wintable/imagelist_windows.c
+++ b/wintable/imagelist_windows.c
@@ -157,14 +157,14 @@ static HIMAGELIST newCheckboxImageList(HWND hwnddc, void (*sizefunc)(HDC, int *,
dc = GetDC(hwnddc);
if (dc == NULL)
xpanic("error getting DC for making the checkbox image list", GetLastError());
- (*sizefunc)(dc, &width, &height, theme);
- il = ImageList_Create(width, height, ILC_COLOR32, 20, 20); // should be reasonable
+ (*sizefunc)(dc, width, height, theme);
+ il = ImageList_Create(*width, *height, ILC_COLOR32, 20, 20); // should be reasonable
if (il == NULL)
xpanic("error creating checkbox image list", GetLastError());
for (cbState = 0; cbState < checkboxnStates; cbState++) {
HBITMAP bitmap;
- bitmap = makeCheckboxImageListEntry(dc, width, height, cbState, drawfunc, theme);
+ bitmap = makeCheckboxImageListEntry(dc, *width, *height, cbState, drawfunc, theme);
if (ImageList_Add(il, bitmap, NULL) == -1)
xpanic("error adding checkbox image to image list", GetLastError());
if (DeleteObject(bitmap) == 0)