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. */
| 1093 | be used for menus. |
| 1094 | */ |
| 1095 | void |
| 1096 | mswin_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 | /* |
| 1115 | add_menu(windid window, const glyph_info *glyphinfo, |
nothing calls this directly
no test coverage detected