다음을 통해 공유


CRect::operator LPCRECT

변환 된 CRectLPCRECT.

operator LPCRECT( ) const throw( );

설명

이 함수를 사용 하면 주소를 필요 하지 않은 () 연산자.전달 된 경우이 연산자가 자동으로 사용을 CRect 개체에 필요한 함수는 LPCRECT.

예제

BOOL CMyDlg::OnInitDialog()
{
   CDialog::OnInitDialog();

   // CWnd::GetWindowRect() takes a LPRECT, but we can
   // simply pass our CRect object because of the LPRECT
   // cast operator in the CRect class.

   CRect rect;
   GetWindowRect(rect);

   // Similarly, CWnd::MoveWindow() takes a LPCRECT but
   // the LPCRECT cast operator is used implicitly:

   MoveWindow(rect, FALSE);

   return TRUE;
}

요구 사항

헤더: atltypes.h

참고 항목

참조

CRect 클래스

계층 구조 차트

CRect::operator LPRECT