Re: Message Reflection



"Steve Thresher" <steve.thresher@xxxxxxxxxxxxxx> wrote in message
news:eLuyi5CcFHA.3808@xxxxxxxxxxxxxxxxxxxx
Can anyone tell me how message reflection should be implemented or
point me at a reference on the topic. I am NOT using MFC. I am
attempting to custom draw a header control and need to know how to
get the WM_NOTIFY message from the parent control to my window
procedure for the header control. I can subclass the parent of the
header control when it is created but what happens when you destroy
the header control? The parent window is still sub-classed with no
way to work out the address for the parents original window procedure.

Any help would be greatly appreciated.

Steve.

I am puzzled by your question. When you subclass a window procedure, the address of the original window procedure is received as the return value of SetWindowLong. You need this address so you can call the original window procedure for those messages you don't choose to process.


You can choose to remove the subclass when you destroy the header control for the sake of a slight efficiency gain, but it should continue to work if you just leave it there unless you have written it in some strange way.

--
John Carson


.



Relevant Pages

  • Re: Message Reflection
    ... I am attempting to custom draw a header control and need to know how to get the WM_NOTIFY message from the parent control to my window procedure for the header control. ... The parent window is still sub-classed with no way to work out the address for the parents original window procedure. ... You can choose to remove the subclass when you destroy the header control for the sake of a slight efficiency gain, but it should continue to work if you just leave it there unless you have written it in some strange way. ...
    (microsoft.public.win32.programmer.ui)
  • Message Reflection
    ... Can anyone tell me how message reflection should be implemented or point me ... the parent control to my window procedure for the header control. ...
    (microsoft.public.win32.programmer.ui)
  • How to use different imagelist in header control and CListView?
    ... Later I found that the imagelist of the header control is changed to the one ... I set for the CListView. ... the Header control imagelist will be set to the same as its parent ... CListCtrl. ...
    (microsoft.public.vc.mfc)

Loading