IDesktopWindowXamlSourceNative2::PreTranslateMessage method (windows.ui.xaml.hosting.desktopwindowxamlsource.h)

Enables the WinRT XAML framework to process a Windows message for a DesktopWindowXamlSource object that hosts a WinRT XAML control.

Syntax

HRESULT PreTranslateMessage(
  const MSG *message,
  BOOL      *result
);

Parameters

message

Type: const MSG*

The Windows message to process.

result

Type: BOOL*

True if the message was processed; otherwise, false.

Return value

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

Remarks

For a code example that demonstrates how to use this method, see XamlBridge.cpp in the SampleCppApp sample in the XAML Island samples repo.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1903 (build 18362)
Header windows.ui.xaml.hosting.desktopwindowxamlsource.h

See also

Using the UWP XAML hosting API in a C++ desktop (Win32) app