06-16-2018, 03:49 PM
I realized what I really needed to do was also change the background color of the combobox regardless of whether there was any items i.e.
For a listbox this is easy (after searching the forum!):
but it seems like there is no way to do this for ComboBox. Is it possible?
Also, is there a version of DT_SetBackgroundColor that works on child object (edit, richedit, listbox, button, etc) rather than just dialog/window as a whole?
Thanks,
S
For a listbox this is easy (after searching the forum!):
int textcolor=0xff
int backcolor=0x00ff00
int-- hbrush
sel message
,case WM_INITDIALOG
,hbrush=CreateSolidBrush(backcolor)
,
,case WM_DESTROY
,DeleteObject hbrush
,
,case WM_COMMAND goto messages2
,
,case WM_CTLCOLORLISTBOX
,,if(lParam=id(4 hDlg))
,,,SetTextColor wParam textcolor ;;text
,,,SetBkMode wParam TRANSPARENT
,,,ret hbrush ;;backgroundAlso, is there a version of DT_SetBackgroundColor that works on child object (edit, richedit, listbox, button, etc) rather than just dialog/window as a whole?
Thanks,
S
