共用方式為


RegisterPointerDeviceNotifications 函式 (winuser.h)

註冊視窗來處理 WM_POINTERDEVICECHANGEWM_POINTERDEVICEINRANGEWM_POINTERDEVICEOUTOFRANGE 指標裝置通知。

語法

BOOL RegisterPointerDeviceNotifications(
  [in] HWND window,
  [in] BOOL notifyRange
);

參數

[in] window

接收 WM_POINTERDEVICECHANGEWM_POINTERDEVICEINRANGEWM_POINTERDEVICEOUTOFRANGE 通知的視窗。

[in] notifyRange

如果設定為 TRUE,請處理 WM_POINTERDEVICEINRANGEWM_POINTERDEVICEOUTOFRANGE 訊息。 如果設定為 FALSE,則不會處理這些訊息。

傳回值

如果此函式成功,則會傳回 TRUE。

否則會傳回 FALSE。 若要擷取擴充的錯誤資訊,請呼叫 GetLastError 函式。

規格需求

需求
最低支援的用戶端 Windows 8 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2012 [僅限傳統型應用程式]
目標平台 Windows
標頭 winuser.h
程式庫 User32.lib
Dll User32.dll
API 集合 ext-ms-win-rtcore-ntuser-wmpointer-l1-1-0 (於 Windows 10 10.0.14393 版)

請參閱

函式