Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Registers a dedicated thread for hit testing.
Syntax
HRESULT RegisterHitTestTarget(
[in] HWND window,
[in, optional] HWND hitTestWindow,
[in] DIRECTMANIPULATION_HITTEST_TYPE type
);
Parameters
[in] window
The handle of the main app window (typically created from the UI thread).
[in, optional] hitTestWindow
The handle of the window in which hit testing is registered (should be created from the hit testing thread). Pass in nullptr to unregister a previously registered hit-test target.
[in] type
One of the values from DIRECTMANIPULATION_HITTEST_TYPE. Specifies whether the UI window or the hit testing window (or both) receives the hit testing WM_POINTERDOWN message , and in what order.
Return value
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Hit testing is typically performed on the application UI thread. The application receives a WM_POINTERDOWN message on which hit-testing is performed. If a manipulation is required, SetContact is called on one or more viewports. An application can use the RegisterHitTestTarget method to delegate this hit-testing responsibility to a separate hit-testing thread.
Once a dedicated hit-test target is successfully registered, WM_POINTERDOWN messages are processed on the hit-testing thread. If a manipulation, such as pan or zoom, is required, SetContact is called from this thread.
If SetContact is not called from the hit-testing thread, WM_POINTERDOWN messages may be processed on the UI thread, depending on the DIRECTMANIPULATION_HITTEST_TYPE specified during registration.
If SetContact is not called by either the hit-test thread or the UI thread, Direct Manipulation ignores the input which is then handled on the UI thread.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 8 [desktop apps only] |
| Minimum supported server | Windows Server 2012 [desktop apps only] |
| Target Platform | Windows |
| Header | directmanipulation.h |