Can't get this one solved:
This is a code snippet to demonstrate the effect. Whatever I've tried, the menu is not responding to ALT+F when the dialog owns no other controls. As soon as you add a command button everything works as expected.
I won't use the "b-word", but this seems to be at least an undocumented feature
Knuth
This is a code snippet to demonstrate the effect. Whatever I've tried, the menu is not responding to ALT+F when the dialog owns no other controls. As soon as you add a command button everything works as expected.
I won't use the "b-word", but this seems to be at least an undocumented feature

Knuth
Code:
#COMPILE EXE #REGISTER NONE #INCLUDE "DDT.INC" %MNU_FILE_EXIT = 102 FUNCTION PbMain LOCAL hDlg AS LONG 'Dialog handle LOCAL hMnu AS LONG LOCAL hmnuFile AS LONG DIALOG NEW 0, "Menu Test", , , 470, 280, , TO hDlg '** When uncommenting the line below, the menu works as expected... 'CONTROL ADD BUTTON, hDlg, 1, "Testbutton", 10, 10, 80, 20 IF hDlg = 0 THEN EXIT FUNCTION ' Error occurred 'Add the menu MENU NEW BAR TO hMnu MENU NEW POPUP TO hmnuFile MENU ADD STRING, hmnuFile, "E&xit", %MNU_FILE_EXIT, %MF_ENABLED MENU ADD POPUP, hMnu, "&File", hmnuFile, %MF_ENABLED MENU ATTACH hMnu, hDlg DIALOG SHOW MODAL hDlg 'Success PbMain = 0 END FUNCTION
Comment