I've dug thru the GUI.xs a few weeks ago on the hunt for some missing events. I know that some events come as _Anonymous with the first parameter being the windows message code. But that goes only for messages not normally expected (or at least not coded out to fire an event of their own), so you will definitely not find the _Click event here.
I managed to get the mouse-related stuff (_LButtonUp, _MouseMove and the like) from a RichEdit, which usually does not give you any event at all (due to a bug, see my posting "RichEdit_Change"), by subclassing it: new Win32::GUI::Class ( -name => "_RichEdit", -widget => "RichEdit", -extends => "RichEdit" ); $Main->AddRichEdit ( -name => "Richie", -class => "_RichEdit", -pos => [30, 20], .... ); sub Richie_RButtonDown { print "let go!\n"; } Now from what I've seen in the XS source, the widget parameter can be any of Button, Listbox, TabStrip, RichEdit, Graphic, InteractiveGraphic, Splitter, and SplitterH. It does not need to correlate to the class you extend; I have used the Button widget with a RichEdit control. Just don't use the Graphic ones, as they expect a user supplied Paint function. Which subs the particular class tries to trigger, can, again, only be found in the XS source code - look for "MsgLoop" and check which DoEvent_xxx calls follow. However, I don't know if that solves your particular problem. There's no way to intercept ALL messages other than by getting your fingers dirty inside the XS. All you could do is GetMessage to see which messages come by, then PostMessage to put them back in the queue for Perl to find (PeekMessage does not work) and DoEvents for Perl to act on them, but that still does not tell you what Perl does and does not do in response to those Messages. Have fun, Harald | -----Original Message----- | From: Peter Eisengrein [mailto:[EMAIL PROTECTED] | Sent: Tuesday, April 17, 2001 14:58 | To: Perl GUI Mail list (E-mail) | Subject: [perl-win32-gui-users] GUI button problems | | | Having trouble with a Win32::GUI::Button where it is not | seeing the _Click. | However if I do $ReportButton->Show() or Hide() it works ok | (because of the | $var reference) and visually you can see the button is clicked (it | depresses). I am guessing the problem is because it is nested | on a Tab, but | I'm not sure. And if that is it, whatis the proper way to | call it? In the | script below, if you click on this button you do NOT get any | output to the | console. | | Any ideas? Is there any debug I can use to print all events | to the console | without having to explicitly code for each of them? If there | were I'd be | able to see what my system is getting versus what I think it | is (should be) | sending. | | Thanks, | Pete | | | my $ReportButton = $W->Tab->AddButton( | -name => "ReportButton", | -left => 725, | -top => 75, | -width => 85, | -text => "Create Report", | -tabstop => 1, | ); | | sub ReportButton_Click | { | print "ReportButton was clicked!\n"; ### get nothing! | return 0; | } | | _______________________________________________ | Perl-Win32-GUI-Users mailing list | Perl-Win32-GUI-Users@lists.sourceforge.net | http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |