| Store | Cart
Lists » pdk

Win32::GUI and PerlCtrl

From: Dave Crawford <craw...@dcrawford.com>
Fri, 13 Dec 2002 16:57:40 -0500
Is there a known issue with using Win32::GUI inside a DLL created with
PerlCtrl ? (or am I overlooking something)Included below is a slimmed down
test case to demonstrate the issue, and it's called with a test VBS file:

    Dim obj
    Set obj = CreateObject("gui_test.app")
    obj.display_gui

The Dialog window displays fine but the button click never registers. Also,
forcefully closing the window (with the 'X' in the title bar) only seems to
Hide() the window as Taskmanager shows a 'wscript' instance still active. So
it seems that the *_Terminate() function isn't being properly called either
and the window is still hanging in Dialog()

-Dave

---------------------------------------------------
package gui_test;

use strict;
use Win32::GUI;

sub btnCancel_Click {-1;}
sub Main_Terminate {-1;}

sub display_gui
 {
 my $main = Win32::GUI::DialogBox ->new(
                 -name   => "Main",
                 -text => "Test",
                 -width  => 314,
                 -height => 347,
                 -top => 200,
                 -left => 200,
         );
 my $btn_cancel = $main->AddButton(
   -name => "btnCancel",
   -cancel => 1,
   -height => 21,
   -left => 160,
   -width => 60,
   -top => 272,
   -text => "Cancel",
   );
 $main->Show();
 Win32::GUI::Dialog();
 return;
 }

=pod

=begin PerlCtrl

    %TypeLib = (
 PackageName     => 'gui_test',
 TypeLibGUID     => '{C1AF28B3-361E-4EF0-B945-280206AEB796}', # do NOT edit
this line
 ControlGUID     => '{6E1BE7F1-0702-4DE8-AC2E-5EBE75CE02EE}', # do NOT edit
this line either
 DispInterfaceIID=> '{37E842AA-FFFE-460C-8F5D-E42282457972}', # or this one
 ControlName     => 'gui_test',
 ControlVer      => 1,
 ProgID          => 'gui_test.app',
        LCID            => 0,
 DefaultMethod   => '',
        Methods         => {
            'display_gui' => {
                    RetType             =>  VT_NULL,
                    TotalParams         =>  0,
                    NumOptionalParams   =>  0,
                    ParamList           =>[ ]
                },

            },  # end of 'Methods'
        Properties      => {
            }
     ,  # end of 'Properties'
        );  # end of %TypeLib

=end PerlCtrl

=cut

Recent Messages in this Thread
Dave Crawford Dec 13, 2002 09:57 pm
Jan Dubois Jan 14, 2003 01:21 am
Messages in this thread