Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: How to Resize a Window in M$ Windows?

by kejohm (Hermit)
on Feb 11, 2011 at 04:42 UTC ( [id://887567]=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to Resize a Window in M$ Windows?
in thread How to Resize a Window in M$ Windows?

After looking at the Win32::GUI source, I found that the object constructor does tie the hash object before blessing it. You notice this when you dump the contents of a window object:

$ perl -MWin32::GUI -MData::Dump=dump -e "dump Win32::GUI::Window->new +();" bless({ # tied Win32::GUI::Window -accel => 0, -handle => 460108, -name => "#3698ef4", -type => 0, }, "Win32::GUI::Window")

Apparently, according to the source, it is needed to "get/set properties in a more fashionable way", whatever that means :)

Even some of Win32::GUI's own methods only return handles, rather than objects. For example, the Win32::GUI::DC methods CreateDC(), and GetDC(), as well as methods that return some kind of resource, such as a menu, icon, image list, etc.

I would say that, in most instances, you can get away with creating your own objects, but if your code doesn't run how it should, they could be the source of the problem.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-25 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found