다음을 통해 공유


CPen::CreatePenIndirect

펜 스타일, 너비 및 색 포인터가 가리키는 구조체에 지정 된 초기화 lpLogPen.

BOOL CreatePenIndirect( 
   LPLOGPEN lpLogPen  
);

매개 변수

  • lpLogPen
    Windows를 가리키는 LOGPEN 펜에 대 한 정보를 포함 하는 구조입니다.

반환 값

함수가 성공 하면 0이 아닌. 그렇지 않으면 0입니다.

설명

폭이 1 픽셀씩 항상 하나 있어야 보다 펜의 PS_NULL, PS_SOLID, 또는 PS_INSIDEFRAME 스타일입니다.

펜이 있는 경우는 PS_INSIDEFRAME 스타일 및 논리 색상표에서 색을 일치 하지 않는 색 펜 디더링된 색으로 그려집니다. PS_INSIDEFRAME 스타일입니다 동일한 PS_SOLID 펜 너비가 1 보다 작거나 경우.

예제

LOGPEN logpen;
CPen   cMyPen;

// Get the LOGPEN of an existing pen.
penExisting.GetLogPen(&logpen);

// Change the color to red and the width to 2.
logpen.lopnWidth.x = 2;
logpen.lopnColor = RGB(255, 0, 0);

// Create my pen using the new settings.
cMyPen.CreatePenIndirect(&logpen);

요구 사항

헤더: afxwin.h

참고 항목

참조

CPen 클래스

계층 구조 차트

CPen::CreatePen

CPen::CPen