1 - for avoid flickers, we use: WS_CLIPCHILDREN on parent window style.
2 - for be transparent we do:
Code:
case WM_ERASEBKGND:
case WM_CTLCOLORBTN:
case WM_CTLCOLORSTATIC:
{
return (LRESULT)GetStockObject(NULL_BRUSH);
}
break;
and now we can use the WM_PAINT for draw what we need.
use:
Code:
RECT d;
GetClientRect(hwnd,&d);
RedrawWindow(hwnd,&d,nullptr,RDW_UPDATENOW | RDW_INVALIDATE);
for repaint the control.
now see the transparent flicker-free control.
(if i draw a filled rectangle, the control backcolor is showed )
so how can i redraw the control without that problem?(see the image... 1 image above another)