Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Win32 GUI new version flag issues

by petecm99 (Pilgrim)
on Sep 29, 2010 at 20:36 UTC ( [id://862696]=perlquestion: print w/replies, xml ) Need Help??

petecm99 has asked for the wisdom of the Perl Monks concerning the following question:

Pious monks,

I recently retrieved the new version of Win32::GUI. As well as now requiring me to include parentheses in the Use statement use Win32::GUI(); it appears I can no longer use such flags as MB_OK and WS_VSCROLL.

Through trial and error, I found that the numeric equivalent of MB_OK equals 0. However, I don't want to guess at the values for all of these defunct words - is there a page in CPAN that shows what numeric values all of the deprecated flags equate to? I did a search under Win32::GUI and FAQ but came up empty.

Frankly, I don't even know how these flags worked in the previous version as they're obviously not scalars - don't really care though as long as I can find the numeric substitutes...

Thanks,
Pete

Replies are listed 'Best First'.
Re: Win32 GUI new version flag issues
by ikegami (Patriarch) on Sep 29, 2010 at 21:02 UTC
    "From v1.04 the support for constants is provided by Win32::GUI::Constants"
      Thanks for that! Simply including the Constants module did not solve the syntax error, but at least you got me looking in the right direction. Ended up 'importing' the one I needed -

      my $ws_vscroll = Win32::GUI::Constants::constant('WS_VSCROLL');
        If you know which tags you want, just import them at the use line: use Win32::GUI::Constants qw/WS_VSCROLL MB_OK/;

        Alternatively, you can also import the compatibility tags from the older version of Win32::GUI: use Win32::GUI::Constants qw/:compatibility_win32_gui/;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://862696]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2025-12-08 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (87 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.