Share via


CPoint::CPoint

Crea un objeto CPoint.

CPoint( ) throw( ); 
CPoint(
   int initX,
   int initY 
) throw( );
CPoint(
   POINT initPt 
) throw( );
CPoint(
   SIZE initSize 
) throw( );
CPoint(
   LPARAM dwPoint 
) throw( );

Parámetros

  • initX
    Especifica el valor del miembro de x de CPoint.

  • initY
    Especifica el valor del miembro de s de CPoint.

  • initPt
    estructura o CPoint depuntos que especifica los valores utilizados para inicializar CPoint.

  • initSize
    Estructura o CSize deCALIBRE que especifica los valores utilizados para inicializar CPoint.

  • dwPoint
    Establece el miembro de x a la palabra de orden inferior de dwPoint y el miembro de s a la palabra de alto nivel de dwPoint.

Comentarios

Si no se especifica ningún argumento, x y los miembros de s no se inicializan.

Ejemplo

CPoint   ptUndefined;
CPoint   ptTopLeft(0,0);

// works from a POINT, too

POINT   ptHere;
ptHere.x = 35;
ptHere.y = 95;

CPoint   ptMFCHere(ptHere);

// works from A SIZE

SIZE   sHowBig;
sHowBig.cx = 300;
sHowBig.cy = 10;

CPoint ptMFCBig(sHowBig);

// or from a DWORD

DWORD   dwSize;
dwSize = MAKELONG(35, 95);

CPoint ptFromDouble(dwSize);
ASSERT(ptFromDouble == ptMFCHere);   

Requisitos

encabezado: atltypes.h

Vea también

Referencia

Clase de CPoint

Gráfico de jerarquía