|
-
May 5th, 1999, 05:58 AM
#1
Colored Rectangles
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]
-
May 10th, 1999, 10:55 AM
#2
Re: Colored Rectangles
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|