Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP main menu

Status
Not open for further replies.

52501

Programmer
Oct 26, 2005
7
0
0
IT
Can I read the structure of vfp main menu?
The api function GetMenuItemInfo doesn't return the menu item propmt!!!
 
I must read the structure of main vfp menu with a dll (c++), I have to give menu a Office style and I want use a dll, but I can't read the menu structure because VFP doesn't use window standard menu. :0(

Thank you Mike for your help
 
I must read the structure of main vfp menu with a dll (c++), I have to give menu a Office style and I want use a dll, but I can't read the menu structure because VFP doesn't use window standard menu. :0(

The metadata for the VFP menu is stored in a table name <<menu name>>.mnx with an associated memo file called <<menu name>>.fpt. You shoould be able to access the metadata in the menu table using the OLEDB provider for Visual FoxPro.

If you have a copy of Visual FoxPro, you can print this report: 60MNX.frx. It describes the table structure of the mnx.

HTH


Marcia G. Akins
 
Hi there,
If you would like to use an office2007 style menu viz ribbon I would not reinvent the wheel but make use of exsisting code,
look for "Goran Zidar's (TabMenu)" at


Very good and easy to implent, provided you are working with VFP9

Regards,
Jockey(2)

jockey.gif
 
Unfortunately the table <<menu name>>.mnx doesn't exist if I use "define menu", "define bar", ect...
I would like to read the structure of menu that was already created.

Unfortunately, I think that what I should do is not possible with Visual FoxPro.

Many thanks to all

Ste
 
Unfortunately the table <<menu name>>.mnx doesn't exist if I use "define menu", "define bar", ect...
I would like to read the structure of menu that was already created.

I take that to mean that you are creating the menu in code, rather than using the menu designer.

If that's the case, then I don't see why you need to read the menu structure. Your approach should be to convert your existing code into whatever new style of menu you want to create.

By the way, if you are looking to create an Office 2007-style menu (essentially, a tabbed toolbar), I wrote an article on how to do that in FoxPro Advisor, October / November 2006 (see
Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi there #5201!
If you want to see how a menu is build in FoxPro, I would advise you to make one yourself: in the foxmainmenu select File -> new -> activate the radiobutton Menu -> click New -> select either menu or shortcut -> give some menu options and generate it (in the foxmainmenu select Menu with the menudesigner still open) look for generate.. generate it and save it as s myfirstmenu.mpr

Now you will be able to read the myfirstmenu.mpr with
Code:
modifycommand myfirstmenu.mpr
You will also be able to read the menu dbf myfirstmenu.mnx by means of
Code:
use myfirstmenu.mnx
(the *.mnx is actualy a normal VFP style dbf)
Hope this answers your questions.
Jockey(2)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top