Transparent, Editbox, HOLLOW_BRUSH, Marking text?
Hi
I have a little problem when I am using "HOLLOW_BRUSH" as a background (?)
I create a editbox and sets the readonly-flag, but the background goes grey and I want it white.
To prevent that I use this in WM_CTLCOLORSTATIC:
Code:
case IDC_INFOBOX: {
HDC hdc = (HDC)wParam;
SetBkColor(hdc, 0xFFFFFF);
SetTextColor(hdc, 0);
return (LRESULT)GetStockObject(WHITE_BRUSH);
}
Its working fine, but now I want to make the editbox background transparent, to do that I use this:
Code:
case IDC_INFOBOX: {
HDC hdc = (HDC)wParam;
//SetBkColor(hdc, 0xFFFFFF);
SetTextColor(hdc, 0);
SetBkMode(hdc, TRANSPARENT);
return (LRESULT)GetStockObject(HOLLOW_BRUSH);
}
I don’t know if it´s the right way to do it, but it works, almost =P.
The transparent background is there, but if I mark some text, the marking stays in the background.
Picture link: LINK!
Is there some way to prevent that? Or maybe to prevent marking overall in the textbox?
If I minimize and maximize the window the editbox is normal again, why? Can I use the same principle?
I want the transparent background because I want to display a bitmap behind, it´s working fine as long I don’t mark the text =P
Edit:
Is it possible to make the blue "select-color" transparent?
I have tried to find some way to do that on msdn, but I am bad searcher...