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

Function GetMenuControl

win/win32/mhmenu.c:946–963  ·  view source on GitHub ↗

-----------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

944}
945/*-----------------------------------------------------------------------------*/
946HWND
947GetMenuControl(HWND hWnd)
948{
949 PNHMenuWindow data;
950
951 data = (PNHMenuWindow) GetWindowLongPtr(hWnd, GWLP_USERDATA);
952
953 /* We may continue getting window messages after a window's WM_DESTROY is
954 called. We need to handle the case that USERDATA has been freed. */
955 if (data == NULL)
956 return NULL;
957
958 if (data->type == MENU_TYPE_TEXT) {
959 return GetDlgItem(hWnd, IDC_MENU_TEXT);
960 } else {
961 return GetDlgItem(hWnd, IDC_MENU_LIST);
962 }
963}
964/*-----------------------------------------------------------------------------*/
965BOOL
966onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)

Callers 5

MenuWndProcFunction · 0.70
onMSNHCommandFunction · 0.70
LayoutMenuFunction · 0.70
onMeasureItemFunction · 0.70
mswin_menu_window_sizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected