Simply follow these steps in order to change the color of the Edit control or Combobox control in ATL.
Add a handler for WM_CTLCOLOREDIT
Implementation of the handler, return the brush that u want to use to color the control
LRESULT OnCtlColorEdit(UINT uMsg,
HDC hdcEdit = (HDC) wParam; // handle to display context
HWND hwndEdit = (HWND) lParam; // handle to static control
if (( hwndEdit == GetDlgItem(IDC_EDIT)
|| ( hwndEdit == GetDlgItem(IDC_COMBO))
// m_hBrush is an instance variable that stores the
// current Color brush. If this is the first time through
// we need to create it. The brush is deleted in the destructor
if ( m_hBrush == NULL )
m_hBrush = CreateSolidBrush( RGB(255,0,0)
// Get the DC provided and set the appropriate attributes
SetBkMode(hdcEdit, TRANSPARENT );
// Return a handle to the brush
HBRUSH far* hbr = (HBRUSH far*) m_hBrush;
return ((DWORD) hbr);
Complex hybrid environments can make it difficult to track interdependencies, increasing the risk of disrupting critical business services. In this white paper by EMA, you'll learn how application discovery and dependency mapping can help you:
Meet granular targets for availability, cost, and time-to-revenue for cloud services.
Accelerate mean time to repair (MTTR) while communicating better with stakeholders.
Manage even the most complex hybrid environments more efficiently and effectively
Understand the …
Anthony Christie, the Chief Marketing Officer for Level Communications, is responsible for customer experience, worldwide marketing and product management. In this informative asset, he shares his insights into why a private network connection to cloud-bases applications is the right decision for your enterprise. Download now to find out more.