I'm currently using the old SetWindowRgn method to create a form with rounded corners but the edges of the corners produced are horribly pixelated.
Is there any way to have a form with rounded corners that are smooth?
I'm currently using the old SetWindowRgn method to create a form with rounded corners but the edges of the corners produced are horribly pixelated.
Is there any way to have a form with rounded corners that are smooth?
[NOPE!
Unless, you use a more recent method where you turn on alpha, and alpha blit your images into the background instead of cookie cutting it with the old fashioned polyline.
You should check if your version of windows can handle it.
95/98/ME can't, they have to use Region Cutting.
Lookup the following keywords to get more information!
Set your window style with WS_EX_LAYERED.
// alternatively WS_EX_TRANSPARENT using CreateWindowEx()
tcol.r = 0;
tcol.g = 255;
tcol.b = 0;
tcol.a = 0;
cTKey = RGB( tcol.r, tcol.g, tcol.b );
#ifdef TEST_BIGWIN
// Play with alpha of desktop with application big Window! Use for aligning panels!
SetLayeredWindowAttributes( hWnd, cTKey, 220, LWA_ALPHA ); // I see ghosts!
#else
SetLayeredWindowAttributes( hWnd, cTKey, 255, LWA_COLORKEY ); // Cookie Cutter!
#endif
Thanks for pointing me in the right direction, I searched for information on alpha blending form's and found out what to do.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.