|
From: Paul F. <sha...@ro...> - 2013-02-17 06:22:20
|
How do I get a window's Win32::GUI::Menu object?
I have a function that has the main window handle in a local variable ($Window). I want to disable one of the items in this window's menu.
Initially, I thought this would be easy, but:
$Window->GetMenu();
returns a menu HANDLE, not an
object reference. This doesn't seem to help me -- 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);
Which used to work according to a VERY old message from this list (http://www.mail-archive.com/per...@li.../msg00945.html). Unfortunately, the current version of Win32::GUI doesn't appear to recognize $Window->Menu
Thx,
- PF
|