[futurebasic] Re: [FB] Hierarchical menus from a resource file

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2010 : Group Archive : Group : All Groups

From: Steve <mactech@...>
Date: Fri, 05 Nov 2010 13:07:53 -0400
I do it just like this shown below, in that order.

Is that reinstalling it?  This code is ancient, circa 2004 and it always just worked.

>> Menu _mColor,_resSubMenu,_enable
>> 
>> fn MakeHierMenu( _mDocument, 2, "Color", _mColor )

I can make the menus programmatically, which work fine but there are over 30 menus in the resource file

Some of the menu resources are set into contextual menus as hierarchical and they too don't don't function any longer

i will see if your code below works

thanks

On Nov 5, 2010, at 12:42 PM, Robert Covington wrote:

> I don't see why that doesn't work.  You aren't calling fn MakeHierMenu after that are you? Re-installing it? As long as you have the parent menu ID set up in the resource the one linser should install it.
> 
> The below works for non-resource menus. But  Menu _mColor,_resSubMenu,_enable by itself  should work to install the menu? Then you just append items as usual?
> 
> local mode
> local fn InstallNoResHierMenu ( parentMenu, parentItem, childMenu )
> 
> long if fn SetMenuItemHierarchicalID( fn GetMenuHandle(parentMenu), parentItem, childMenu ) = _noErr
> InsertMenu(Fn NewMenu(childMenu,""), -1)
> end if
> 
> end fn
> 
> Example..
> 
> fn InstallNoResHierMenu ( _FileMenu,_fOpenRecentItem,  _OpenRecentMenu )
> 
> rc
> 
> On Nov 5, 2010, at 11:06 AM, Steve wrote:
> 
>> In FB4, I used the statement below to create a hierarchical menu from a resource file.
>> 
>> This syntax no longer works.   The resource is included in the project and I have access to it and can create menu buttons from a menu resource file without any issue.
>> 
>> _mColor = 1104 ' resource of menu
>> 
>> Menu _mColor,_resSubMenu,_enable
>> 
>> fn MakeHierMenu( _mDocument, 2, "Color", _mColor )
>> 
>> 
>> Is there a fix for this besides using a NIB based menu [ which I plan on doing but there are a lot of menus to redo ] ?
>> 
>> 
>> tia
>> 
>> ~ steve
>> 
>> --
>> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
>> 
> 
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
>