I want to use some owner-drawn edit-box in my program (i want to have the edit box with rounded edges).
As it doesn't seem possible to do this in the same way you'll do it with a button, I did something like this:
RECT rectch, rectp;
hdc = GetDC(hDlg);
color = CreateSolidBrush(RGB(217, 226, 186));
pen = CreatePen(PS_SOLID, 1, RGB(131, 140, 100));
RoundRect(hdc, rectch.left - rectp.left - 3, rectch.top - rectp.top - 3,
rectch.right - rectp.left + 3, rectch.bottom - rectp.top + 3, 5, 5);
return (LRESULT)(CreateSolidBrush(RGB(217, 226, 186)));
This works well, and I have my owner drawn edit box!
Yet, there is a problem: I have a dialog with some of this edit box, and when I switch between them with TAB, the content of the edit box that gains focus disappears, but if I write in it or press an arrow or click with the mouse it *magically* reappear! Where's the problem???
How can I solve it???
[italic]How beautiful, if sorrow had not made Sorrow more beautiful than Beauty itself.[/italic]