Jump to content
Returning Members: Password Reset Required ×

Closing game interfaces with ESC key — UI (inventory, guild, Arena, etc.) 5517v


Recommended Posts

Posted

Hey,

I'm building a DLL overlay for v5517 and trying to make ESC close game interfaces (inventory, guild, status, etc.) — similar to how the v6609 client does it natively.

What works:

ESC closes my own ImGui panels

ESC passes through to the game's native handler — closes warehouse, shops, and other windows that already support ESC

What doesn't work:

Inventory, guild, and other custom-rendered windows don't respond to ESC at all

What I've tried:

  • PostMessage(hwnd, WM_CLOSE, 0, 0) on the game windows (codes 153, 137, 233, etc.)
  • PostMessage(hwnd, SC_CLOSE, 0, 0)
  • EnumChildWindows to find and click small top-right close buttons (simulated WM_LBUTTONDOWN / WM_LBUTTONUP)
  • WM_CLOSE on the parent HWND from GetWnd

None of these do anything — the game's UI is custom-rendered on DirectX, not standard Win32 controls. There are no real child close buttons to click.

My question: Is there a known way to close these custom interfaces from the DLL side? For example, is there a game function or flag that the client uses internally when you click the X on those windows? Or is the only option to find and call the same function the game uses?

Thanks in advance.

Posted

Solved

 

The solution is simpler than expected: get the HWND via GameGetHWND(dialogCode) (the game function at 0x597FC3 returns a pointer, HWND is at offset +0x20), then just ShowWindow(h, SW_HIDE). That's it — same as what the game does internally to hide them.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...