I am using a ctrlview class to display a control kinda like CTreeView. This is a doc/view and this is used in the view to access the functions of the control view
CCodeMaxCtrl& GetCodeMaxCtrl() const { return *(CCodeMaxCtrl*)this; }
The problem is using this for OnInitUpdate works fine but if I lose the focus and I want to access it later the "this" pointer is pointing at ??. I have tried creating member variables and try to assign the value to it but it will not keep the pointer. How can I get access to this control view.
CCodeMaxCtrl& GetCodeMaxCtrl() const { return *(CCodeMaxCtrl*)this; }
The problem is using this for OnInitUpdate works fine but if I lose the focus and I want to access it later the "this" pointer is pointing at ??. I have tried creating member variables and try to assign the value to it but it will not keep the pointer. How can I get access to this control view.