For reference, I use the window superclass method described in this article. A specific problem arises if I want to process messages WM_NOTIFY(i.e. for a custom drawing) from a basic control in a superclass. I either have to flip them back from the parent window, or set my own window as the parent (passed inside CREATESTRUCT for WM_(NC)CREATEto the base class). This method works fine if I have one superclass. If I am a superclass my superclass, then I ran into a problem. Now 3 WindowProcs work in the same HWND, and when I reflect messagesWM_NOTIFY(or they are sent to me from the parent trick above), they always go to the most remote (most derived) WindowProc. I can’t say whether they are messages intended for an internal superclass (basic messages should go to the first superclass) or messages intended for an external superclass (messages from an internal superclass are for an external superclass). These messages are indistinguishable because they all come from the same HWND with the same control identifier. Is there a way to resolve this without creating a new window to encapsulate each level of inheritance?
Sorry for the text wall. This is a complex concept to explain. Here is a chart.
single superclass:
SuperA :: WindowProc () -> Base :: WindowProc () --- \
^ -------- WM_NOTIFY (Base) -------- /superclass of a superclass class:
SuperB::WindowProc() -> SuperA::WindowProc() -> Base::WindowProc()---\
^--------WM_NOTIFY(Base)--------+-----------------------/
^--------WM_NOTIFY(A)-----------/WM_NOTIFY HWND , , SuperA ( Base), , SuperB ( SuperA). ?
DasMonkeyman