|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
How to get a window's menu as a Win32::GUI::Menu object?by shadrack (Initiate) |
| on Feb 17, 2013 at 03:44 UTC ( #1019097=perlquestion: print w/ replies, xml ) | Need Help?? |
|
shadrack has asked for the
wisdom of the Perl Monks concerning the following question:
How do I get a window's Win32::GUI::Menu object given the window object (let's say it's in the variable $Window)?
$Window->GetMenu();returns a menu HANDLE, not an object reference. This seems to be more or less useless -- unless there's a way to turn the handle into an object?
$Window->{-menu}
returns nothing. Ultimately what I'm trying to accomplish is something like:
$Window->Menu->{'MyMenuItem'}->Enabled(0);
Google indicates this actually worked at one time, but apparently Win32::GUI has changed enough since then that the current version doesn't allow that.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||