www.pudn.com > QQ2009.rar > mDropDown.bas, change:2009-11-15,size:603b


Attribute VB_Name = "mDropDown" 
 
Option Explicit 
 
Dim OldWndProc As Long 
 
Public Function WndProc(ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long 
    If uMsg = WM_NCACTIVATE And wParam = 0 Then 
        Unload frmDropDown 
    End If 
     
    WndProc = CallWindowProc(OldWndProc, hWnd, uMsg, wParam, lParam) 
End Function 
 
Public Sub SubClass(ByVal hWnd As Long) 
    OldWndProc = SetWindowLong(hWnd, GWL_WNDPROC, AddressOf WndProc) 
End Sub 
 
Public Sub UnSubClass(ByVal hWnd As Long) 
    SetWindowLong hWnd, GWL_WNDPROC, OldWndProc 
End Sub