• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

Add a item to a menu at runtime

the title says it all.

i'll use it for displaying the recent opened/saved files.

any ideas?

thanks
0
pin_plunder
Asked:
pin_plunder
1 Solution
 
VbmasterCommented:
How about adding one item and use the Load statement to load more items during run-time, this is the most used method for these kind of problems.

Create a menu item with index 0 and use Load mnuname(1).. Load mnuname(2) etc to load more items.
0
 
BeedleGuisCommented:
another option is to use a set number of recent files, and change the caption and visible property at run-time to control the names and how many are shown.
0
 
LordWizardCommented:
There is an Win API function that is AppendMenu that lets you insert a menu item on a menu. Thought this function needs that you supply it with the menu Handle. To get the menu handle you can use the GetMenu Win API function. This function will return you the handle. My advise is for you to get an Win API reference and see the help about these functions.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
pin_plunderAuthor Commented:
vbMasteer, i like your comment, post it as an answer and i'll give you the points.
0
 
mcriderCommented:
pin_plunder, you can select vbmasters comment as the selected answer without having him post again.  There is a clickable area for this on the "Comment" line...


Cheers!
0
 
VbmasterCommented:
null
0
 
pin_plunderAuthor Commented:
thanks vbmaster your help was useful.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now