RoundRect

¿øÇü

BOOL RoundRect( HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidth, int nHeight );

MFC ¿øÇü

BOOL CDC::RoundRect( int x1, int y1, int x2, int y2, int x3, int y3 );

BOOL CDC::RoundRect( LPCRECT lpRect, POINT point );

Àμö

¢ºhdc : DCÀÇ ÇÚµé

¢ºnLeftRect, TopRect, nRightRect, nBottomRect : »ç°¢ÇüÀÇ ¿µ¿ª

¢ºnWidth, nHeight : ¸ð¼­¸®ÀÇ ³»Á¢ Ÿ¿ø Áö¸§

¸®ÅÏ

¼º°øÇϸé 0ÀÌ ¾Æ´Ñ °ª(TRUE)À» ¸®ÅÏÇÏ°í ½ÇÆÐÇϸé 0À» ¸®ÅÏÇÑ´Ù.

¼³¸í

¸ð¼­¸®°¡ µÕ±Ù ¸ð¾çÀÇ »ç°¢ÇüÀ» ±×¸°´Ù. 2~5¹ø° Àμö°¡ ÁöÁ¤ÇÏ´Â ¿µ¿ª¿¡ »ç°¢ÇüÀ» ±×¸®µÇ 6,7¹ø° Àμö°¡ ÁöÁ¤ÇÏ´Â Å©±âÀÇ Å¸¿øÀ» »ç°¢ÇüÀÇ ¸ð¼­¸®¿¡ ±×¸²À¸·Î½á ¸ð¼­¸®°¡ µÕ±Û°Ô ó¸®ÇÑ´Ù. ³»Á¢ Ÿ¿øÀÇ Áö¸§ÀÌ Å©¸é Ŭ¼ö·Ï ¸ð¼­¸®ÀÇ °î·üÀÌ ³ô¾ÆÁø´Ù.

¿¹Á¦ 1

´ÙÀ½ ¿¹Á¦´Â µ¿ÀÏÇÑ Å©±âÀÇ »ç°¢ÇüÀ» ±×¸®µÇ ³»Á¢ Ÿ¿øÀÇ ¹ÝÁö¸§À» Á¡Á¡ Áõ°¡½ÃÅ´À¸·Î½á ¸ð¼­¸®¸¦ µÕ±Û°Ô ó¸®ÇÏ¿´´Ù.

LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam)
{
	HDC hdc;
	PAINTSTRUCT ps;

	switch(iMessage) {
	case WM_PAINT:
		hdc=BeginPaint(hWnd, &ps);
		RoundRect(hdc,10,10,100,100,10,10);
		RoundRect(hdc,110,10,200,100,20,20);
		RoundRect(hdc,210,10,300,100,30,30);
		RoundRect(hdc,310,10,400,100,40,40);
		EndPaint(hWnd, &ps);
		return 0;
	case WM_DESTROY:
		PostQuitMessage(0);
		return 0;
	}
	return(DefWindowProc(hWnd,iMessage,wParam,lParam));
}

Âü°íÇÔ¼ö

Rectangle : »ç°¢ÇüÀ» ±×¸°´Ù.

Ç÷§Æû

95ÀÌ»ó

ÂüÁ¶

 


written by http://www.winapi.co.kr