Please don't use the "1" and "2"... of the returns.
The IDOK, IDCANCEL, etc are actually in Win32::Shell32
I don't know why that is, I'd have thought it was core/fundamental since
these are standard IDs.
 
;-}
-stuart


 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Cruickshanks, Darin
Sent: Friday, May 02, 2003 4:34 AM
To: Steffen Mueller; perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Messagebox




I'm unsure which buttons you want to appear on the message box, but
making a guess from the text, this would display a message box with Ok
and Cancel buttons and $result would contain a 1 if the Ok button was
clicked and a 2 if the Cancel button was clicked -

$result = Win32::MsgBox("Please fill in account name", 1|MB_ICONSTOP,
"Error");


Check out the Win32 section of the Perl documentation for the other
options for the message box.


Darin
--------------------------------------------
Darin Cruickshanks
Labs Manager, Computing Service
University of Essex
[EMAIL PROTECTED]
01206 873585


-----Original Message-----
From: Steffen Mueller [mailto:[EMAIL PROTECTED]
Sent: 01 May 2003 19:50
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Messagebox


It seems that the MessageBox function doesn't return any value.

        my $return = Win32::GUI::MessageBox (
            0,
            'please fill in account name',
            'error',
            2
        );
        print $return; # prints nothing

Does anyone have a piece of code which displays a MessageBox with
Win32::API (and prints which button the user clicked)?

Thanks,
SteMue



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users


Reply via email to