如何获取WINDOWS 窗口句柄?

如何获取WINDOWS 窗口句柄?

那位兄弟能给我推荐个模块,如果能给个例子就更好了,先谢谢!
要写GUI,应该要用TK吧?
你想做什么呢?下面的这个实例对于使用TK来说比较不错。
貌似你说清楚你要干什么比较方便大家一起分析。

[Copy to clipboard] [ - ]
CODE:
#!/usr/bin/perl -w
# tksample3 - demonstrate dialog boxes

use strict;  
use Tk;
use Tk::DialogBox;

my $main = MainWindow->new( );

my $dialog = $main->DialogBox( -title   => "Register",
                            -buttons => [ "Register", "Cancel" ],
                           );

# the top part of the dialog box will let people enter their names,
# with a Label as a prompt

$dialog->add("Label", -text => "Name")->pack( );
my $entry = $dialog->add("Entry", -width => 35)->pack( );

# we bring up the dialog box with a button
$main->Button( -text    => "Click Here For Registration Form",
               -command => \&register)    ->pack(-side => "left");
$main->Button( -text    => "Quit",
               -command => sub { exit } ) ->pack(-side => "left");

MainLoop;

#
# register
#
# Called to pop up the registration dialog box
#

sub register {
    my $button;
    my $done = 0;

    do {   
        # show the dialog
        $button = $dialog->Show;

        # act based on what button they pushed
        if ($button eq "Register") {
            my $name = $entry->get;

            if (defined($name) && length($name)) {
                print "Welcome to the fold, $name\n";
                $done = 1;
            } else {
                print "You didn't give me your name!\n";
            }
        } else {
            print "Sorry you decided not to register.\n";
            $done = 1;
        }
    } until $done;
}

多谢分享,现在研究研究