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);
Event Date: September 23, 2015
The cloud is not just about a runtime platform for your projects – now, you can do your development in the cloud, too. Check out this webcast to learn how the cloud improves your development experience and team collaboration. Join Dana Singleterry, Principal Product Manager for Oracle Dev Tools, as he discusses how to simplify every aspect of the development lifecycle, including requirements gathering, version management, code reviews, build automation, and …
Lenovo recommends Windows 8 Pro.
"I dropped my laptop getting out of the taxi." This probably sounds familiar to most IT professionals.
If your employees are traveling, you know their devices are in for a rough go. Whether it's a trip to the conference room or a convention out of town, any time equipment leaves a user's desk it is at risk of being put into harm's way.
Stay connected at all times, whether at the office or on the go, with agile, durable, and flexible devices like the Lenovo® …