I've changed on Key code processing to do this automatically, so, it will simply work transparently from Marek's code POV.gfilatov wrote: The Marek's sample works fine after these changes:It seems that Windows API EndMenu() function is notCode: Select all
... On Key ESCAPE OF Second Action ( IIF(Empty(EndMenu()), NIL, Second.Release) ) ...
available at the Win9x
But, there is some bad news...
In fact, there is another problem exposed by Marek's code. This problem is not related with menu or On Key processing.
The problem is the following: If you call a Msg* function, exiting from the dialog with Esc. and your attempts to close Msg* parent via 'Release' method immediately after this, the 'Release' method fails with no error message, it is simply ignored. I'm working on that.
Regarding availability of EndMenu() in 9x, you could try WM_CANCELMODE message (http://msdn.microsoft.com/en-us/library ... S.85).aspx)
Anyway, I guess that it's time to drop Win9x support for future HMG versions. Win9x machines are near to the end of its lives.