Original Post
Hello everyone, I have a problem understanding how to correctly work with CRuntimeClass. Given is the following example: I have an SDI MFC application which is seperated by several splitters (followed this tutorial). One of the splitter panes is a preview window, which renders a given OBJ file via OpenGL. The pane itself is created using RUNTIME_CLASS(CPreviewPane), so the object is dynamically created in runtime. The question now is: How can I interact with that object? Like I said, this pane renders obj files. For testing purposes I hardcode included a LoadOBJ(char *Filename) call within CPreviewPane's constructor. But what if I want to change the Filename? I can't seem to use overloaded constructors with RUNTIME_CLASS, nor can I find any references to the created object form CPreviewPane. Is there anything like a "GetObject()" Method or something similar? Thanks for any help or hints in advance Chris