Best method for storing this pointer for use in WndProc

前端 未结 10 812
南旧
南旧 2020-11-29 20:06

I\'m interested to know the best / common way of storing a this pointer for use in the WndProc. I know of several approaches, but each as I underst

10条回答
  •  自闭症患者
    2020-11-29 20:19

    ATL's thunk is the most efficent. the thunk executes once and replaces the callback function for the WINPROC to the classes own message processing member function. subsiquent messages are passed by a direct call to the classes member function by windows. it doesnt get any faster than that.

提交回复
热议问题