vbAccelerator - Contents of code file: Mouse_mEnumChildWindows.basAttribute VB_Name = "mEnumChildWindows"
Option Explicit
Private Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As
Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Private m_bFound As Boolean
Public Function IsChildWindow(ByVal lhWndCtl As Long, ByVal lhWndCmp As Long)
As Long
m_bFound = False
EnumChildWindows lhWndCtl, AddressOf EnumChildProc, lhWndCmp
IsChildWindow = m_bFound
End Function
Private Function EnumChildProc(ByVal hwnd As Long, ByVal lhWndCmp As Long) As
Long
If hwnd = lhWndCmp Then
' Found
m_bFound = True
EnumChildProc = 0
Else
' Continue
EnumChildProc = 1
End If
End Function
|
|