Take a look at the top-right of the Stack Overflow site. The search box has some text in it saying "search". When you click within it, the text disappears.
I want to do something similar to this - if a win32 edit control is empty (i.e. has no text), I want to paint some text inside it, in a more subdued color than the normal text. If the control has the focus, or if there's text inside it, I don't want to paint that.
Is there any way I can do it without setting the actual text into the control and changing the text color? Maybe by intercepting the control paint or something?
Thanks.