![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2005
Posts: 1
Rep Power: 0
![]() |
Printing rich text with colored background
Hello,
I am displaying the contents of a rich text control on the printer using the EM_FORMATRANGE message. I would like for the text to be drawn over a colored background. However, it appears that during the processing of the EM_FORMATRANGE message a white rectangle gets drawn behind the text, spanning the width of the bounding rectangle and extending down to the last line of text. I have tried setting the background color of the graphics device context using SetBkColor, tried setting the background brush of the rich text control's client area using SetWindowLong, and tried changing the character format of the control using the EM_SETCHARFORMAT message. While changing the character format does draw the correct background color behind the printed text, the white rectangles still appear. Maybe I'm doing something wrong, but I'm about to give up on the EM_FORMATRANGE message and draw the text myself. Does anybody know of the correct way to draw rich text over an arbitrary color? BTW: If I draw to a bitmap, everything works fine. Thanks in advance, Jarrod |
|
|
|
|
|
#2 |
|
Expert Programmer
|
Hrml, can not tell you what is wrong with what you have described, my suggestion would be just to draw the text yourself, probably a quicker fix than trying to figure out why you are getting that white backgournd.
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|