void WINEXP FMAddClipboard( OBJPTR original, OBJPTR copy ) /********************************************************/ /* Add obj to the list of copy objects */ { DLIST_ELT elt; DLIST * last; if( !FMClipObjExists( original ) ) { last = FindInsertPoint( original ); elt.original = original; elt.copy = copy; if( last != NULL ) { DListInsertElt( last, elt ); } else { DListAddElt( &ClipBoard.objs, elt ); } } }
void SetAtllDDX(VSClass* pClass, InsDelPoints* pModifications, bool bUseFloat /* = false */) { if (pClass->m_bDDX && !bUseFloat) return; InsertPointDDXSupport* pInsPt = FindInsertPoint(pModifications); EnvDTE::CodeElementPtr pIncludeElem = FindInclude(pClass, L"<atlddx.h>", true); if (pIncludeElem == NULL) { if (!pInsPt) { pInsPt = new InsertPointDDXSupport; pInsPt->bUseFloat = false; pInsPt->pBase = NULL; pInsPt->pElement = NULL; pModifications->InsertPoints.Add(pInsPt); } if (!pInsPt->pElement) { VSInclude* pInclude = new VSInclude; pInclude->Name = _T("<atlddx.h>"); pInsPt->pElement = pInclude; } } if (bUseFloat) { EnvDTE::CodeElementPtr pMacro = FindDefine(pClass, L"_ATL_USE_DDX_FLOAT", true); if (pMacro == NULL) { if (!pInsPt) { pInsPt = new InsertPointDDXSupport; pInsPt->pElement = NULL; pInsPt->pBase = NULL; pInsPt->bUseFloat = true; pModifications->InsertPoints.Add(pInsPt); } else { pInsPt->bUseFloat = true; } } } bool bBase = false; for (size_t i = 0; i < pClass->Parents.GetCount(); i++) { if ((pClass->Parents[i])->Name == _T("CWinDataExchange")) { bBase = true; break; } } if (!bBase) { //нужно добавить в качестве предка класс CWinDataExchange VSBase* pNewBase = new VSBase; pNewBase->Name = _T("CWinDataExchange<") + pClass->Name + _T(">"); pNewBase->pElement = NULL; pNewBase->pParent = (VSElement*)pClass; pClass->Parents.Add(pNewBase); if (!pInsPt) { pInsPt = new InsertPointDDXSupport; pInsPt->bUseFloat = false; pInsPt->pBase = NULL; pInsPt->pElement = NULL; pModifications->InsertPoints.Add(pInsPt); } if (!pInsPt->pBase) { pInsPt->pBase = pNewBase; } } pClass->m_bDDX = true; }