---
name: "menu_post"
section: "3x"
platform: "macos"
package: "ncurses"
version: "79"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/menu_post/3x"
---

# menu\_post(3x)

write or erase menus from associated subwindows

## NAME

**menu\_post** - write or erase menus from associated subwindows

## SYNOPSIS

**#include \<menu.h\>**\
 int post\_menu(MENU \*menu);\
 int unpost\_menu(MENU \*menu);\

## DESCRIPTION

The function **post\_menu** displays a menu to its associated subwindow.  To trigger physical display of the subwindow, use **refresh** or some equivalent **curses** routine (the implicit **doupdate** triggered by an **curses** input request will do). **post\_menu** resets the selection status of all items.

The function **unpost\_menu** erases menu from its associated subwindow.

## RETURN VALUE

These routines return one of the following:

- **E\_OK**

  The routine succeeded.

- **E\_SYSTEM\_ERROR**

  System error occurred (see **errno**).

- **E\_BAD\_ARGUMENT**

  Routine detected an incorrect or out-of-range argument.

- **E\_POSTED**

  The menu has already been posted.

- **E\_BAD\_STATE**

  Routine was called from an initialization or termination function.

- **E\_NO\_ROOM**

  Menu is too large for its window. You should consider to use **set\_menu\_format()** to solve the problem.

- **E\_NOT\_POSTED**

  The menu has not been posted.

- **E\_NOT\_CONNECTED**

  No items are connected to the menu.

## SEE ALSO

**curses**(3X), **menu**(3X).

## NOTES

The header file **\<menu.h\>** automatically includes the header file **\<curses.h\>**.

## PORTABILITY

These routines emulate the System V menu library.  They were not supported on Version 7 or BSD versions.

## AUTHORS

Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S. Raymond.
