Jump to content
Sign in to follow this  

Loading PDF Object file stops mouse wheel detection

Recommended Posts

Hey there,

I'm very thankful.

Mouse wheel detection works correctly untill loading the pdf file into the com object:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

GUICreate("PDF Object", 802, 590)
$oPDF = ObjCreate("AcroPDF.PDF.1")
$oPDF.src = (@ScriptDir & "\file.pdf") ; loading the pdf file stops mouse wheel detection
$GUI_ActiveX = GUICtrlCreateObj($oPDF, 10, 10, 780, 550)
GUICtrlSetStyle($GUI_ActiveX, $WS_VISIBLE)
GUICtrlSetResizing($GUI_ActiveX, $GUI_DOCKAUTO)

;~ $oPDF.setShowToolbar(False)
;~ $oPDF.setShowScrollbars(True)
;~ $oPDF.setCurrentPage(10)
;~ $oPDF.gotonextpage()
;~ $oPDF.setZoom (10)

While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
$oPDF = ""
$GUIActiveX = ""

Func _WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam)
    Local $iMPos = MouseGetPos()
    Switch $wParam
        Case 0x00780000
            ToolTip("Mouse wheel UP is detected!" & @CRLF & @CRLF & 'Click in the "My GUI" to return...', $iMPos[0], $iMPos[1], "Wheel UP", 1, 3)
        Case 0xFF880000
            ToolTip("Mouse wheel Down is detected!" & @CRLF & @CRLF & 'Click in the "My GUI" to return...', $iMPos[0], $iMPos[1], "Wheel Down", 1, 3)
EndFunc   ;==>_WM_MOUSEWHEEL

If there is any way to fix that.

Thank you.

[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...