- labels: --> Win32::GUI Core
To see this issue in action, add the following line:
printf("EventName %s \n",EventName);
After:
// OEM name event
char EventName[MAX_EVENT_NAME];
strcpy(EventName, "main::");
strcat(EventName, perlud->szWindowName);
strcat(EventName, "_");
strcat(EventName, Name);
in GUI_Events.cpp
Then run this script:
$|=1;
use strict;
use Win32::GUI;
my $W = new Win32::GUI::Window(
-name => "TestWindow",
-pos => [ 0, 0],
-size => [210, 200],
-text => "TestWindow",
);
$W->AddButton (
-name => "Start",
-pos => [65,5],
-text => "&Start",
-tabstop => 1,
#-onClick => sub {print 'clicked'},
);
#add the events to the button
$W->Start->SetEvent('Click',sub {print 'clicked'});
$W->Show;
Win32::GUI::Dialog();
You will see that as well as performing the NEM event,
it also looks for the OEM event, and if found will run that
as well.