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?

Recommended Answers

All 2 Replies

[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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.