Public Function GetHighWord(ByVal TheValue As Long) As Long
' 获取一个32位整数的高16位。
Dim rtnVal As Long
CopyMemory rtnVal, ByVal VarPtr(TheValue) + 2, 2&
GetHighWord = rtnVal
End FunctionPublic Function GetLowWord(ByVal TheValue As Long) As Long
' 获取一个32位整数的低16位。
Dim rtnVal As Long
CopyMemory rtnVal, TheValue, 2&
GetLowWord = rtnVal
End Functionx = GetLowWord(lParam)
y = GetHighWord(lParam)
' 获取一个32位整数的高16位。
Dim rtnVal As Long
CopyMemory rtnVal, ByVal VarPtr(TheValue) + 2, 2&
GetHighWord = rtnVal
End FunctionPublic Function GetLowWord(ByVal TheValue As Long) As Long
' 获取一个32位整数的低16位。
Dim rtnVal As Long
CopyMemory rtnVal, TheValue, 2&
GetLowWord = rtnVal
End Functionx = GetLowWord(lParam)
y = GetHighWord(lParam)
y=lparam \ 65536