HerbDX Posted September 12, 2004 Share Posted September 12, 2004 Does anyone know how I can set the background colour of my ComboboxEx? WM_CTLCOLORLISTBOX appears not to work/be ignored by it, so I don't know what to do.. Link to comment Share on other sites More sharing options...
0 Andareed Posted September 12, 2004 Share Posted September 12, 2004 Are you sending WM_CTLCOLORLISTBOX to the ComboBoxEx control or the "standard" child ComboBox? Call CBEM_GETCOMBOCONTROL first to find the child ComboBox Link to comment Share on other sites More sharing options...
0 HerbDX Posted September 12, 2004 Author Share Posted September 12, 2004 First I: rdPtr->hBrush = CreateSolidBrush(rdPtr->crefEditFontBkColor); SendMessage( ryPtr->ryHmainWin, WM_CTLCOLORLISTBOX, (WPARAM)GetDC(rdPtr->hWndCBX), (LPARAM)rdPtr->hWndCBX ); Then in WindowProc: case WM_CTLCOLORLISTBOX: // It's for me ??? if ((rdPtr = GetRdPtr((HWND)LOWORD(lParam), rhPtr))!=NULL && rdPtr->rHo.hoIdentifier==IDENTIFIER) { MessageBox(hWnd, NULL, NULL, NULL); SetTextColor((HDC)wParam, rdPtr->crefEditFontColor); SetBkMode((HDC)wParam, OPAQUE); SetBkColor((HDC)wParam, rdPtr->crefEditFontBkColor); rhPtr->rh4.rh4KpxReturn = (long)rdPtr->hBrush; return REFLAG_MSGRETURNVALUE; } break; The messagebox comes up but then nothing. Thanks Link to comment Share on other sites More sharing options...
Question
HerbDX
Does anyone know how I can set the background colour of my ComboboxEx?
WM_CTLCOLORLISTBOX appears not to work/be ignored by it, so I don't know what to do..
Link to comment
Share on other sites
2 answers to this question
Recommended Posts