I found some solutions using OpenGL or Qt. I also found these 2 functions:
void SplashScreen::makeWindowTransparent()
{
HWND hwnd = window.getSystemHandle();
SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
}
void SplashScreen::setWindowAlpha(sf::Uint8 alpha)
{
SetLayeredWindowAttributes(window.getSystemHandle(), (0, 255, 255), alpha, LWA_ALPHA);
}
But if I set the alpha to 0 then the whole window is transparent. All i want is just a transparent window background so i can draw sprites on it. I made this post because the solutions i found are too advanced for me at the moment and I'd rather not make my project any more complex.