Share via


CRect::operator LPCRECT

convierte CRect a LPCRECT.

operator LPCRECT( ) const throw( );

Comentarios

Cuando se utiliza esta función, no necesita dirección- de operador (de**&**).Utilizarán a este operador automáticamente cuando se pasa un objeto de CRect a una función que espera LPCRECT.

Ejemplo

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;
}

Requisitos

encabezado: atltypes.h

Vea también

Referencia

Clase de CRect

Gráfico de jerarquía

CRect::operator LPRECT