Search

'onpaint'에 해당되는 글 2건

  1. 2016.10.25 CTextProgressCtrl hide Edge
  2. 2016.10.20 MFC CWnd Control Border Color Change

CTextProgressCtrl hide Edge

Programming/MFC 2016. 10. 25. 11:53 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

CTextProgressCtrl hide Edge





void CTextProgressCtrl::OnPaint()

{

......

DrawEdge(dc, ClientRect, EDGE_SUNKEN, BF_ADJUST | BF_RECT | BF_FLAT);

......

}







if you want to hide CTextProgressCtrl's Edge,


add "//"



void CTextProgressCtrl::OnPaint()

{

......

// DrawEdge(dc, ClientRect, EDGE_SUNKEN, BF_ADJUST | BF_RECT | BF_FLAT);

......

}

MFC CWnd Control Border Color Change

Programming/MFC 2016. 10. 20. 14:48 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

MFC CWnd Control Border Color Change









CWnd::OnNcPaint

 

게시: 2016년 4월

The framework calls this member function when the nonclient area needs to be painted.

비클라이언트 영역을 그려야 할 때 프레임 워크는이 멤버 함수를 호출 합니다.

afx_msg void OnNcPaint( );

The default implementation paints the window frame.


An application can override this call and paint its own custom window frame. The clipping region is always rectangular, even if the shape of the frame is altered.


기본 구현에서는 창 프레임을 그립니다.


응용 프로그램이이 호출을 무시 하 고 자체 사용자 지정 창 프레임을 페인트할 수 있습니다. 클리핑 영역은 프레임의 모양을 변경 하는 경우에 항상 사각형입니다.



void CDerivedEdit::OnNcPaint() 
{
		CDC* pDC = GetWindowDC( );
		
		//work out the coordinates of the window rectangle,
		CRect rect;
		GetWindowRect( &rect);
		rect.OffsetRect( -rect.left, -rect.top);
		
		//Draw a single line around the outside
		CBrush brush( RGB( 255, 0, 0));
		pDC->FrameRect( &rect, &brush);
		ReleaseDC( pDC);
}


'Programming > MFC' 카테고리의 다른 글

CEdit control의 font 바꾸기  (0) 2016.10.25
CTextProgressCtrl hide Edge  (0) 2016.10.25
MFC CheckBox 컨트롤의 현재 상태  (0) 2016.10.19
MFC Control Color Change  (0) 2016.10.19
MFC Bitmap Button  (0) 2016.10.18