Re: Reflection problem when changing parent window



"Doru K" <dorutzu.teste@xxxxxxx> wrote in message
news:1124285419.853080.139980@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> And that means...?

It means just what it says: when it gets the (probably) WM_CREATE message it
copies the LPCREATESTRUCT->hwndParent member to its internal instance data
and then uses that HWND for all WM_NOTIFY messages for the rest of its
lifetime.

>
> I think besides the SetParent method, I should call another method or
> something, but I just can't figure out what.

There's the CCM_SETNOTIFYWINDOW message, but I suspect it is ignored. Then
as an untested hack, you could try intercepting WM_CREATE in your subclass
and setting...

((LPCREATESTRUCT)lParam)->hwndParent = (HWND)-1;

....before forwarding it on to the base. If that doesn't work (and it
probably won't), then I'm out of ideas.

--
Jeff Partch [VC++ MVP]


.