Compartilhar via


CRect::CopyRect

Copia o retângulo de lpSrcRect em CRect.

void CopyRect( 
   LPCRECT lpSrcRect  
) throw( );

Parâmetros

  • lpSrcRect
    Os pontos a RECT estrutura ou ao objeto de CRect que devem ser copiados.

Exemplo

CRect rectSource(35, 10, 125, 10);
CRect rectDest;

rectDest.CopyRect(&rectSource);

// rectDest is now set to (35, 10, 125, 10)

RECT rectSource2;
rectSource2.left = 0;
rectSource2.top = 0;
rectSource2.bottom = 480;
rectSource2.right = 640;

rectDest.CopyRect(&rectSource2);

// works against RECT structures, too!
// rectDest is now set to (0, 0, 640, 480)   

Requisitos

Cabeçalho: atltypes.h

Consulte também

Referência

Classe de CRect

Gráfico de hierarquia

CRect::CRect

CRect::operator =

CRect::SetRect

CRect::SetRectEmpty