MCPcopy Create free account
hub / github.com/NetHack/NetHack / mswin_start_menu

Function mswin_start_menu

win/win32/mswproc.c:1095–1112  ·  view source on GitHub ↗

Start using window as a menu. You must call start_menu() before add_menu(). After calling start_menu() you may not putstr() to the window. Only windows of type NHW_MENU may be used for menus. */

Source from the content-addressed store, hash-verified

1093 be used for menus.
1094*/
1095void
1096mswin_start_menu(winid wid, unsigned long mbehavior)
1097{
1098 logDebug("mswin_start_menu(%d, %lu)\n", wid, mbehavior);
1099 if ((wid >= 0) && (wid < MAXWINDOWS)) {
1100 if (GetNHApp()->windowlist[wid].win == NULL
1101 && GetNHApp()->windowlist[wid].type == NHW_MENU) {
1102 GetNHApp()->windowlist[wid].win =
1103 mswin_init_menu_window(MENU_TYPE_MENU);
1104 GetNHApp()->windowlist[wid].dead = 0;
1105 }
1106
1107 if (GetNHApp()->windowlist[wid].win != NULL) {
1108 SendMessage(GetNHApp()->windowlist[wid].win, WM_MSNH_COMMAND,
1109 (WPARAM) MSNH_MSG_STARTMENU, (LPARAM) NULL);
1110 }
1111 }
1112}
1113
1114/*
1115add_menu(windid window, const glyph_info *glyphinfo,

Callers

nothing calls this directly

Calls 3

logDebugFunction · 0.70
GetNHAppFunction · 0.70
mswin_init_menu_windowFunction · 0.70

Tested by

no test coverage detected