PDA

View Full Version : bug in menu code


Ron Laird
12-20-2006, 04:38 AM
The menu code generates like this:

m5000$ = NewMenu(FORM100$, "File", 5000);
NewMenuItem(, -1, "Exit", 5001);
AddEvent(NULL, WM_COMMAND, 5001, &Menu5001_OnClick);

When changed it changes back leaving out value 1 in newmenuitem

m5000$ = NewMenu(FORM100$, "File", 5000);
NewMenuItem(m5000$, -1, "Exit", 5001);
AddEvent(NULL, WM_COMMAND, 5001, &Menu5001_OnClick);

It appears that when orginally generated it is fine. Once I tried to add a new menu item it continually resets as wrong.

Ron

Ron Laird
12-20-2006, 04:47 AM
It appears that my project is now very dead. The frm ppl source continues to regenerate with the missing parameter. I even tried removing the FILE menu item and that doesn't help.

kornalius
12-20-2006, 12:55 PM
Please attach your .frm file as a .zip file and I will take a quick look and get back to you.

kornalius
12-20-2006, 01:28 PM
Got it, your menu item Exit is too far to the right, use the < and > arrows to move the menu back to left by 1 notch. The menu has to be inside the File menu and not too far to the right.

kornalius
12-20-2006, 01:30 PM
The indenting in the menu items is important. I will try to have the menu editor not allow to go one extra level to the right.

Ron Laird
12-21-2006, 05:12 AM
Thansk, I will try this out tomorrow.

Ron

Ron Laird
12-21-2006, 04:26 PM
I fixed the indent and it will run now. That was very well hidden. Good Job tracking that one down.