Hi all! I've been working on implementing winapi with an SFML window and have been having one success after another. For example: I've learned how to make a SFML window that supports dragging-n-dropping files into it. This specific time I have figured out how to make a transparent window that allows clicking through it where there is no color.
This is the code I used to accomplish a transparent window:
WindowHandle handle = mainwindow.getSystemHandle();
SetWindowLongPtrA(handle, GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TOOLWINDOW);//Most important to set the window as WS_EX_LAYERED to allow the third function "SetLayeredWindowAttributes".
SetWindowPos(handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);//This is just to set the window on-top of other windows. Not necessary
SetLayeredWindowAttributes(handle, RGB(255, 0, 255), 0,LWA_COLORKEY);//The color purple is chosen to be removed from the window. The last thing to do is clear the window with the color purple.
Blupi Bouncers is a fangame for the 90's game "Speedy Eggbert". It features the ability to play around with many different modes and types of blupis on your desktop like a desktop pet. The number of blupis you can have on your screen is only limited by your computers performance. Don't worry though. The program doesn't freeze your computer if it can't handle a bunch of blupis.
I have Blupi Bouncers on itch.io and the source code is on github for anyone who's interested.
https://fishleteer.itch.io/blupi-bouncershttps://github.com/Happy-Flappy/Blupi-Bouncers