This commit contains the following changes:
- Fixes Warning 1:
The prototype of `GetMenuState()` says that it returns a UINT, but
returns -1 on failure. Huh?!?
Also, Microsoft says that this function has been superseded (see
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmenustate)
and replaced by `GetMenuItemInfo()`. Both of these functions have a
minimum support of Windows 2000.
Therefore in `_OnMenuSelect()`, replace the call to `GetMenuState()`
with `GetMenuItemInfo()`.
- Fixes Warning 2:
Add `UNUSED` to the definition of `_OnGetDpiScaledSize()`.
- Simplify `logfont2name()`.
- Add small optimisations in `_OnNotify()` and `gui_mch_do_spawn()`.
- Add out-of-memory check in `gui_mch_do_spawn()`.
- Code cosmetics (see definitions of `process_message_usual_key_classic()`
and `process_message()`).
closes: #17208
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>