求助!
Option ExplicitType POINTAPI
x As Long
y As Long
End Type
Type MINMAXINFO
ptReserved As POINTAPI
ptMaxSize As POINTAPI
ptMaxPosition As POINTAPI
ptMinTrackSize As POINTAPI
ptMaxTrackSize As POINTAPI
End Type
Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As Any, pSource As Any, ByVal ByteLen As Long)
Public Const GWL_WNDPROC = (-4)
Public Const WM_GETMINMAXINFO = &H24
Dim OldProc&
Dim mhWnd&
'==================================================
'回调
Function WinProc&(ByVal hWnd&, ByVal wMsg&, _
ByVal wParam&, ByVal lParam&)
Select Case wMsg&
Case WM_GETMINMAXINFO
Dim MinMax As MINMAXINFO
CopyMemory MinMax, ByVal lParam, Len(MinMax)
MinMax.ptMinTrackSize.x = 640
MinMax.ptMinTrackSize.y = 550
' MinMax.ptMaxTrackSize.x = 808
' MinMax.ptMaxTrackSize.y = 150
CopyMemory ByVal lParam, MinMax, Len(MinMax)
WinProc& = 1
Exit Function
End Select
WinProc& = CallWindowProc(OldProc, hWnd, wMsg, wParam, lParam)
End Function
'==================================================
'==================================================
'挂钩
Sub Hook(ByVal nhWnd&)
If OldProc <> 0 Then Exit Sub
mhWnd& = nhWnd&
OldProc = SetWindowLong(nhWnd&, GWL_WNDPROC, AddressOf WinProc)
End Sub
'==================================================
'==================================================
'脱钩
Sub UnHook()
If OldProc = 0 Then Exit Sub
SetWindowLong mhWnd, GWL_WNDPROC, OldProc
OldProc = 0
End Sub
'==================================================
谁能帮我讲讲上面代码什么意思