Interesting.

Now I know what the problem is I can use a work around (create a child
window within the main window being the parent, then attach all controls to
the child :) )

In an ideal world it should be fixed - but I can see the logic for not doing
it.

In my case, I'm trying to convert my app to exclusively use NEM but keep
running into various problems - such as this one:) Most of my app is still
OEM...

Cheers,

jez.

----- Original Message ----- 
From: "Stephen Pick" <[EMAIL PROTECTED]>
To: "Win32 GUI Hackers (E-mail)"
<perl-win32-gui-hackers@lists.sourceforge.net>; "Jez White (E-mail)"
<[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 12:53 PM
Subject: [perl-win32-gui-hackers] Menus and NEM


Hello,

Looks like menus are indeed a little busted. You can't use both event models
on a menu. You can use either the NEM or the OEM, but you can't selectively
use NEM here and OEM there. If you add a menu to a window that is using the
NEM and your window uses OEM, your menu won't work. Your menu's event model
must match that of the window you're adding it into.

This is because menu commands are processed in their parent window's
wndproc, and the wndproc assigned to a window depends on the event model it
is using. A bit of bashing and hacking on my (and others) part could make
multi-event-model menus work properly, but I'd like to know if this
functionality is actually required by anyone. I mean, if you're a NEM user
you're going to use the NEM for everything, and if you're an OEM user you're
going to use the OEM for everything. So is there any point to allowing you
to mix and match in menus?

I'm inclined to believe "yes" just for flexibility, but if I discover that
it looks too annoying to implement I might change my mind to "no".

Steve


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=ick
_______________________________________________
Perl-Win32-GUI-Hackers mailing list
Perl-Win32-GUI-Hackers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers


Reply via email to