I've created a check box on a window using the following call to CreateWindowEx()..
(note: h_check is a window handle(HWND), h_mainwindow is a handle to the parent window which has been created, CBID_CW is a constant and is used as an id number, app_instance is the hInstance passed to WinMain())
h_check = CreateWindowEx(NULL, "BUTTON", "Blah", WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_TEXT, 0, 0, 100, 17, h_mainwindow, (HMENU)(CBID_CW), app_instance, NULL);
My problem lies here.. The main window background is white but the check box has a grey background behind the text. I want to change the colour of the grey area behind the check boxes text to white so it matches the rest of the window.
Can anyone give me an example of how to do this without drawing the check box myself?
If i have to draw the checkbox myself that doesn't matter but it would be easier if i could just get windows to draw it a different colour.
0 · ·