Is there a way to query the mouse status to see if a button is depressed on Win32 using perl?

I am aware of Win32::Gui and the _Onclick event but what if you want to see if the mouse was clicked in an object that does not support the onclick event.

adding -onclick to an AxWindow does not seem to work so I am looking for an alternate solution to determining is the mouse was clicked.

Any help is greatly appreciated.

#!perl use strict; use Win32::GUI; use Win32::GUI::AxWindow; require 'subs_common.pl'; ################ MAIN WINDOW ############# my $FormWindow = new Win32::GUI::Window( -name => "FormWindow", -text => "Test", -pos => [600,50], -size => [400,300], ); sub FormWindow_Resize{return 0;} sub FormWindow_Minimize {return 0;} sub FormWindow_Maximize {return 0;} sub FormWindow_Terminate {return -1;} ########################## # Add a WebBrowser AxtiveX my $Control = new Win32::GUI::AxWindow ( -parent => $FormWindow, -name => "Control", -control => "Shell.Explorer.2", #-control => "InternetExplorer.Application", #-control => "{8856F961-340A-11D0-A96B-00C04FD705A2}", -pos => [0, 0], -size => [400, 300], -onClick => \&clickEvent, );

In reply to Is Mouse Down by slloyd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.