|
-
June 16th, 2008, 02:07 AM
#6
Re: FillSolidRect & DrawText
 Originally Posted by Quell
Hey.
I recently ran into a problem trying to do some custom drawing in a view. (CScrollView derived). I use FillSolidRect to fill a rectangle, and then DrawText to render some text in OnDraw. The problem is that all of the text is set on the background that i set using FillSolidRect as opposed only to the bit that i defined as.
Any ideas why?
Thx in advance.
Yes, that is the normal behaviour.
After using FillSolidRect you have to call CDC::SetBkColor to (re-)set the background color for text outputting funtions. Another solution is to set the bk mode to TRANSPARENT (CDC:SetBkMode(TRANSPARENT) ) since you filled the background alredy ...
Hope this was useful.
With regards
Programartist
Ingo Bochmann
Last edited by ProgramArtist; June 16th, 2008 at 02:08 AM.
Reason: Edit: Someone has been faster ...
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
|