views:

42

answers:

1

I'm trying to achieve an effect where there's a visible logo inside an edit control and the logo becomes hidden when the user places the focus on the edit control.

What's the best way to approach this? Would it be better to place an image control on top of the edit control or paint the background of the edit control transparent and position the image control behind the edit control? Or possibly some other method?

+1  A: 

The EDIT control has very broken paint behavior, you'll never get there by overriding the WM_PAINT message handler or using transparency. Yes, overlay it with a STATIC control that you hide when you see text being entered.

Hans Passant
This somewhat works. When placing the static control over the edit control, the static control disappears when you hover over it. The edit control which is underneath it appears to be causing the problem.
simplecoder