15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Transparent CRichEditCtrl

Amedeo Farello -- farello@mbox.vol.it
Friday, May 03, 1996

     VC++ 4.0
     Win95

I am building the user interface for a multimedia application. I absolutely
need to draw text transparently over a bitmap in the background. Since I
also need to format and edit the text, I thought the best choice was to use
a CRichEditCtrl object. Unfortunately, it erases the background when it
draws itself.

I have tried deriving a new class and intercepting the WM_ERASEBKGND
message, but this doesn't work, even if I return TRUE from
OnEraseBackground(), or select a NULL_BRUSH, or use SetBkMode(TRANSPARENT).

Can someone help me, please?
Thanks in advance


Amedeo Farello







David W. Gillett -- DGILLETT@expertedge.com
Monday, May 13, 1996

>      VC++ 4.0
>      Win95

  Thanks. 

> I am building the user interface for a multimedia application. I
> absolutely need to draw text transparently over a bitmap in the
> background. Since I also need to format and edit the text, I
> thought the best choice was to use a CRichEditCtrl object.
> Unfortunately, it erases the background when it draws itself.

  In our 16-bit app, we found it acceptable to pop up an edit box 
over the text (with a solid background) when the users chose to 
edit the text, and to hide the edit control and redraw the text with 
transparent background when the edit control lost the focus.  We 
decided that the difference between this and editting with a 
transparent background was not worth anything like the effort that 
the latter would have entailed.

Dave


 




| Вернуться в корень Архива |