bpearson
asked on
Creating static splitter windows "dynamically"
Hi,
Is it OK to create static splitter windows (i.e. with an object of CSplitterWnd and it's CreateStatic function) at various points within the life of an application or should it be done in the frame windows OnCreateClient function call only (as does all of the MFC sample code I have found)?!? I would like the user to be able to interactively add/remove views (and thus splitter window panes) to an existing MDI
child frame window. I have a preliminary test app that seems to work OK. This app embeds additional CSplitterWnd objects within existing CSplitterWnd objects (by specifying the existing CSplitterWnd object as the parent of the new CSplitterWnd object similar to the VIEWX example) at times other than within the frame windows OnCreateClient function.
Has anyone else created "dynamic" static splitter windows and, if so, are there inherent problems in doing so?
Thanks in advance,
Brian Peasron
Vivid Technologies
Is it OK to create static splitter windows (i.e. with an object of CSplitterWnd and it's CreateStatic function) at various points within the life of an application or should it be done in the frame windows OnCreateClient function call only (as does all of the MFC sample code I have found)?!? I would like the user to be able to interactively add/remove views (and thus splitter window panes) to an existing MDI
child frame window. I have a preliminary test app that seems to work OK. This app embeds additional CSplitterWnd objects within existing CSplitterWnd objects (by specifying the existing CSplitterWnd object as the parent of the new CSplitterWnd object similar to the VIEWX example) at times other than within the frame windows OnCreateClient function.
Has anyone else created "dynamic" static splitter windows and, if so, are there inherent problems in doing so?
Thanks in advance,
Brian Peasron
Vivid Technologies
See SAMPLES\MFC\TUTORIAL\SCRIB BLE example how to create dynamic CSplitterWnd.
ASKER
Like I said, all the MFC samples I have found (including Scribble with it's dynamic splitters (I need STATIC!)) create the splitter windows in the frame windows OnCreateClient. What I need to know is can splitter window creation be safely done elsewhere at various times within the life of the application?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A friend of mine and I did exactly what you are attempting. Actually, he started it and I finished it. It is possible - the hardest part is keeping track of what's beed created and then unwinding them in the correct order so you don't leak memory. Email me if you'd like more information... bill@lith.com