On Wed Nov 1 15:47:54 2023 +0000, Jinoh Kang wrote:
I don't mean to do that for all cases, but using
`StaticWndProc_common` as an example, we could just replace `DefWindowProc*` calls in case of `WM_NCCREATE` with `NtUserMessageCall`. I see. However, note that static control winproc sets the real class for *all* messages instead of just `WM_NCCREATE` (see `class_tests` in user32:class from this MR), and `WM_CREATE` doesn't call `DefWindowProc` at all. I guess it doesn't work with a single substitution unless the code is cleaned up.
Well, at least in this case, we could avoid calling `NtUserMessageCall` at the start of the procedure if the message is `WM_NCCREATE`, and then call it at the end of the `WM_NCCREATE` switch case instead of: ``` return unicode ? DefWindowProcW(hwnd, uMsg, wParam, lParam) : DefWindowProcA(hwnd, uMsg, wParam, lParam); ``` which would avoid a double call to `NtUserMessageCall` I presume.