Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDirectManipulationManager::Activate method

Activates Direct Manipulation for processing input and handling callbacks on the specified window.

Syntax


HRESULT Activate(
  [in]  HWND window
);

Parameters

window [in]

The window in which to activate Direct Manipulation.

Return value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The manipulation manager is deactivated, by default. The manager does not receive or respond to input and callbacks until Activate is called for the window.

Calls to Activate and Deactivate are reference counted.

Examples

The following example shows how to activate and deactivate input processing.


LRESULT WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
    BOOL handled = FALSE;
    switch ( msg )
    {
    case WM_SIZE:
        switch ( wParam)
        {
        case SIZE_MINIMIZED:
        case SIZE_MAXHIDE:
            pManipulationManager->Deactivate(hwnd);
            break;

        default:
            pManipulationManager->Activate(hwnd);
            break;
        }
        break;
    }
    if ( !handled)
    {
        return DefWindowProc(hwnd,msg,wParam,lParam);
    }
    else
    {
        return 0;
    }
}

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

DirectManipulation.h

IDL

DirectManipulation.idl

IID

IID_IDirectManipulationManager is defined as FBF5D3B4-70C7-4163-9322-5A6F660D6FBC

See also

IDirectManipulationManager

 

 

Community Additions

Show:
© 2014 Microsoft