IDirectManipulationViewport::AddEventHandler 메서드(directmanipulation.h)

뷰포트 이벤트를 수신 대기하는 새 이벤트 처리기를 추가합니다.

구문

HRESULT AddEventHandler(
  [in]          HWND                                    window,
  [in]          IDirectManipulationViewportEventHandler *eventHandler,
  [out, retval] DWORD                                   *cookie
);

매개 변수

[in] window

이벤트 콜백에 대한 스레드가 소유한 창의 핸들입니다.

[in] eventHandler

뷰포트 상태 및 업데이트 이벤트가 발생할 때 호출되는 처리기입니다. 지정된 개체는 IDirectManipulationViewportEventHandler 인터페이스를 구현해야 합니다.

[out, retval] cookie

이 이벤트 처리기 콜백을 나타내는 핸들입니다.

반환 값

메서드가 성공하면 S_OK를 반환하고, 그러지 않으면 HRESULT 오류 코드를 반환합니다.

설명

이벤트 콜백은 지정된 창을 소유하는 스레드에서 발생합니다. 동일한 콜백 메서드의 연속 이벤트를 병합할 수 있습니다.

참고 뷰포트에 끌어서 놓기 동작이 연결된 경우 이벤트 처리기는 IDirectManipulationDragDropEventHandler를 구현해야 합니다.
 

요구 사항

   
지원되는 최소 클라이언트 Windows 8 [데스크톱 앱만 해당]
지원되는 최소 서버 Windows Server 2012 [데스크톱 앱만 해당]
대상 플랫폼 Windows
헤더 directmanipulation.h

추가 정보

IDirectManipulationViewport