Update of /cvsroot/anyedit/AnyEditToolkit/GuiLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9776/AnyEditToolkit/GuiLib Modified Files: GuiComboBoxExt.cpp GuiContainer.cpp GuiDrawLayer.cpp GuiTabWnd.cpp GuiTabWnd.h GuiTabbed.cpp MenuBar.cpp Log Message: Removed (unnecessary) include of resource.h (deprecated) Index: MenuBar.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditToolkit/GuiLib/MenuBar.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MenuBar.cpp 2 Oct 2004 13:27:41 -0000 1.2 --- MenuBar.cpp 13 Oct 2004 23:28:10 -0000 1.3 *************** *** 55,59 **** #include "stdafx.h" #include "MenuBar.h" - #include "resource.h" #include "GuiDockContext.h" #include <afxole.h> --- 55,58 ---- Index: GuiContainer.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditToolkit/GuiLib/GuiContainer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GuiContainer.cpp 26 Sep 2004 16:11:49 -0000 1.1 --- GuiContainer.cpp 13 Oct 2004 23:28:10 -0000 1.2 *************** *** 282,357 **** } //******************************************************************************** ! CWnd* CGuiContainer::AddComponen(CRuntimeClass* m_rtcwnd,UINT nID,DWORD dwStyle) { ! CWnd* m_cwnd=NULL; ! BOOL btype=FALSE; //only object small ! if (m_rtcwnd->IsDerivedFrom(RUNTIME_CLASS(CComboBox))) { ! m_cwnd = new CGuiComboBoxExt(); ! if (!((CGuiComboBoxExt*)m_cwnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(1,1,100,100), this, nID)) ! { ! m_cwnd=NULL; ! return NULL; ! } ! btype=TRUE; ! goto crear; } ! ! else if ( m_rtcwnd->IsDerivedFrom(RUNTIME_CLASS(CListBox))) { ! m_cwnd = new CListBox(); ! if (!((CListBox*)m_cwnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID)) ! { ! m_cwnd=NULL; ! return NULL; ! } ! goto crear; } ! else if ( m_rtcwnd->IsDerivedFrom(RUNTIME_CLASS(CEdit))) { ! m_cwnd = new CEdit(); ! if (!((CEdit*)m_cwnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID)) ! { ! m_cwnd=NULL; ! return NULL; ! } ! ! btype=TRUE; ! goto crear; } ! ! else if ( m_rtcwnd->IsDerivedFrom(RUNTIME_CLASS(CListCtrl))) { ! m_cwnd = new CListCtrl(); ! if (!((CListCtrl*)m_cwnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID)) ! { ! m_cwnd=NULL; ! return NULL; ! } ! ! btype=FALSE; ! goto crear; } ! else if ( m_rtcwnd->IsDerivedFrom(RUNTIME_CLASS(CGuiVisioFolder))) { ! m_cwnd = new CGuiVisioFolder(); ! if (!((CGuiVisioFolder*)m_cwnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID)) ! { ! m_cwnd=NULL; ! return NULL; ! } ! goto crear; } - else - return NULL; - - crear: - if (m_nItems==-1) m_nItems=0; - m_arrContainer.SetAtGrow(m_nItems, new CComponents(m_cwnd,btype)); - m_nItems++; - RecalLayout(); - return m_cwnd; } --- 282,335 ---- } //******************************************************************************** ! CWnd* CGuiContainer::AddComponen(CRuntimeClass* pRuntimeClass, UINT nID, DWORD dwStyle) { ! CWnd* pWnd = NULL; ! BOOL bType = FALSE; //only object small ! BOOL bSuccess = FALSE; ! if (pRuntimeClass->IsDerivedFrom(RUNTIME_CLASS(CComboBox))) { ! pWnd = new CGuiComboBoxExt(); ! bSuccess = ((CGuiComboBoxExt*)pWnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(1,1,100,100), this, nID); ! bType = TRUE; } ! else if (pRuntimeClass->IsDerivedFrom(RUNTIME_CLASS(CListBox))) { ! pWnd = new CListBox(); ! bSuccess = ((CListBox*)pWnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID); } ! else if (pRuntimeClass->IsDerivedFrom(RUNTIME_CLASS(CEdit))) { ! pWnd = new CEdit(); ! bSuccess = ((CEdit*)pWnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID); ! bType=TRUE; } ! else if (pRuntimeClass->IsDerivedFrom(RUNTIME_CLASS(CListCtrl))) { ! pWnd = new CListCtrl(); ! bSuccess = ((CListCtrl*)pWnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID); } ! else if (pRuntimeClass->IsDerivedFrom(RUNTIME_CLASS(CGuiVisioFolder))) { ! pWnd = new CGuiVisioFolder(); ! bSuccess = ((CGuiVisioFolder*)pWnd)->Create(dwStyle|WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, nID); } + if (bSuccess) + { + ASSERT(pWnd != NULL); + if (m_nItems == -1) + m_nItems = 0; + m_arrContainer.SetAtGrow(m_nItems, new CComponents(pWnd, bType)); + m_nItems++; + RecalLayout(); + } + else if (pWnd != NULL) + { + delete pWnd; + pWnd = NULL; + } + + return pWnd; } Index: GuiTabWnd.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditToolkit/GuiLib/GuiTabWnd.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GuiTabWnd.h 11 Oct 2004 20:27:10 -0000 1.3 --- GuiTabWnd.h 13 Oct 2004 23:28:10 -0000 1.4 *************** *** 35,38 **** --- 35,40 ---- #include "GuiDrawlayer.h" + #define WM_SHOWTITLE 2022 + //********************************************************* class GUILIBDLLEXPORT CGuiTabWnd : public CWnd Index: GuiTabWnd.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditToolkit/GuiLib/GuiTabWnd.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GuiTabWnd.cpp 11 Oct 2004 20:27:10 -0000 1.4 --- GuiTabWnd.cpp 13 Oct 2004 23:28:10 -0000 1.5 *************** *** 31,35 **** #include "GuiTabWnd.h" #include "GuiBasetab.h" - #include "resource.h" --- 31,34 ---- *************** *** 585,589 **** CWnd* pParent=GetParent(); pParent->SetWindowText(m_Caption); ! pParent->SendMessage(WM_COMMAND,WM_SHOWTITLE); } --- 584,588 ---- CWnd* pParent=GetParent(); pParent->SetWindowText(m_Caption); ! pParent->SendMessage(WM_COMMAND, WM_SHOWTITLE); } Index: GuiTabbed.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditToolkit/GuiLib/GuiTabbed.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GuiTabbed.cpp 11 Oct 2004 18:01:23 -0000 1.3 --- GuiTabbed.cpp 13 Oct 2004 23:28:10 -0000 1.4 *************** *** 24,28 **** #include "stdafx.h" - #include "resource.h" #include "guitabbed.h" #include "GuiBaseTab.h" --- 24,27 ---- Index: GuiComboBoxExt.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditToolkit/GuiLib/GuiComboBoxExt.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiComboBoxExt.cpp 2 Oct 2004 13:27:41 -0000 1.2 --- GuiComboBoxExt.cpp 13 Oct 2004 23:28:10 -0000 1.3 *************** *** 26,30 **** #include "stdafx.h" #include "GuiComboBoxExt.h" - #include "resource.h" #include <atlbase.h> #include "Guicomboboxext.h" --- 26,29 ---- Index: GuiDrawLayer.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditToolkit/GuiLib/GuiDrawLayer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GuiDrawLayer.cpp 26 Sep 2004 16:11:49 -0000 1.1 --- GuiDrawLayer.cpp 13 Oct 2004 23:28:10 -0000 1.2 *************** *** 24,28 **** #include "stdafx.h" #include "GuiDrawLayer.h" - #include "resource.h" #ifdef _DEBUG --- 24,27 ---- *************** *** 132,136 **** GuiDrawLayer::GuiDrawLayer() { ! if (!m_img.Create(IDB_DOCKBAR,9,10,RGB(255,0,255))) { TRACE0("error"); --- 131,135 ---- GuiDrawLayer::GuiDrawLayer() { ! if (!m_img.Create(IDB_GUI_DOCKBAR, 9, 10,RGB(255,0,255))) { TRACE0("error"); |