benilla-re systems structs docs

s_d3dWindowCaseIndex

global · gx

Address
0x598b20 · 15 bytes, up to 0x598b2e
Type
uint8_t[15]
Meaning
Maps messages 1 to 0xf to the cases of 0x598750's switch
Confidence
verified, proof one
Finding
gx/window#direct3d-window-messages

Finding: Direct3D window messages in gx: window

0x598750(hwnd, msg, wParam, lParam) reads the device with GetWindowLongA(hwnd, GWL_USERDATA) and handles these messages. A message marked passed on, and every message not listed, goes to the procedure saved at the device's +0xf28 (hwnd and msg in ecx and edx, wParam and lParam on the stack) when there is a device and it is set, else to DefWindowProcA, and that result is returned.

messageactionreturns
WM_CREATE (1)stores the create parameter as the user data0
WM_DESTROY (2)event 20
WM_SIZE (5)event 0 with {0, 0, height, width}; type 1 for SIZE_MINIMIZED, 2 for SIZE_MAXHIDE, else 0passed on
WM_ACTIVATE (6)a full-screen device losing activation: event 0, a zero rectangle, type 1passed on
WM_SETFOCUS (7), WM_KILLFOCUS (8)events 3 and 40
WM_PAINT (0xf)BeginPaint and EndPaint0
WM_ERASEBKGND (0x14)nothing0
WM_SETCURSOR (0x20)over the client area of a device with an IDirect3DDevice9: the system cursor off, the device's shown (slots.md, Cursor)1
WM_DISPLAYCHANGE (0x7e)a full-screen device: event 1 with the new sizepassed on
WM_SYSCOMMAND (0x112)SC_SCREENSAVE (0xf140) and SC_MONITORPOWER (0xf170) swallowed0
WM_SIZING (0x214)Window sizing, below1

The derivation is in the doc.