ホーム › Graphics.Dwm › DwmShowContact
DwmShowContact
関数指定したタッチ接触点の視覚フィードバックを表示する。
シグネチャ
// dwmapi.dll
#include <windows.h>
HRESULT DwmShowContact(
DWORD dwPointerID,
DWM_SHOWCONTACT eShowContact
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| dwPointerID | DWORD | in |
| eShowContact | DWM_SHOWCONTACT | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// dwmapi.dll
#include <windows.h>
HRESULT DwmShowContact(
DWORD dwPointerID,
DWM_SHOWCONTACT eShowContact
);[DllImport("dwmapi.dll", ExactSpelling = true)]
static extern int DwmShowContact(
uint dwPointerID, // DWORD
uint eShowContact // DWM_SHOWCONTACT
);<DllImport("dwmapi.dll", ExactSpelling:=True)>
Public Shared Function DwmShowContact(
dwPointerID As UInteger, ' DWORD
eShowContact As UInteger ' DWM_SHOWCONTACT
) As Integer
End Function' dwPointerID : DWORD
' eShowContact : DWM_SHOWCONTACT
Declare PtrSafe Function DwmShowContact Lib "dwmapi" ( _
ByVal dwPointerID As Long, _
ByVal eShowContact As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DwmShowContact = ctypes.windll.dwmapi.DwmShowContact
DwmShowContact.restype = ctypes.c_int
DwmShowContact.argtypes = [
wintypes.DWORD, # dwPointerID : DWORD
wintypes.DWORD, # eShowContact : DWM_SHOWCONTACT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('dwmapi.dll')
DwmShowContact = Fiddle::Function.new(
lib['DwmShowContact'],
[
-Fiddle::TYPE_INT, # dwPointerID : DWORD
-Fiddle::TYPE_INT, # eShowContact : DWM_SHOWCONTACT
],
Fiddle::TYPE_INT)#[link(name = "dwmapi")]
extern "system" {
fn DwmShowContact(
dwPointerID: u32, // DWORD
eShowContact: u32 // DWM_SHOWCONTACT
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("dwmapi.dll")]
public static extern int DwmShowContact(uint dwPointerID, uint eShowContact);
"@
$api = Add-Type -MemberDefinition $sig -Name 'dwmapi_DwmShowContact' -Namespace Win32 -PassThru
# $api::DwmShowContact(dwPointerID, eShowContact)#uselib "dwmapi.dll"
#func global DwmShowContact "DwmShowContact" sptr, sptr
; DwmShowContact dwPointerID, eShowContact ; 戻り値は stat
; dwPointerID : DWORD -> "sptr"
; eShowContact : DWM_SHOWCONTACT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "dwmapi.dll"
#cfunc global DwmShowContact "DwmShowContact" int, int
; res = DwmShowContact(dwPointerID, eShowContact)
; dwPointerID : DWORD -> "int"
; eShowContact : DWM_SHOWCONTACT -> "int"; HRESULT DwmShowContact(DWORD dwPointerID, DWM_SHOWCONTACT eShowContact)
#uselib "dwmapi.dll"
#cfunc global DwmShowContact "DwmShowContact" int, int
; res = DwmShowContact(dwPointerID, eShowContact)
; dwPointerID : DWORD -> "int"
; eShowContact : DWM_SHOWCONTACT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
dwmapi = windows.NewLazySystemDLL("dwmapi.dll")
procDwmShowContact = dwmapi.NewProc("DwmShowContact")
)
// dwPointerID (DWORD), eShowContact (DWM_SHOWCONTACT)
r1, _, err := procDwmShowContact.Call(
uintptr(dwPointerID),
uintptr(eShowContact),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DwmShowContact(
dwPointerID: DWORD; // DWORD
eShowContact: DWORD // DWM_SHOWCONTACT
): Integer; stdcall;
external 'dwmapi.dll' name 'DwmShowContact';result := DllCall("dwmapi\DwmShowContact"
, "UInt", dwPointerID ; DWORD
, "UInt", eShowContact ; DWM_SHOWCONTACT
, "Int") ; return: HRESULT●DwmShowContact(dwPointerID, eShowContact) = DLL("dwmapi.dll", "int DwmShowContact(dword, dword)")
# 呼び出し: DwmShowContact(dwPointerID, eShowContact)
# dwPointerID : DWORD -> "dword"
# eShowContact : DWM_SHOWCONTACT -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。