How do I reference a UserControl from its subclassing module?
• You must create a reference to the object. There is a KB article that shows how to do this. If you are subclassing the user control, the method they use to reference the object (storing the vtable object pointer in the GWL_USERDATA area of the user control) is fine. If you are subclassing something else, like the user control’s parent, then use the registry to store that info since something else might be stored in the GWL_USERDATA. Also, if you expose an hWnd to the parent, note that it is possible for the consumer to overwrite the GWL_USERDATA area. The article is: Q179398 – How to subclass a UserControl. • Also check out some of my republished articles. I use various control subclassing techniques in them.
Related Questions
- The question really is: how do you get a reference to the current app module (from the HttpServletRequest !request!?) in the struts action class?
- What is the canonical reference on widget (and GObject) subclassing and property overriding?
- How do I use an external temperature reference with a channel expansion module (CEM)?