Ram072297
asked on
CStatic background color
I have a CStatic derived member in my Dialog. I want to change the background color when my mouse enters the client area of the CStatic and should be restored to the original color when the mouse leaves the static member.
Use function OnMouseMove() to find out when mouse is over your static control then change background color by setting new brush in OnCtlColor ( handler of WM_CTLCOLOR ). Do the same way when mouse leave control then reset brush in OnCtlColor to default
ASKER
The OnCtlColor handler is called at the time of the creation of the dialog so the color of the static is getting changed earlier and also the color of all the static members is getting changed. I want the color change for only the static which is under the mouse.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.