Want to add a static horizontal splitter to an already created view in sdi app
-
I have a MFC SDI app which has a single view with a bunch of controls. As an enhancement, there is a suggestion to add splitter pane to divide the existing view into 2 horizontal parts so that user can adjust panes to view according to their requirement. So, my splitter would be of 2 rows and 1 col. But problem which I am facing is - all implementation which I have seen till now for CSplitterWnd create a new Wnd or View or store each "pane" in the view. But in my case, there's a single view which has already been created(and there's already huge business logic written in Child View class) and it would be a pain to actually partition that view into 2 views and then add the relevant code. Is there any way I can use same view to add a horizontal static splitter with 2 panes so that 2 panes will actually contain diff controls but part of just 1 view file. Thanks Amit
-
I have a MFC SDI app which has a single view with a bunch of controls. As an enhancement, there is a suggestion to add splitter pane to divide the existing view into 2 horizontal parts so that user can adjust panes to view according to their requirement. So, my splitter would be of 2 rows and 1 col. But problem which I am facing is - all implementation which I have seen till now for CSplitterWnd create a new Wnd or View or store each "pane" in the view. But in my case, there's a single view which has already been created(and there's already huge business logic written in Child View class) and it would be a pain to actually partition that view into 2 views and then add the relevant code. Is there any way I can use same view to add a horizontal static splitter with 2 panes so that 2 panes will actually contain diff controls but part of just 1 view file. Thanks Amit
This is how the splitter works. First there is a view. You create a splitter in that view. Now you have to create 2 views, one for each pane. The initial parent view now only hosts the splitter and does nothing more. In your case, after you create the splitter, create two instances of the Child View class, one in each pane.
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)