Original Post
I'm trying to create an editor in MFC with DirectX, however I'm run into a bit of a hurdle. I have my program set up as so: I have 4 viewing panes which inherit from my CView class, then I have all my DX stuff and the bulk of everything else in my CDocument class. MFC sets up everything with this nice little call here:
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CView));
The problem is that I need a way to pass the Main hWnd, which doesn't get created until CMainFrame is created, into CDoc, before CView gets called. That or think of a completely different way of organizing my program. Any suggestions, hints, solutions?