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);
How do you find a needle in a haystack when you don't even know what the needle looks like?
That's the problem today's enterprises face in trying to spot advanced targeted cyber attacks. These attacks don't match known attack signatures, because hackers have custom created them to infiltrate your network and steal your data.
Big Data Security Analytics uses Big Data techniques to sift through mountains of data to identify the suspicious things you should focus on.
In this program, Gartner Distinguished …
Learn Why Enterprise PaaS is Driving IT Efficiency & Innovation
In this GigaOm Pro Report you will learn how Enterprise PaaS delivers a more effective and efficient way to design, build, test, and deploy business applications.
Using case studies from industry leaders like JPMorgan Chase, AmerisourceBergen, and Diebold, we'll help you understand:
Core drivers for Enterprise PaaS
Emerging patterns in the industry
How you should consider PaaS within your enterprise IT strategy