patch 9.1.1347: small problems with gui_w32.c

Problem:  small problems with gui_w32.c
Solution: fix compile warnings and refactor code (John Marriott)

Compiler (clang v20.1.3) warnings on `_OnMenuSelect()` and
`_OnGetDpiScaledSize()`:
```
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601
-DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -Wall -Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Wstrict-prototypes
-Wmissing-prototypes -Wno-deprecated-declarations
-Wno-error=missing-field-initializers -Werror=uninitialized
-Wunused-but-set-variable -DEXITFREE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
gui_w32.c -o gobjx86-64/gui_w32.o
gui_w32.c:5038:55: warning: comparison of integers of different signs:
'UINT' (aka 'unsigned int') and 'int' [-Wsign-compare]
 5038 |                 && GetMenuState(s_menuBar, pMenu->id, MF_BYCOMMAND) != -1)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
gui_w32.c:5054:26: warning: unused parameter 'hwnd' [-Wunused-parameter]
 5054 | _OnGetDpiScaledSize(HWND hwnd, UINT dpi, SIZE *size)
      |                          ^
2 warnings generated.
```

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>
diff --git a/src/version.c b/src/version.c
index c4db34a..b805d70 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1347,
+/**/
     1346,
 /**/
     1345,