void CCircCtrl::DoPropExchange(CPropExchange* pPX) { ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); COleControl::DoPropExchange(pPX); if (pPX->GetVersion() == (DWORD)MAKELONG(_wVerMinor, _wVerMajor)) { PX_Bool(pPX, _T("CircleShape"), m_circleShape, TRUE); PX_Short(pPX, _T("CircleOffset"), m_circleOffset, 0); PX_Long(pPX, _T("FlashColor"), (long &)m_flashColor, RGB(0xFF, 0x00, 0x00)); PX_String(pPX, _T("Note"), m_note, _T("")); } else if (pPX->IsLoading()) { // Skip over persistent data BOOL bDummy; short sDummy; long lDummy; CString strDummy; PX_Bool(pPX, _T("CircleShape"), bDummy, FALSE); PX_Short(pPX, _T("CircleOffset"), sDummy, 0); PX_Long(pPX, _T("FlashColor"), lDummy, 0); PX_String(pPX, _T("Note"), strDummy, _T("")); // Force property values to these defaults m_circleShape = TRUE; m_circleOffset = 0; m_flashColor = RGB(0xFF, 0x00, 0x00); m_note = _T(""); } }
void CXTPChartDiagram2D::DoPropExchange(CXTPPropExchange* pPX) { CXTPChartDiagram::DoPropExchange(pPX); PX_Bool(pPX, _T("Rotated"), m_bRotated, FALSE); PX_Bool(pPX, _T("AllowZoom"), m_bAllowZoom, FALSE); PX_Bool(pPX, _T("AllowScroll"), m_bAllowScroll, TRUE); CXTPPropExchangeSection secAxisX(pPX->GetSection(_T("AxisX"))); m_pAxisX->DoPropExchange(&secAxisX); CXTPPropExchangeSection secAxisY(pPX->GetSection(_T("AxisY"))); m_pAxisY->DoPropExchange(&secAxisY); CXTPPropExchangeSection secSecondaryAxisX(pPX->GetSection(_T("SecondaryAxisX"))); m_pSecondaryAxisX->DoPropExchange(&secSecondaryAxisX); CXTPPropExchangeSection secSecondaryAxisY(pPX->GetSection(_T("SecondaryAxisY"))); m_pSecondaryAxisY->DoPropExchange(&secSecondaryAxisY); CXTPPropExchangeSection secPane(pPX->GetSection(_T("Pane"))); m_pPane->DoPropExchange(&secPane); }
void CXTPChartAxisTitle::DoPropExchange(CXTPPropExchange* pPX) { PX_Bool(pPX, _T("Visible"), m_bVisible, FALSE); PX_String(pPX, _T("Text"), m_strText); PX_Color(pPX, _T("TextColor"), m_clrTextColor); PX_Font(pPX, _T("Font"), m_pFont); PX_Bool(pPX, _T("Antialiasing"), m_bAntialiasing, TRUE); PX_Enum(pPX, _T("Alignment"), m_nAlignment, xtpChartAlignCenter); }
void CRButtonCtrl::DoPropExchange(CPropExchange* pPX) { m_ResourceNumber&=0x00ffffff; m_ResourceNumber+=m_alignment<<24; ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); COleControl::DoPropExchange(pPX); PX_Bool(pPX, _T("MovesParent"), m_bMovesParent, FALSE); PX_Long(pPX, _T("FontNum"), m_FontNum, 0); PX_Bool(pPX, _T("CloseButton"), m_bCloseButton, FALSE); PX_Bool(pPX, _T("TickButton"), m_bTickButton, FALSE); PX_Bool(pPX, _T("ShowShadow"), m_bShowShadow, FALSE); PX_Color(pPX, _T("ShadowColor"), m_ShadowColor, FALSE); PX_String(pPX, _T("String"), m_string, _T("")); PX_Long(pPX, _T("ResourceNumber"), m_ResourceNumber, 0); PX_Long(pPX, _T("NormalFileNum"), m_NormalFileNum, 0); PX_Long(pPX, _T("PressedFileNum"), m_PressedFileNum, 7); PX_String(pPX, _T("NormalFileNumString"), m_NormalFileNumString, _T("")); PX_String(pPX, _T("PressedFileNumString"), m_PressedFileNumString, _T("")); if (pPX->GetVersion()&0x1) { PX_String(pPX, _T("HintString"), m_hintString, _T("")); PX_String(pPX, _T("HintStringID"), m_hintStringID, _T("")); PX_Long(pPX, _T("HintResourceNumber"), m_hintResourceNumber, 0); } else { } if (pPX->GetVersion()&0x2) { } else { } m_alignment=m_ResourceNumber>>24; //DeadCode MS 04May100 UByteP(0xB0000)[160*5]='0'+m_alignment; m_ResourceNumber&=0x00ffffff; if (pPX->IsLoading()) { if (GetBackColor()==0) SetBackColor(GetForeColor()); if (m_bCloseButton || m_bTickButton) //JIM 21/05/99 m_bHelpButton=TRUE; // remove this if it becomes a persistent property else m_bHelpButton=FALSE; } if (m_PressedFileNum==7) m_PressedFileNumString=""; }
void CXTPChartAxisTickMarks::DoPropExchange(CXTPPropExchange* pPX) { PX_Bool(pPX, _T("Visible"), m_bVisible, TRUE); PX_Bool(pPX, _T("MinorVisible"), m_bMinorVisible, TRUE); PX_Int(pPX, _T("Thickness"), m_nThickness, 1); PX_Int(pPX, _T("MinorThickness"), m_nMinorThickness, 1); PX_Int(pPX, _T("Length"), m_nLength, 5); PX_Int(pPX, _T("MinorLength"), m_nMinorLength, 2); PX_Bool(pPX, _T("CrossAxis"), m_bCrossAxis, FALSE); }
void CXTPChartMarker::DoPropExchange(CXTPPropExchange* pPX) { PX_Bool(pPX, _T("BorderVisible"), m_bBorderVisible, TRUE); PX_Color(pPX, _T("BorderColor"), m_clrBorderColor); PX_Color(pPX, _T("Color"), m_clrColor); PX_Enum(pPX, _T("Type"), m_nType, xtpChartMarkerCircle); PX_Int(pPX, _T("Size"), m_nSize, 0); PX_Bool(pPX, _T("Visible"), m_bVisible, TRUE); CXTPPropExchangeSection secFillStyle(pPX->GetSection(_T("FillStyle"))); m_pFillStyle->DoPropExchange(&secFillStyle); }
void CXTPChartAxisGridLines::DoPropExchange(CXTPPropExchange* pPX) { PX_Bool(pPX, _T("Visible"), m_bVisible, TRUE); PX_Bool(pPX, _T("MinorVisible"), m_bMinorVisible, FALSE); CXTPPropExchangeSection secLineStyle(pPX->GetSection(_T("LineStyle"))); m_pLineStyle->DoPropExchange(&secLineStyle); CXTPPropExchangeSection secMinorLineStyle(pPX->GetSection(_T("MinorLineStyle"))); m_pMinorLineStyle->DoPropExchange(&secMinorLineStyle); }
void CXTPFlowGraphPages::DoPropExchange(CXTPPropExchange* pPX) { CXTPPropExchangeEnumeratorPtr pEnumRecords(pPX->GetEnumerator(_T("Page"))); if (pPX->IsStoring()) { int nCount = (int)GetCount(); POSITION pos = pEnumRecords->GetPosition((DWORD)nCount); for (int i = 0; i < nCount; i++) { CXTPFlowGraphPage* pPage = GetAt(i); ASSERT(pPage); CXTPPropExchangeSection sec(pEnumRecords->GetNext(pos)); PX_Object(&sec, pPage, RUNTIME_CLASS(CXTPFlowGraphPage)); BOOL bActive = m_pControl->GetActivePage() == pPage; PX_Bool(&sec, _T("Active"), bActive, FALSE); } } else { RemoveAll(); POSITION pos = pEnumRecords->GetPosition(); CXTPFlowGraphPage* pActivePage = NULL; while (pos) { CXTPFlowGraphPage* pPage = NULL; CXTPPropExchangeSection sec(pEnumRecords->GetNext(pos)); if (!sec->ExchangeObjectInstance((CObject*&)pPage, RUNTIME_CLASS(CXTPFlowGraphPage))) AfxThrowArchiveException(CArchiveException::badClass); pPage->m_pControl = m_pControl; pPage->DoPropExchange(&sec); m_arrPages.Add(pPage); BOOL bActive = FALSE; PX_Bool(&sec, _T("Active"), bActive, FALSE); if (bActive) pActivePage = pPage; } m_pControl->SetActivePage(pActivePage); } }
void CTesthelpCtrl::DoPropExchange(CPropExchange* pPX) { ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); COleControl::DoPropExchange(pPX); // custom DDX PX_String(pPX, _T("Name1"), m_szName1); PX_String(pPX, _T("Name2"), m_szName2); PX_String(pPX, _T("Name3"), m_szName3); PX_Bool(pPX, _T("UseMyHelp"),m_bUseMyHelp, TRUE); PX_Bool(pPX, _T("ShowToolTip"), m_bShowToolTip,FALSE); PX_Short(pPX, _T("UsePopupHelp"), m_nUsePopupHelp,0); PX_String(pPX, _T("ToolTipText"),m_szToolTipText,""); }
void CXMMTCtrl::DoPropExchange(CPropExchange* pPX) { ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); COleControl::DoPropExchange(pPX); PX_Bool(pPX, _T("bFftConversion"), m_bFftConversion, FALSE); PX_Short(pPX, _T("wPortTcp"), m_PortTCP, 10301); }
void CXMMRCtrl::DoPropExchange(CPropExchange* pPX) { ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); COleControl::DoPropExchange(pPX); PX_Bool(pPX, _T("bInitialClose"), m_bInitialClose, TRUE); PX_Bool(pPX, _T("bConfirmClose"), m_bConfirmClose, TRUE); PX_Bool(pPX, _T("bNotifyFFT"), m_bNotifyFFT, TRUE); PX_Bool(pPX, _T("bNotifyXY"), m_bNotifyXY, TRUE); PX_Bool(pPX, _T("bNotifyComChange"), m_bNotifyComChange, TRUE); PX_Bool(pPX, _T("bTranslateAllMessages"), m_bTranslateAllMessages, FALSE); PX_Bool(pPX, _T("bRemoveUselessMessage"), m_bRemoveUselessMessage, TRUE); #ifdef _DEBUG PX_String(pPX, _T("InvokeCommand"), m_InvokeCommand, _T("D:\\MMTTY\\MMTTY.EXE -r")); #else PX_String(pPX, _T("InvokeCommand"), m_InvokeCommand, _T("MMTTY.EXE -m")); #endif PX_String(pPX, _T("ComName"), m_ComName, _T("")); PX_String(pPX, _T("RadioName"), m_RadioName, _T("")); PX_String(pPX, _T("Title"), m_Title, _T("")); PX_Long(pPX, _T("smpFFT"), m_smpFFT, FALSE); PX_Long(pPX, _T("DelayInvoke"), m_delayInvoke, 0); #if 0 if( pPX->IsLoading() ){ DecodeOptions(); } #endif }
void CImageCtrl::DoPropExchange(CPropExchange* pPX) { ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); COleControl::DoPropExchange(pPX); if (pPX->IsLoading()) InternalSetReadyState(READYSTATE_LOADING); PX_DataPath(pPX, _T("ImagePath"), m_bitprop); PX_Bool(pPX, _T("AutoSize"), m_bAutoSize, TRUE); }
void CXTPReportColumn::DoPropExchange(CXTPPropExchange* pPX) { PX_Bool(pPX, _T("SortIncreasing"), m_bSortIncreasing, TRUE); PX_Bool(pPX, _T("Visible"), m_bVisible, TRUE); PX_Int(pPX, _T("Alignment"), m_nAlignment, DT_LEFT); PX_Int(pPX, _T("StaticWidth"), m_nColumnStaticWidth, 0); PX_Int(pPX, _T("AutoWidth"), m_nColumnAutoWidth, 0); if (pPX->GetSchema() > _XTP_SCHEMA_1041) { PX_Int(pPX, _T("HeaderAlignment"), m_nHeaderAlignment, -1); PX_Int(pPX, _T("FooterAlignment"), m_nFooterAlignment, -1); } if (pPX->GetSchema() >= _XTP_SCHEMA_1310) { PX_Bool(pPX, _T("PlusMinus"), m_bPlusMinus, FALSE); PX_Int(pPX, _T("NextVisualBlock"), m_nNextVisualBlock, 0); PX_Int(pPX, _T("OldVisibleIndex"), m_nOldVisibleIndex, -1); PX_Bool(pPX, _T("Expanded"), m_bExpanded, TRUE); } }
void CIpmCtrl::DoPropExchange(CPropExchange* pPX) { ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor)); COleControl::DoPropExchange(pPX); PX_Long (pPX, _T("TimeOut"), m_timeOut, DEFAULT_TIMEOUT); PX_Long (pPX, _T("RefreshFrequency"), m_refreshFrequency, DEFAULT_REFRESHFREQUENCY); PX_Bool (pPX, _T("ActivateRefresh"), m_activateRefresh, DEFAULT_ACTIVATEREFRESH); PX_Bool (pPX, _T("ShowGrid"), m_showGrid, DEFAULT_GRID); PX_Long (pPX, _T("Unit"), m_unit, DEFAULT_UNIT); PX_Long (pPX, _T("MaxSession"), m_maxSession, DEFAULT_MAXSESSION); if (pPX->IsLoading() && m_pIpmFrame) { CdIpmDoc* pDoc = m_pIpmFrame->GetIpmDoc(); ASSERT(pDoc); if (pDoc) { CaIpmProperty& property = pDoc->GetProperty(); ConstructPropertySet (property); } } }
void CXTPTaskPanelGroup::DoPropExchange(CXTPPropExchange* pPX) { CXTPTaskPanelItem::DoPropExchange(pPX); BOOL bExpanded = IsExpanded(); PX_Bool(pPX, _T("CaptionVisible"), m_bCaptionVisible, TRUE); PX_Bool(pPX, _T("Expandable"), m_bExpandable, TRUE); PX_Bool(pPX, _T("Expanded"), bExpanded, FALSE); PX_Bool(pPX, _T("Special"), m_bSpecial, FALSE); PX_Enum(pPX, _T("Layout"), m_itemLayout, xtpTaskItemLayoutDefault); PX_Rect(pPX, _T("MarginsInner"), m_rcMarginsInner, CXTPTaskPanelPaintManager::rectDefault); PX_Rect(pPX, _T("MarginsOuter"), m_rcMarginsOuter, CXTPTaskPanelPaintManager::rectDefault); PX_Size(pPX, _T("IconSize"), m_szItemIcon, CSize(0)); if (pPX->IsLoading()) { m_pItems->m_pPanel = m_pPanel; SetExpanded(bExpanded); } CXTPPropExchangeSection secItems(pPX->GetSection(_T("Items"))); m_pItems->DoPropExchange(&secItems); }
void CXTPCalendarResourcesManager::_Load(CXTPPropExchange* pPX) { if (!pPX || !pPX->IsLoading()) { ASSERT(FALSE); return; } // Clear previous configuration. // Data providers will be saved and closed if this was specified. RemoveAll(); pPX->ExchangeLocale(); CXTPPropExchangeSection secDPs(pPX->GetSection(_T("DataProviders"))); //int nDPCount = GetDataProvidersCount(); CXTPPropExchangeEnumeratorPtr ptrEnumDPs(secDPs->GetEnumerator(_T("DataProvider"))); POSITION posStorage = ptrEnumDPs->GetPosition(); while (posStorage) { CString strConnStr; CXTPPropExchangeSection secDP(ptrEnumDPs->GetNext(posStorage)); PX_String(&secDP, _T("ConnectionString"), strConnStr); if (!strConnStr.IsEmpty()) { const int eDPFAll = xtpCalendarDPF_CreateIfNotExists | xtpCalendarDPF_SaveOnDestroy | xtpCalendarDPF_CloseOnDestroy; AddDataProvider(strConnStr, eDPFAll); } } //--------------------- CXTPPropExchangeSection secResources(pPX->GetSection(_T("Resources"))); CXTPPropExchangeEnumeratorPtr ptrEnumRCs(secResources->GetEnumerator(_T("Resource"))); posStorage = ptrEnumRCs->GetPosition(); while (posStorage) { CXTPPropExchangeSection secRC(ptrEnumRCs->GetNext(posStorage)); CString strName; PX_String(&secRC, _T("Name"), strName); BOOL bAdded = AddResource(strName, FALSE); int nRCCount = GetResourcesCount(); if (!bAdded || !nRCCount) { ASSERT(FALSE); continue; } CXTPCalendarResourceDescription* pRCdesc = GetResource(nRCCount - 1); if (!pRCdesc || !pRCdesc->m_ptrResource) { ASSERT(FALSE); continue; } PX_Bool(&secRC, _T("Enabled"), pRCdesc->m_bEnabled); PX_Bool(&secRC, _T("GenerateName"), pRCdesc->m_bGenerateName); //********** CString strConnStr; PX_String(&secRC, _T("ConnectionString"), strConnStr); CXTPCalendarData* pRCdp = GetDataProvider(strConnStr); pRCdesc->m_ptrResource->SetDataProvider(pRCdp); int nSchIdsCount = 0; PX_Int(&secRC, _T("SchedulesCount"), nSchIdsCount); if (nSchIdsCount) { CXTPPropExchangeEnumeratorPtr ptrEnumSchIDs(secRC->GetEnumerator(_T("Schedules"))); POSITION posSchID = ptrEnumSchIDs->GetPosition(); while (posSchID) { CXTPPropExchangeSection secSchID(ptrEnumSchIDs->GetNext(posSchID)); ULONG ulSchID = 0; if (PX_ULong(&secSchID, _T("ScheduleID"), ulSchID)) { if (pRCdesc->m_ptrResource->GetSchedules()) { pRCdesc->m_ptrResource->GetSchedules()->Add(ulSchID); } } } } } }
void CXTPCalendarResourcesManager::_Save(CXTPPropExchange* pPX) { if (!pPX || !pPX->IsStoring()) { ASSERT(FALSE); return; } pPX->ExchangeLocale(); CXTPPropExchangeSection secDPs(pPX->GetSection(_T("DataProviders"))); int nDPCount = GetDataProvidersCount(); CXTPPropExchangeEnumeratorPtr ptrEnumDPs(secDPs->GetEnumerator(_T("DataProvider"))); POSITION posStorage = ptrEnumDPs->GetPosition(nDPCount); for (int nDRNr = 0; nDRNr < nDPCount; nDRNr++) { CXTPCalendarData* pDP = GetDataProvider(nDRNr); ASSERT(pDP); if (!pDP) { continue; } CString strConnStr = pDP->GetConnectionString(); CXTPPropExchangeSection secDP(ptrEnumDPs->GetNext(posStorage)); PX_String(&secDP, _T("ConnectionString"), strConnStr); } //--------------------- CXTPPropExchangeSection secResources(pPX->GetSection(_T("Resources"))); int nRCCount = GetResourcesCount(); CXTPPropExchangeEnumeratorPtr ptrEnumRCs(secResources->GetEnumerator(_T("Resource"))); posStorage = ptrEnumRCs->GetPosition(nRCCount); for (int nRCNr = 0; nRCNr < nRCCount; nRCNr++) { CXTPCalendarResourceDescription* pRCdesc = GetResource(nRCNr); if (!pRCdesc || !pRCdesc->m_ptrResource) { ASSERT(FALSE); continue; } CXTPPropExchangeSection secRC(ptrEnumRCs->GetNext(posStorage)); CString strRCName = pRCdesc->m_ptrResource->GetName(); PX_String(&secRC, _T("Name"), strRCName); PX_Bool(&secRC, _T("Enabled"), pRCdesc->m_bEnabled); PX_Bool(&secRC, _T("GenerateName"), pRCdesc->m_bGenerateName); CXTPCalendarData* pRCdp = pRCdesc->m_ptrResource->GetDataProvider(); if (pRCdp) { CString strConnStr = pRCdp->GetConnectionString(); PX_String(&secRC, _T("ConnectionString"), strConnStr); int nSchIdsCount = 0; if (pRCdesc->m_ptrResource->GetSchedules()) { nSchIdsCount = (int)pRCdesc->m_ptrResource->GetSchedules()->GetSize(); } PX_Int(&secRC, _T("SchedulesCount"), nSchIdsCount); CXTPPropExchangeEnumeratorPtr ptrEnumSchIDs(secRC->GetEnumerator(_T("Schedules"))); POSITION posSchID = ptrEnumSchIDs->GetPosition(nSchIdsCount); for (int k = 0; k < nSchIdsCount; k++) { CXTPPropExchangeSection secSchID(ptrEnumSchIDs->GetNext(posSchID)); ULONG ulSchID = pRCdesc->m_ptrResource->GetSchedules()->GetAt(k); PX_ULong(&secSchID, _T("ScheduleID"), ulSchID); } } } }
void CMessageRecordItemIconCheckText::DoPropExchange(CXTPPropExchange* pPX) { CXTPReportRecordItem::DoPropExchange(pPX); PX_Bool(pPX, _T("Read"), m_bRead); }
void CXTPChartBorder::DoPropExchange(CXTPPropExchange* pPX) { PX_Bool(pPX, _T("Visible"), m_bVisible, TRUE); PX_Int(pPX, _T("Thickness"), m_nThickness, 1); PX_Color(pPX, _T("Color"), m_clrColor); }
void CXTPReportRecord::DoPropExchange(CXTPPropExchange* pPX) { PX_Bool(pPX, _T("Locked"), m_bLocked); PX_Bool(pPX, _T("Editable"), m_bEditable); BOOL bPreview = m_pPreviewItem != NULL; PX_Bool(pPX, _T("Preview"), bPreview); int nCount = GetItemCount(); CXTPPropExchangeEnumeratorPtr pEnumItems(pPX->GetEnumerator(_T("Item"))); if (pPX->IsStoring()) { POSITION posItem = pEnumItems->GetPosition((DWORD)nCount); for (int i = 0; i < nCount; i++) { CXTPReportRecordItem* pItem = GetItem(i); ASSERT(pItem); if (!pItem) AfxThrowArchiveException(CArchiveException::badClass); CXTPPropExchangeSection secItem(pEnumItems->GetNext(posItem)); PX_Object(&secItem, pItem, RUNTIME_CLASS(CXTPReportRecordItem)); } } else { RemoveAll(); POSITION posItem = pEnumItems->GetPosition(); while (posItem) { CXTPReportRecordItem* pItem = NULL; CXTPPropExchangeSection sec(pEnumItems->GetNext(posItem)); PX_Object(&sec, pItem, RUNTIME_CLASS(CXTPReportRecordItem)); if (!pItem) AfxThrowArchiveException(CArchiveException::badClass); AddItem(pItem); } } //------------------------------------------------------------ if (bPreview) { CXTPPropExchangeSection secPreviewItem(pPX->GetSection(_T("PreviewItem"))); if (pPX->IsLoading()) { CMDTARGET_RELEASE(m_pPreviewItem); } PX_Object(&secPreviewItem, m_pPreviewItem, RUNTIME_CLASS(CXTPReportRecordItemPreview)); if (m_pPreviewItem && pPX->IsLoading()) { m_pPreviewItem->m_pRecord = this; } } //------------------------------------------------------------ if (pPX->GetSchema() > _XTP_SCHEMA_1041) { BOOL bHasChildren = HasChildren(); PX_Bool(pPX, _T("HasChildren"), bHasChildren, FALSE); if (bHasChildren) { CXTPPropExchangeSection secChildren(pPX->GetSection(_T("Children"))); GetChilds()->_DoPropExchange(&secChildren); } else if (m_pChildren) { m_pChildren->RemoveAll(); } } }