On Tue Oct 17 18:30:26 2023 +0000, Nikolay Sivov wrote:
I think this is the most important part. What you need to test is what happens if NCCREATE does not reach control procedure.
Well, the tricky thing here is, it's different for each control.
For instance, any message being passed to the user32 `Static` control window procedure (even `WM_NULL`) will cause its "real" class to be set. For controls like `Edit`, if you pass only `WM_NCCREATE` and not `WM_CREATE`, `RealGetWindowClass()` will actually trigger an access violation.
I'm not sure how important matching the details here is on every control. I feel like it's safe to assume `WM_CREATE` will be passed to each control. In cases like `Static`, there's probably some overhead associated with calling into win32u for each and every message. Maybe that's negligible, but it feels a bit wasteful to me.