Advantage of setting window data on WM_CREATE

382 views Asked by At

According to Microsoft's docs, the way to set custom Window data is to pass it through the lpParam argument of CreateWindowEx, retrieve it within the window procedure on WM_CREATE, and then set it using SetWindowLongPtr. I was wondering why you'd do that, instead of just setting it after calling CreateWindowEx, when you already have the window handle. Thanks for any guidance, and sorry if this is a basic question.

0

There are 0 answers