[futurebasic] Re: [FB] Ext menu name

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2001 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Tue, 11 Dec 2001 15:59:45 +0100
Bernie Wylde wrote:
> 
> Any ideas how I can get a menu name from an ext file's menu resource?
> 
> I've tried the following without success:
> 
> extResfileRef = fn openrfperm(fName$, fVol, _fsRdPerm)
> long if extResFileRef <> -1
>     menuCount = FN COUNT1RESOURCES (_"MENU")
>         FOR m = 1 to menuCount
>             menuH = FN GET1INDRESOURCE (_"MENU", m)
>             LONG IF menuH
>                 GETRESINFO (menuH, rsrcnum%, rsrctype&, rsrcname$)
>                 long if rsrcnum% = 600
> 
>                     /*
>                     I tried this toolbox call but it only works on
>                     local menu items, not external menu names.
>                     */
> 
>                     GetMenuItemText (menuH, 0, gMenuName$)
> 
>                 end if
>             end if
>         next m
>     closeresfile(extResFileRef)
> end if
> 
> TIA
> Bernie
> 
Bernie,

menu items are numbered from 1, it seems to me that you want to
retrieve the menu title, try this:

gMenuName$ = menuH..menuData$
-- 

Cheers

Alain

-----------------------------------------------------
FB^3 in Europe:  http://euro.futurebasic.com/
FB II Pouch:     http://www.pixmix.com/FB/outils.html
-----------------------------------------------------