frankos Geschrieben 4. September 2002 Geschrieben 4. September 2002 Hi! Ich möchte ein Formular subclassen, in etwa so: Option Explicit Private Declare Function SetWindowLong Lib "user32" _ Alias "SetWindowLongA" (ByVal hWnd As Long, _ ByVal nIndex As Long, ByVal dwNewLong As Long) _ As Long Private 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 Private Const WM_NCLBUTTONDBLCLK = &HA3 Private Const WM_NCLBUTTONDOWN = &HA1 Private Const WM_NCLBUTTONUP = &HA2 Const GWL_WNDPROC = (-4&) Dim PrevWndProc& Public Sub Init(hWnd As Long) PrevWndProc = SetWindowLong(hWnd, GWL_WNDPROC, AddressOf SubWndProc) End Sub Public Sub Terminate(hWnd As Long) Call SetWindowLong(hWnd, GWL_WNDPROC, PrevWndProc) End Sub Private Function SubWndProc(ByVal hWnd As Long, _ ByVal Msg As Long, _ ByVal wParam As Long, _ ByVal lParam As Long) As Long If Msg = WM_NCLBUTTONDBLCLK Then MsgBox ("DoubleClick") End If SubWndProc = CallWindowProc(PrevWndProc, hWnd, Msg, wParam, lParam) End Function Nun habe ich folgendes Problem: Das Doppelklickereignis wird in den Non-Client-Bereichen mit der Message-Box quittiert, in den Client-Bereichen aber nicht! Hängt die Varieble Msg von dem Bereich ab, auf den ich klicke? Ich hoffe, einer von Euch kann mir helfen. cu, frankos
Empfohlene Beiträge
Erstelle ein Benutzerkonto oder melde Dich an, um zu kommentieren
Du musst ein Benutzerkonto haben, um einen Kommentar verfassen zu können
Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen. Es ist einfach!
Neues Benutzerkonto erstellenAnmelden
Du hast bereits ein Benutzerkonto? Melde Dich hier an.
Jetzt anmelden