Hi
Firstly I am new to the group and I am not a programmer, more of a
technical user. I am trying to create an active x control that will
eventually be used in several applications. I have a problem the basic
control function itself. Below is my code for the basic construction of
the gdll. I have made a container program for it using Axwindow and I
want to call the display with a method $Control->CallMethod("display");
Where display is my function from the dll. However I cannot get the
display window to show in my container. The only way it will Is if I put
a call to the display function inside the dll. Then the window shows as
soon as the AXcontrol is made.
I suspect something is wrong with my dll program. Please see below. Any
help or pointers would be appreciated.
Thanks in advance
Mike McMahon
package Mike;
use strict;
use Win32;
require Win32::GUI;
my $Width = 200;
my $Height = 200;
my $Left = 5;
my $Top = 30;
my $main;
#display(); unhash this line and the window will show in my container.
sub display {
my $Class_02 = new Win32::GUI::Class(
-name => "sub_class",
-color => 5,);
$main = Win32::GUI::DialogBox->new(
-name => "Main",
-text => "test",
-width => $Width,
-height => $Height,
-top => $Top,
-left => $Left,
-helpbutton => 0,
-dialogui => 1,
-topmost =>1,
-class => $Class_02,
-popstyle => 0xC00000,
-pushstyle => 0x40000000,
-interactive => 1,
-onMouseRightDown => \&MouseRightDw,);
return ($main->Show());
}
=pod
=begin PerlCtrl
%TypeLib = (
PackageName => 'Mike',
# DO NOT edit the next 3 lines.
TypeLibGUID => '{E91B25C6-2B15-11D2-B466-0800365DA902}',
ControlGUID => '{E91B25C7-2B15-11D2-B466-0800365DA902}',
DispInterfaceIID=> '{E91B25C8-2B15-11D2-B466-0800365DA902}',
ControlName => 'Gui Control',
ControlVer => 1,
ProgID => 'Mike.Gui',
DefaultMethod => '',
Methods => {
'display' => {
RetType => VT_BSTR,,
TotalParams => 0,
NumOptionalParams => 0,
ParamList =>[ ]
},
}, # end of 'Methods'
Properties => {
}
, # end of 'Properties'
); # end of %TypeLib
=end PerlCtrl
=cut