How to access Direct Manipulation interfaces

I am learning Direct Manipulation support on Windows 8 Desktop. I found some examples online that describe some concepts in C ++, but I am a C # programmer.

I want to access COM interfaces for IDirectManipulationManager, IDirectManipulationCompositor, etc. However, I cannot find the assembly in which these interfaces are included.

Where are the interfaces located?

I have a VS 2012 utlimate and have the Windows 8 SDK installed. Are there any other settings necessary for working with direct manipulation?

Also, if someone could provide me with a few more sample code (with the exception of those on the Intel developer website) for Direct Manipulation, that would be very helpful!

+4
source share
1 answer

MSDN contains documentation covering DirectManipulation . The interface documentation refers to the interface definition (DirectManipulation.idl), which you can use to create an interaction assembly. With the Windows 8 SDK installed, you will find DirectManipulation.idl in %ProgramFiles(x86)%\Windows Kits\8.0\Include\um

You can check the WPF Manipulation events first to make sure that they are enough for your scenario.

Sample code: multi-touch support in WPF

Also, search MSDN Magazine for the following articles for more information on WPF Manipulation events (unfortunately, I cannot link them at this time):

  • Multi-Touch Manipulation Events in WPF
  • Touch and response
  • Inertia Multi-Touch

Update: To create the assembly, copy the DirectManipulation.idl file to a temporary folder. Open a Visual Studio command prompt or SDK.

cd to the temp folder where idl was copied.

Run midl directmanipulation.idl /tlb directmanipulation.tlb to create a type library.

Run directmanipulation.tlb /out:DirectManipulation.dll to generate an assembly that can be referenced in Visual Studio.

For more information on MIDL and TLBImp, see

MIDL Command Line Reference
msdn.microsoft.com/en-us/library/windows/desktop/aa367372 (v = vs .85) .aspx

MSDN: import a type library as a collection
msdn.microsoft.com/en-US/library/xwzy44e4 (v = vs .80) .aspx

+4
source

Source: https://habr.com/ru/post/1481007/


All Articles