Non-Subspace Related Coding - Need some Win32 help Mr Ekted - Thu Feb 09, 2006 6:01 pm Post subject: Need some Win32 help
I'm looking for some help from any serious win32 developers (if there are any here). The problem deals with using a subclassed edit control, WM_CTLCOLOREDIT, and SetBkMode(dc, TRANSPARENT). If you have no idea what I am talking about, then you can't help me.
D1st0rt - Thu Feb 09, 2006 9:18 pm Post subject: http://support.microsoft.com/?scid=kb;en-us;174667
?
Mr Ekted - Thu Feb 09, 2006 10:13 pm Post subject:
Sorry, no. I"m all googled out on this issue.
SpecShip - Fri Feb 10, 2006 2:39 am Post subject:
Wish I could help, sincerely, but I'm as clueless as learjett on this one.
Did you try the win32assembly community forums?
Cyan~Fire - Fri Feb 10, 2006 10:45 am Post subject:
Well, that made sense to me, but I usually come to you for help, so I don't think I'm of any use here.
But you could go ahead and say what's up.
Cerium - Fri Feb 10, 2006 11:33 am Post subject:
What exactly is the problem?
Mr Ekted - Fri Feb 10, 2006 11:41 am Post subject:
I am trying to create an EDIT control that has a "transparent" background. That is, the window behind it--its parent--has a complex image. I want the text of the edit control to show over this image.
In WM_CTRCOLOREDIT, I set TRANSPARENT, and return NULL_BRUSH.
In WM_ERASEBKGND (subclassed), I blit that portion of the image seen through the control.
The edit control still draws black text on solid white. If I SetBkColor(dc, PURPLE), I see a purple background. So I know it's simply using the current text background color. But it shouldn't be because I have set TRANSPARENT mode.
All the examples I can find online do pretty much exactly this, but no one is doing exactly what I want.
I have since designed my own custom edit control that behaves exactly as I need, except for selection.
Cerium - Fri Feb 10, 2006 6:18 pm Post subject:
Its been a while since Ive had to deal with windows API, but have you tried using SetBkMode(hdc, TRANSPARENT) instead of (or with) SetBkColor?
Mr Ekted - Fri Feb 10, 2006 6:32 pm Post subject:
Mr Ekted wrote:
In WM_CTRCOLOREDIT, I set TRANSPARENT...
Cerium - Sat Feb 11, 2006 1:17 am Post subject:
Ahh.. I didnt assume thats what you were doing.
In any event, it looks like youre doing everything right, I dont see why it wouldnt work at that point. Sorry.