From: John H. on 7 May 2010 10:42 Woody wrote: > What I am trying to do is show the user that the combo is not > available. In fact, there is no text in the list, and never will be as > long as the combo isn't available. This might get you in the right direction: class CMyCombo : public CComboBox { public: CMyCombo(); CBrush m_brush; afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); DECLARE_MESSAGE_MAP() }; CMyCombo::CMyCombo() { m_brush.CreateSolidBrush(RGB(200,200,200)); } BEGIN_MESSAGE_MAP(CMyCombo, CComboBox) ON_WM_CTLCOLOR() END_MESSAGE_MAP() HBRUSH CMyCombo::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { CComboBox::OnCtlColor(pDC, pWnd, nCtlColor); return m_brush; }
First
|
Prev
|
Pages: 1 2 Prev: General Question ... Class & Members Next: MFC (VS2008SP1) app deploying |