On Tue Oct 31 17:26:14 2023 +0000, Jacek Caban wrote:
Those enum values are made up and not compatible with Windows. Unlike for ntdll, win32u interface is not stable even on Windows and varies between versions, so there is not much point in trying too hard to be compatible. (Still, if the interface is easy to deduce, it's nice to stay compatible, but `NtUserCallHwndParam is not such case). See a comment in `WIN_SetStyle` for why I considered `NtUserSetWindowStyle` to be temporary: `FIXME: Use SetWindowLong or move callers to win32u instead.`. However, I wonder if we could have some some nicer interface for real classes that doesn't need exposing `wine_real_class_id` enum. Maybe we could have separated `NtUserMessageCall` entries for builtin controls and use that from their window procs (at least for `WM_NCCREATE`). We already have such entry for scroll bars.
@jacek Would the following make sense to you?
1. Define new NtUserMessgae call type for USER32 controls, under "Wine-specific exports." The next unoccupied ID is `0x0306`. 2. In each USER32 winproc, invoke NtUserMessageCall in place of NtUserSetRealClassId. (Ideally all handling code could be moved to win32u, but I don't believe that's strictly necessary.) 3. In NtUserMessageCall, switch on the call kind and dispatch to appropriate (existing or newly defined) win32u winproc functions. 4. In each of the win32u winproc functions, call `set_real_window_class_id` (which is no longer made extern).