[win32] - how hide backcolor in a form?
i have these code for make the form transparent:
Code:
void settransparency(HWND handlewindow,color backcolor, std::uint8_t Transperancy=255)
{
long wAttr = GetWindowLong(handlewindow, GWL_EXSTYLE);
if(backcolor==-1)
{
SetWindowLong(handlewindow, GWL_EXSTYLE, wAttr | WS_EX_LAYERED);
SetLayeredWindowAttributes(handlewindow, NULL, Transperancy, 0x02);
}
else
{
SetWindowLong(handlewindow, GWL_EXSTYLE, wAttr | WS_EX_LAYERED);
SetLayeredWindowAttributes(handlewindow, backcolor, Transperancy, 0x02 | 0X01);
}
}
but have problems. don't only hide the backcolor but(with title bar) everything is disable :(
what i mean: think the title bar is above the word text... if we click on title bar, why the word text wins the focus?
these problem don't make sence to me... i just make the form transparent :(
what can you advice me?