Jump to content
Sign in to follow this  

How to get MouseUp on $HTCAPTION

Recommended Posts


I would like to know if anyone know's how to get a MouseUp event when using GUIRegisterMsg to force WM_NCHITTEST to return $HTCAPTION (for moving layered toobar window around.)

This is a basic snapshot of my code...

GUIRegisterMsg(0x0202, "_LED_MOUSEUP") ;This won't fire on $HTCAPTION, but works fine on everything else

Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
; ====================================================================================================
; Handle the WM_NCHITTEST for the layered window so it can be dragged by clicking anywhere on the image.
; ====================================================================================================
    If $iMsg = $WM_NCHITTEST Then
        Local $LEDIndex = _WinAPI_GetWindowLong($hWnd,$GWL_USERDATA)
        ;This will tell us if it's one of the windows we manage with our structure
        If $LEDIndex < UBound($newLEDs) And $hWnd = DllStructGetData($newLEDs[$LEDIndex],"hWnds",1) Then
            Return $HTCAPTION

Func _LED_MOUSEUP($hWnd, $iMsg, $iwParam, $ilParam)

Thanks in Advance for any help,


[size="1"][font="Lucida Console"]My ScriptsTrue multi-threaded ping[/font][/size]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.