|
Reported by Jordan Russell; checked by Reinier Sterkenburg, Odd Dahm Selen
Create a popup menu on a form, add some items to it, and assign the popup
menu to the form's PopupMenu property. On Windows NT 4.0 (probably 95 also),
run the program, and observe that popup menu is displayed correctly when you
right-click the form. Now go back to the popup menu and change the
MenuAnimation property (anything other than [] will do). Run the program
again, and observe that nothing happens when you right-click the form.
This happens because the TrackPopupMenu call which is supposed to display
the popup menu is failing with error code 1004 -- "Invalid flags". Why?
Because it includes the flags for animation even if the user isn't
running Windows 98 or 2000 (the only OSes which currently recognize those
flags). This behavior contradicts the documentation on MenuAnimation which
says:
"Note: MenuAnimation only has an effect when running on Windows 98, NT 5.0,
or later."
It certainly does have an effect on prior Windows versions -- the effect
being the menus entirely cease to function.
Yes, this bug was fixed in Delphi 5.01, but was reintroduced in Delphi 6. |