I want to make Multiline Edit Control, with a transparent background.
( Only Text And scrollbar should be visible ), how can i do this?
I want to make Multiline Edit Control, with a transparent background.
( Only Text And scrollbar should be visible ), how can i do this?
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
If i could change the background of my edit control, i could sucssed.
So that is a good solution too. How todo that?
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
I mean to change the background to a HBITMAP.
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
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
Last edited by The Brain; 12-14-2005 at 05:40 PM.
- "Problem Solving C++, The Object of Programming" -Walter Savitch
- "Data Structures and Other Objects using C++" -Walter Savitch
- "Assembly Language for Intel-Based Computers" -Kip Irvine
- "Programming Windows, 5th edition" -Charles Petzold
- "Visual C++ MFC Programming by Example" -John E. Swanke
- "Network Programming Windows" -Jones/Ohlund
- "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
- "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel
>>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.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Thanks. It seems that i have to do the same thing for RichEdit. Sorry.
And my RichEdit has a VSROLLbar.
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
Since RichEdit doesn't have a WM_CTLCOLORXXX, i don't know what to do...
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
There is a function to set a color of a Rich Edit Box (COLORREF), but there is nothing which includes HBRUSH...
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
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.Originally Posted by Niara
I want to talk to Ken Fitlike.
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
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...
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
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.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
I know, i know. Just that (s)he started to explain what i allready wrote.Originally Posted by Ken Fitlike
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
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?
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu