Re: question about thunk

"tom_gee" <tom_gee-/[email protected]> Wed, 13 Apr 2011 03:46:07 -0000
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
Thanks for the prompt help.

I read the source code again, it's clear to me now that the thunk itself , not CWindowImplBaseT<>::WindowProc(), is set to be the wndproc of the window class by the following lines CWindowImplBaseT<>::StartWindowProc in :

WNDPROC pProc = (WNDPROC)&(pThis->m_thunk.thunk);
::SetWindowLong(hWnd, GWL_WNDPROC, (LONG)pProc);



--- In [email protected], "Igor Tandetnik" <itandetnik@...> wrote:
>
> tom_gee <tom_gee@...> wrote:
> > my question is, since the thunk only executes once per window object
> 
> This is not the case. The thunk is installed permanently as the window procedure.
> 
> > how is the substitution made permanently for the 2nd and
> > following hwnd passed in? although hwnd remains the same for each window, it has to be passed in again and again for each call of
> > wnd, right? what's wrong with my reasoning above? 
> 
> The premise.
> -- 
> Igor Tandetnik
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/