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

Function mswin_popup_destroy

win/win32/mswproc.c:2311–2344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2309}
2310
2311void
2312mswin_popup_destroy(HWND hWnd)
2313{
2314 HWND hChild;
2315 HMENU hMenu;
2316 int mi_count;
2317 int i;
2318
2319 /* enable game windows */
2320 for (hChild = GetWindow(GetNHApp()->hMainWnd, GW_CHILD); hChild;
2321 hChild = GetWindow(hChild, GW_HWNDNEXT)) {
2322 if (hChild != hWnd) {
2323 EnableWindow(hChild, TRUE);
2324 }
2325 }
2326
2327 /* enable menu */
2328 hMenu = GetMenu(GetNHApp()->hMainWnd);
2329 mi_count = GetMenuItemCount(hMenu);
2330 for (i = 0; i < mi_count; i++) {
2331 EnableMenuItem(hMenu, i, MF_BYPOSITION | MF_ENABLED);
2332 }
2333 DrawMenuBar(GetNHApp()->hMainWnd);
2334
2335 /* Don't hide the permanent inventory window ... leave it showing */
2336 if (!iflags.perm_invent || mswin_winid_from_handle(hWnd) != WIN_INVEN)
2337 ShowWindow(hWnd, SW_HIDE);
2338
2339 GetNHApp()->hPopupWnd = NULL;
2340
2341 mswin_layout_main_window(hWnd);
2342
2343 SetFocus(GetNHApp()->hMainWnd);
2344}
2345
2346#ifdef DEBUG
2347# ifdef _DEBUG

Callers 2

Calls 3

GetNHAppFunction · 0.70
mswin_winid_from_handleFunction · 0.70
mswin_layout_main_windowFunction · 0.70

Tested by

no test coverage detected