.NET/Windows API for .NET
GetClipCursor - ClipCursor를 통한 제한영역 표시
클리엘
2019. 8. 9. 16:42
728x90
Mouse를 움직일 수 있는 영역을 제한하는 함수로 ClipCursor함수가 있습니다.
[Windows API for .NET] - ClipCursor - Mouse의 움직임영역 제한
이 함수는 ClipCursor함수로 설정된 영역에 대한 값을 반환합니다.
Declare Function GetClipCursor Lib "user32" Alias "GetClipCursor" (ByRef lprc As RECT) As Integer
▶VB.NET 선언
Public Structure RECT
Public left As Integer
Public top As Integer
Public right As Integer
Public bottom As Integer
End Structure
Dim m_point As RECT = New RECT
GetClipCursor(m_point)
▶VB.NET 호출
[DllImport("user32.dll")]
public static extern int GetClipCursor(ref RECT lprc);
▶C# 선언
public struct RECT{
public int left;
public int top;
public int right;
public int bottom;
};
RECT m_point = new RECT();
GetClipCursor(ref m_point);
▶C# 호출
C# 호출 ClipCursor 함수가 사용되지 않았거나 기타 이유로 GetClipCursor함수실행이 실패한 경우에는 0을 반환합니다.
728x90