MCPcopy Create free account
hub / github.com/acl-dev/acl / CreateSplitContainer

Method CreateSplitContainer

lib_acl_cpp/samples/gui_rpc/ui/WndResizer.cpp:963–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

961
962
963BOOL CWndResizer::CreateSplitContainer(LPCTSTR panelName, LPCTSTR panelNameA, LPCTSTR panelNameB)
964{
965 CPanel * pPanel = NULL;
966 if ((pPanel = FindPanelByName(&root, panelName)) != NULL)
967 {
968 return FALSE;
969 }
970
971 CPanel * pPanelA = NULL;
972 if ((pPanelA = FindPanelByName(&root, panelNameA)) == NULL)
973 {
974 return FALSE;
975 }
976
977
978 CPanel * pPanelB = NULL;
979 if ((pPanelB = FindPanelByName(&root, panelNameB)) == NULL)
980 {
981 return FALSE;
982 }
983
984
985 if (pPanelA == pPanelB) // two panel cannot be same
986 {
987 return FALSE;
988 }
989
990
991 CPanel * pSplitterContainer = CSplitContainer::Create(pPanelA, pPanelB);
992 if (pSplitterContainer == NULL)
993 {
994 return FALSE;
995 }
996 pSplitterContainer->Name = panelName;
997
998 return root.AddChild(pSplitterContainer);
999}
1000
1001
1002

Callers 1

OnInitDialogMethod · 0.45

Calls 1

AddChildMethod · 0.45

Tested by

no test coverage detected