Page 1 of 1

PostPosted: Mon Jun 30, 2003 12:41 pm
by andyp
For the first time I'm trying to add a menu to an app. I've created the rcp file and ran PilRC to create the bin file from it. I've embedded that bin file into my prc file with par. I try to display the menu doing
I checked the app with RsrcEdit and the menu is there, but it still crashes as soon as I start the app.

I also tried to, instead of embedding it in the app, load it with OpenRsrcDb(), but the app still crashes.

Does anybody have any ideas?

Thnx for your help,


PostPosted: Mon Jun 30, 2003 2:10 pm
by jstadolnik
The Fctl LOAD command only works on forms. You need to bind a menu to a form to see it.

There are two ways of doing this:

1) Create a resource form with PilRC (or RsrcEdit) and use the MENUID tag to bind a menu to a form (see the FORM tag in the PilRC manual). Note: Many forms can share the same menu.

Then just LOAD and DRAW the form.

2) Create a dynamic form with the Form() function, then use SETMENU Fctl command to bind any menu to that form.

Then just DRAW the form.

Note: You can also use SETMENU on a resource form to change it's menu.


The PToolboxLib guy.