Handmade Network»Forums
Connor
52 posts
It's been so long ;)
An Interesting Win32 Discovery
Hello all! I was digging around the web for win32 stuff this week and found something cool.

You can change the shape of your window to a circle! It's really neat and only takes three lines of code:

1
2
3
HRGN hrgn;
hrgn = CreateEllipticRgn(0, 0, 200, 200);
SetWindowRgn(Window, hrgn, TRUE);


It seems it doesn't actually change the shape of your window but only the viewing area of it? Very weird. Does anyone else have some cool win32 "secrets"?

- Connor
Mārtiņš Možeiko
2224 posts / 1 project
An Interesting Win32 Discovery
Edited by Mārtiņš Možeiko on
You need top use Layered Windows to control actual shape of window.

As for cool win32 secrets - The Old New Thing blog is great for this. You can find all kinds of win32 secrets there. Raymond Chen also has a book about this: https://smile.amazon.com/dp/0321440307 It's great.
25 posts
None
An Interesting Win32 Discovery
I remember Winamp assuming those shapes back in the day :) People probably stopped doing it for a reason...
Matt Mascarenhas
135 posts / 2 projects
Annotator, supper gatherer and slammer of thunderous high fives
An Interesting Win32 Discovery
Oh man, there's a little nostalgia trip! Pretty sure this was the Sonique skin I used for a bit, until the non-personalised fullscreen GUI-style Amarok and now the sleekly personalised ncmpcpp. I guess I still like that "shaped window" aesthetic, though, since I bothered to hack a curved shape into my conky monitor as you can see in the screenshot.
25 posts
None
An Interesting Win32 Discovery
Nice skin! Thinking about it, that was super customizable comparing to something like Sublime Text themes we have today...
Barret Gaylor
31 posts
I am a game designer who recently became interested in coding in a handmade way. I am not that experienced, but I want to learn.
An Interesting Win32 Discovery
Since we are talking about windows stuff, I've wondered if it was possible to make a window that is transparent except for the things you draw into it. That way you can draw symbols and other UI elements onto the screen without a window.