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

Function onCreate

win/win32/mhmsgwnd.c:717–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715}
716
717void
718onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
719{
720 PNHMessageWindow data;
721 SIZE dummy;
722
723 UNREFERENCED_PARAMETER(wParam);
724 UNREFERENCED_PARAMETER(lParam);
725
726 /* set window data */
727 data = (PNHMessageWindow) malloc(sizeof(NHMessageWindow));
728 if (!data)
729 panic("out of memory");
730 ZeroMemory(data, sizeof(NHMessageWindow));
731 data->max_text = MAXWINDOWTEXT;
732 SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) data);
733 windowdata[NHW_MESSAGE].address = (genericptr_t) data; // for cleanup at the end
734
735 /* re-calculate window size (+ font size) */
736 mswin_message_window_size(hWnd, &dummy);
737}
738
739void
740mswin_message_window_size(HWND hWnd, LPSIZE sz)

Callers 1

NHMessageWndProcFunction · 0.70

Calls 2

panicFunction · 0.50

Tested by

no test coverage detected