IDirectManipulationManager::P rocessInput 메서드(directmanipulation.h)

앱의 UI 스레드에서 조작 관리자에게 키보드 및 마우스 메시지를 전달합니다.

구문

HRESULT ProcessInput(
  [in]          const MSG *message,
  [out, retval] BOOL      *handled
);

매개 변수

[in] message

처리할 입력 메시지입니다.

[out, retval] handled

TRUE 이면 이 메시지로 더 이상 처리하지 않아야 합니다. 그렇지 않으면 FALSE입니다.

반환 값

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

설명

마우스 및 키보드 입력에 대해 이 메서드를 호출합니다.

예제

다음 예제에서는 조작 관리자에 메시지를 전달하는 방법을 보여줍니다.

LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    BOOL handled = FALSE;

LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    BOOL handled = FALSE;
    switch (msg)
    {
    case WM_KEYDOWN:
    case WM_POINTERWHEEL:
    case WM_POINTERHWHEEL:
    case WM_MOUSEWHEEL:
    case WM_MOUSEHWHEEL:
        MSG msg = {};
        msg.hwnd = hwnd;
        msg.message = message;
        msg.lParam = lParam;
        msg.wParam = wParam;

        if (FAILED(m_pManipulationManager->ProcessInput(&msg, &handled)))
        {
            handled = false;
        }
        break;
    }

    if ( !handled)
    {
        return DefWindowProc(hwnd,msg,wParam,lParam);
    }
    else
    {
        return 0;
    }
}

요구 사항

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

추가 정보

IDirectManipulationManager