I want to make Multiline Edit Control, with a transparent background.
( Only Text And scrollbar should be visible ), how can i do this? :confused:
Printable View
I want to make Multiline Edit Control, with a transparent background.
( Only Text And scrollbar should be visible ), how can i do this? :confused:
If i could change the background of my edit control, i could sucssed.
So that is a good solution too. How todo that?
I mean to change the background to a HBITMAP.
I remember this tutorial on windows skinning address topics in transperancy.. although I am not sure if the same methods would apply to a multiline edit box...
tried googling for an owner-draw edit box.. no love
>>make Multiline Edit Control<<
Create the control with the ES_MULTILINE style.
>>change the background to a HBITMAP<<
Use CreatePatternBrush (very limited capability on win95, okay for later versions of windows) to convert the bitmap into a brush and return its handle from WM_CTLCOLOREDIT handler of the parent window (or WM_CTLCOLORSTATIC if the edit control is read only).
Edit controls.
Thanks. It seems that i have to do the same thing for RichEdit. Sorry.
And my RichEdit has a VSROLLbar.
Since RichEdit doesn't have a WM_CTLCOLORXXX, i don't know what to do...
There is a function to set a color of a Rich Edit Box (COLORREF), but there is nothing which includes HBRUSH...
with richedits you can send the EM_SETBKGNDCOLOR message, with
set the wparam to 0 and set the lparam to a 0x00bbggrr value, or also works setting it to a (COLORRREF)RGB(r,g,b) return.Code:wParam = (WPARAM) (BOOL) fUseSysColor;
lParam = (LPARAM) (COLORREF) clr;
Niara
You have no idea what your talking about.Quote:
Originally Posted by Niara
I want to talk to Ken Fitlike.
There isn't even OWNERDRAWN style. There must be solution to this. I tryed to use Edit Control,
( its Read Only )
but when i scroll down a little bit. The background image freaks out...
One possibility might be to subclass the richedit control, and BitBlt your bitmap during handling of WM_ERASEBKGND for that control. Another, possibility is to superclass the richedit control and change the HBRUSH of the WNDCLASSEX to that returned by CreatePatternBrush.
Not sure if either of these will work, though.
For more information about window sublassing, search this board and read this.
For superclassing, see the bottom of this msdn page (also contains more information on subclassing).
>>You have no idea what your talking about.<<
(s)he's factually correct and, while it's not exactly what you're looking for, you'll get more and varied help if you exhibit more grace and less impatience towards those generous enough to offer free advice.
I know, i know. Just that (s)he started to explain what i allready wrote.Quote:
Originally Posted by Ken Fitlike
no problem
void rename (open char* ">>(s)he's factually<<", concrete char* ">>he's...<<") :)
Niara
I'm close to solution with subclassing. Iv'e tryed both paths, and subclassing seems to work.
I did what you told me, and background is drawn. But the problem is that when i assign new
WndProc, the old one isn't used. And the old one contained just about everything about
the RichEdit.
So the result is a RichEdit with only things i did in new WndProc. So things that where in
previus WndProc ( like TEXT, SCROLLBAR, ...) aren't there, obviusly.
Can i somehow copy stuff from old WndProc to my New one?