I'm creating a basic application in C++ (Win32 API). I tried to make a button with the CreateWindow() function as seen below:
button1 = CreateWindow("button", TEXT("Click Me!"), WS_TABSTOP | WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 100, 200, 70, 25, hwnd, (HMENU)NULL, NULL, NULL);
The problem is that there is a white border around the button as you can see here: Link
I tried to make it transparent with this code but is doesn't work.
case WM_CTLCOLORBTN:{
HBRUSH hBrushbtn;
hBrushbtn = (HBRUSH)GetStockObject(NULL_BRUSH);
SetBkMode((HDC) wParam, TRANSPARENT);
return ((LRESULT)hBrushbtn);
break;
}
How can I do this?
Thanks