Combine some CScrollView into one

45 Views Asked by At

I have some files and i use OpenDocumentFile() to open and get pFirtView of each file. Now i have CView/CScrollView(s) for the files. I need combine all CView/CScrollView(s) to only one CScrollView. Any suggestion? Thanks

1

There are 1 best solutions below

0
On

The framework doesn't support this. You can probably hack around it by providing some sort of aggregate CView that can host multiple windows and does the layouting, but for your mental health, I suggest avoiding Doc/View for any scenario that is not exactly the way it is intended to be used, and do your window creation/drawing.

Remove the CDocTemplate based creation part in the App class, create a CWnd-derived class to host other windows and set m_pMainWnd to that window. That gets you there 90% of the way (well apart from the actual drawing in the child windows, of course...)