Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7440231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:49:12+00:00 2026-05-29T10:49:12+00:00

I have a Windows application written in Progress. I’m working with version 10.1C. I

  • 0

I have a Windows application written in Progress. I’m working with version 10.1C. I would like to add MRU functionality to the menu, i.e. I want to add, remove and modify menu items in the application’s File menu, to show the user’s most recent files in the order in which they were used. I’ve done this often enough in a number of other languages, it’s a pretty common feature and very easy to do.

But how would one do this in Progress? In another language I could have created 10 menu items and simply made the unused ones invisible, but you can’t do that in Progress. I can’t imagine why.

Alternatively, I should be able to dynamically create menu items as needed and add them to the end of the MRU list in the File menu, but I can’t seem do that either: Firstly, I can’t specify where in the File menu the item must be added, it always adds it to the bottom, and secondly, I can’t add dynamic menus to static menus, so I can’t add my MRU menus to the existing File menu. I can do it if I make the whole File menu dynamic (which I really don’t want to do), but then I can’t add the dynamic File menu to the static menu bar. This leaves me with the unacceptable option of making the entire menu structure dynamic.

Does anybody have any ideas?


Using Ade’s answer below, here is a brief example of how I achieved it. Changing the labels and values of the MRU items doesn’t require any fiddling, just set the appropriate attributes, but in order to add new MRU items, I have to remove and recreate the Exit menu item:

/* Remove the RULE and Exit menu items */
IF VALID-HANDLE(ghMenuRule) THEN DELETE OBJECT ghMenuRule.
IF VALID-HANDLE(ghMenuExit) THEN DELETE OBJECT ghMenuExit.

/*

...
Coding to add MRU items.
...

*/


/* Create the RULE and Exit menu items */
CREATE MENU-ITEM ghMenuRule
  ASSIGN
    SUBTYPE = "RULE"
    PARENT    = MENU m_File:HANDLE IN MENU MENU-BAR-C-Win.

CREATE MENU-ITEM ghMenuExit
  ASSIGN
    PARENT    = MENU m_File:HANDLE IN MENU MENU-BAR-C-Win
    LABEL     = "E&xit"
  TRIGGERS:
      ON CHOOSE PERSISTENT RUN ExitApp IN THIS-PROCEDURE.
  END TRIGGERS.

The actual MRU items are created just like the Exit menu is created here, except that I store the handles in a temp-table.

The result is a menu like this:

        File
          New
          Open
          --------
          Print Setup
          Print
          --------
          1 Mru item 
          2 Mru Item
          3 Mru Item
          --------
          Exit
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:49:13+00:00Added an answer on May 29, 2026 at 10:49 am

    create a static menu MENU-BAR-C-Win.

    add static sub-menu “File” m_file.

    add static menu-item (use “>>”) “Exit” (m_Exit) to m_file.

    define….
    DEFINE VARIABLE hMRU#1 AS HANDLE NO-UNDO.

    create a button to dynamically…

      CREATE MENU-ITEM hMRU#1
      ASSIGN
        PARENT    = MENU m_File:HANDLE IN MENU MENU-BAR-C-Win
        LABEL     = "MRU#1"
      TRIGGERS:
          ON CHOOSE PERSISTENT RUN SomeThing IN THIS-PROCEDURE.
      END TRIGGERS.
    

    you’ll want to keep track of your handles (temp-table?) some how.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an game application I have written for Windows Mobile and I want
I have a Windows console application written in C++ and want to hide/remove the
I have windows form application written in VC ++ . I want to change
I have a Windows application written in C++ that occasionally evaporates. I use the
We have a Windows desktop application written in Delphi that works fine on Windows
Assume i have a custom Windows application written in C#. This application has only
I'm creating a Windows Console application written in VB.NET and I have a few
I have a Windows Workflow application that uses classes I've written for COM automation.
We have a business application written for Windows mobile. It has people doing inventories.
I have written a C# Windows Forms application to merge the files and folders

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.