Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

ADD MENUBAR

ADD MENUBAR <oMnu> CAPTION <cCaption> OF <oWnd>

Creates a menu associated with a historical window.

ADD MENUBARAdvPL
01 · OVERVIEW

Overview

Historical eAdvpl reference, §3.4, p. 11. Syntax depends on that environment’s definitions; it does not establish compatibility with every current Protheus include. Menu items are added in a later step. The OF window must already exist. Creating visual structure does not grant permission to execute actions; the application must validate operations at execution time. (Guia de referência eAdvpl, s.d., ref. 1)

02 · SYNTAX

Syntax

ADD MENUBAR <oMnu> CAPTION <cCaption> OF <oWnd>

Parameters

oMnu
ObjectRequired

Variable for the created menu.

cCaption
CharacterRequired

Menu text.

oWnd
ObjectRequired

Owning window.

Return value

No business return value is documented for this interface operation.

03 · PRACTICAL EXAMPLE

Commented example

// Historical fragment: oDlg already exists.
Local oMnu
ADD MENUBAR oMnu CAPTION "Inquiries" OF oDlg
// Add items before activating the window.
Expected result

Proposes a menu structure without items or actions. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Group items by task and use clear labels. Check the environment before reusing legacy macros.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Guia de referência eAdvpl. §3.4, p. 11. Referência histórica; autoria e compatibilidade atual não confirmadas. Accessed on 2026-10-25.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha