Hi all
Thanks for the tips. I have derived my own class from CToolBar and
overridden its WindowProc. That works in any case. (Is that what Joe meant?)
But then Ajay had a point too. Indeed, when I tried his suggestion, it
worked! It hadn't occurred to me that MFC's message-routing mechanism would
take care of it automatically. It just meant manually adding the message map
entry and handler as the wizard didn't recognise this event in this context.
Thanks one and all!
Peter
Quote:
> Is there any (legal) way of subclassing a window that is attached to a
> (CWnd-derived) MFC object?
> I was hoping to subclass a toolbar control (based on CToolbar and embedded
> in a CFrameWnd) in order to intercept notification messages from a child
> ComboBox, but evidently the mechanism provided by CWnd::SubclassWindow
does
> not allow for subclassing a window that is already attached to an MFC
> object.
> Is this definitely impossible, or is there another way? If subclassing is
> not possible, is there another recommended approach (in MFC context) to
> picking up the notification messages from a ComboBox (or any other child
> control) sitting on a toolbar?
> Thanks
> Peter