Hi,
I want to have a rectangle object within a CFormView that allows me to change its color at runtime. Which control should I use and how can I have it change its color?
Who can help?
Jens
[email protected]
Printable View
Hi,
I want to have a rectangle object within a CFormView that allows me to change its color at runtime. Which control should I use and how can I have it change its color?
Who can help?
Jens
[email protected]
I would create an invisible frame and then do:
(not proper coding but just to give you the idea)
1. Create a brush of the color you would like.
2. Do a GetDlgItem(IDC_FRAMENAME)->GetWindowRect(CRect variable); on that frame in the OnPaint() function.
3. Do a ScreenToClient on that rect
4. Do Rectangle(CRectVar.left,CRectVar.top,CRectVar.right,CRectVar.bottom)