Hello ADSOFT & VictorN!
The app is just too massive, so it makes no sense passing it on, but thanks for the offer to review ADSOFT! I am still studying the references you pointed out earlier.
Anyway, I have worked on with VictorN's comment on that the CSplitterWnd needs to be instantiated before any parent to the CCurrentFileView class can be identified.
If I call GetParent() from CCurrentFileView's OnDraw() method, then I am actually getting a pointer
to the parent of CCurrentFileView, which of course is the CSplitterWnd that has instantiated at this point. Then I can pass the pointer on to the parent of the CSplitterWnd. The parent is the
CChildFrame window. So in this way one can say that the problem is solved. I am using SendMessage() to pass on the pointer to the parent(s).......
I am JUST NOT HAPPY with the solution as e.g. it is invoked from CCurrentFileView's OnDraw() method which is called a trillion times during app execution. Then also, I do not like too much 'SendMessage stuff' in my programs. I just do not like this solution.
Is'nt there a way to get the pointer to CCurrentFileView directly from the CChildFrame , after the CSplitterWnd and CCurrentFileView have instantiated ?
I am still wondering about the CRUNTIMECLASS, if it is'nt possible to somehow address it to get the pointer at the time when the CChildFrame instantiates CSplitterWnd and CCurrentFileView?
Pls. give me more input:-)
Best regards
Gustav