Codejock Software Migration Guide
Codejock Software's migrating guide notes include all API changes that you must apply in your application.
[ Home ]
Version 12.0.0
Released: April 28, 2008
Visual C++:
- Toolkit Pro
-
SPRINTF_S method generated errors with /clr build option. It was removed from our sources.
To fix compiler error replace SPRINTF_S to _vstprintf and remove second parameter.
Example:
Previous versions:SPRINTF_S(buff, _countof(buff), _T("%lu"), count);12.0.0 and higher versions://Add this to the top of the source file where SPRINTF_S is used AFX_INLINE int SPRINTF_S(TCHAR *buffer, size_t count, const TCHAR* format, ...) { va_list args; va_start(args, format); #if (_MSC_VER > 1310) // VS2005 int result = _vstprintf_s(buffer, count, format, args); #else int result = _vstprintf(buffer, format, args);UNREFERENCED_PARAMETER(count); #endif va_end(args); return result; } //If using the above code you can leave your function as it was, or you can modify the above code //to suite your version of Visual Studio SPRINTF_S(buff, _countof(buff), _T("%lu"), count); -
Color resources moved to Common sources. Use XTP_IDS_CLR_XXX instead of XT_IDS_CLR_XXX.
For example replace XT_IDS_CLR_WHITE to XTP_IDS_CLR_WHITE to fix compiler error
Previous versions:XT_IDS_CLR_WHITE12.0.0 and higher versions:XTP_IDS_CLR_WHITE -
CXTPStatusBarLogoPane is obsolete now, use CXTPStatusBarPane instead. Replace CXTPStatusBarLogoPane to CXTPStatusBarPane class.
Use the following code to create a StatusBar pane with an Icon in 12.0.0 and higher versions:CXTPStatusBarPane* pPane = m_wndStatusBar.AddIndicator(ID_INDICATOR_LOGO, 0); pPane->SetText(_T("Codejock Software")); pPane->SetTextColor(0x915f36); CXTPPaintManager::CNonClientMetrics ncm; ncm.lfMenuFont.lfWeight = FW_BOLD; pPane->SetTextFont(&ncm.lfMenuFont); -
Reworked CXTResize. Now it uses Window Client size - not whole window rect. CRect CXTResize::m_rcWindow changed to CSize CXTResize::m_szWindow. Instead m_rcWindow member variable use m_szWindow.
Previous versions:m_szMin = m_rcWindow.Size();12.0.0 and higher versions:m_szMin = m_szWindow;Previous versions:if (rcBorders != m_rcBorders) { CPoint ptOffset(rcBorders.left - m_rcBorders.left, rcBorders.top - m_rcBorders.top); CRect rcWindow; GetWindowRect(rcWindow); rcWindow.right += rcBorders.left + rcBorders.right - m_rcBorders.left - m_rcBorders.right; rcWindow.bottom += rcBorders.top + rcBorders.bottom - m_rcBorders.top - m_rcBorders.bottom; Offset(ptOffset); m_rcWindow = rcWindow; MoveWindow(rcWindow, TRUE); }12.0.0 and higher versions:if (rcBorders != m_rcBorders) { CPoint ptOffset(rcBorders.left - m_rcBorders.left, rcBorders.top - m_rcBorders.top); CSize szOffset(rcBorders.left + rcBorders.right - m_rcBorders.left - m_rcBorders.right, rcBorders.top + rcBorders.bottom - m_rcBorders.top - m_rcBorders.bottom); CRect rcWindow; GetWindowRect(rcWindow); rcWindow.BottomRight() += szOffset; Offset(ptOffset); m_szWindow += szOffset; m_szMin += szOffset; MoveWindow(rcWindow, TRUE); }
-
SPRINTF_S method generated errors with /clr build option. It was removed from our sources.
To fix compiler error replace SPRINTF_S to _vstprintf and remove second parameter.
- Command Bars
- CXTPPrintPreview class moved to our Sources. Please remove it from your application sources
- Reworked CXTPShortcutManager to allow double key combinations, Format\SetAccel method now requires the CXTPShortcutManagerAccel parameter. Pass CXTPShortcutManagerAccel class to the Format\SetAccel method to fix error.
The following is a sample that shows how to work with the new classes:CXTPShortcutManagerAccelTable* pAccelTable = GetCommandBars()->GetShortcutManager()->GetDefaultAccelerator(); int nAccelSize = pAccelTable ->GetCount(); for (int i = 0; i < nAccelSize; i ++) { CXTPShortcutManagerAccel* accel = pAccelTable->GetAt(i); CString strKey =GetCommandBars()->GetShortcutManager()->Format(accel, NULL); }Below are some scenarios that you might need to fix in your code:
Example 1 Variable declared in Header File:
Previous versions header file:LPACCEL m_lpAccel;12.0.0 and higher versions header file:CXTPShortcutManagerAccel* m_lpAccel;Previous versions cpp file:if (m_lpAccel) { m_wndAccel.SetAccel(*m_lpAccel); }12.0.0 and higher versions cpp file:if (m_lpAccel) { m_wndAccel.SetAccel(m_lpAccel); }Example 2 Variable declared in CPP File:
Previous versions cpp file:m_lpAccel = new ACCEL [m_nAccelSize];12.0.0 and higher versions cpp file:m_lpAccel = new CXTPShortcutManagerAccel [m_nAccelSize];Example 3
Previous versions cpp file:m_lpAccel = new ACCEL [m_nAccelSize]; ::CopyAcceleratorTable (hAccelTable, m_lpAccel, m_nAccelSize);12.0.0 and higher versions cpp file:int m_nAccelSize = pAccelTable->GetCount(); for (int i = 0; i < nAccelSize; i ++) { m_lpAccel[i] = m_pAccelTable->GetAt(i); }
- Ribbon Bar
-
To prevent conflict with Microsoft headers CXTPRibbonBar::IsMinimized, CXTPRibbonBar::SetMinimized were
renamed to CXTPRibbonBar::IsRibbonMinimized/CXTPRibbonBar::SetRibbonMinimized.
Example:
Previous versions:pRibbonBar->SetMinimized(!pRibbonBar->IsMinimized());12.0.0 and higher versions:pRibbonBar->SetRibbonMinimized(!pRibbonBar->IsRibbonMinimized());
-
To prevent conflict with Microsoft headers CXTPRibbonBar::IsMinimized, CXTPRibbonBar::SetMinimized were
renamed to CXTPRibbonBar::IsRibbonMinimized/CXTPRibbonBar::SetRibbonMinimized.
Version 10.1.0
Released: April 5, 2006
Visual C++:
- Calendar
-
The Data Base data provider DB structure changed:
* Table 'Event'
- Field renamed: from Description to Body
- New field added: ScheduleID type: Number
- New field added: IsReminder type: Number
* Table 'RecurrencePattern'
- New field added: CustomPropertiesXMLData type: Memo
If you need to use old mdb data fiels with a version 10 - please make corresponding changes manually. -
GetProperty(XTP_CALENDAR_PROP_DBProviderCacheMode) changed to GetCacheMode
SetProperty(XTP_CALENDAR_PROP_DBProviderCacheMode) changed to SetCacheMode -
xtpCalendarDBCacheModeOnRepeat
xtpCalendarDBCacheModeOnClear
xtpCalendarDBCacheModeOff
Renamed as:
xtpCalendarDPCacheModeOnRepeat
xtpCalendarDPCacheModeOnClear
xtpCalendarDPCacheModeOff
-
The Data Base data provider DB structure changed:
Version 9.8.0
Released: September 26, 2005
Visual C++:
- Command Bars
- Reworked CXTPShortcutManager to allow shortcuts customization in Dialogs. XTPShortcutManager glabal function removed, use pCommanBars->GetShortcutManager() instead. CXTPCommandBars::LoadCommandBars and CXTPCommandBars::SaveCommandBars now save/restore shortcuts too. Call pCommanBars->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME) to enable it.
-
Reworked CXTPDialog to allow Docking and Customization, Removed CXTPDialog::SetMenuBar because of it. use CXTPCommandBars::SetMenu(...) instead.
Example:VERIFY(InitCommandBars()); CXTPCommandBars* pCommandBars = GetCommandBars(); pCommandBars->SetMenu(_T("Menu Bar"), IDR_MENU) - Because of a typo error CXTPControl::GetRawRect and CXTPControl::SetRawRect changed to CXTPControl::GetRowRect and CXTPControl::SetRowRect
- Report Control
- CXTPReportView::SetReportCtrl method added to allow custom CXTPReportControl child class, please use CXTPReportView::GetReportCtrl() instead of m_wndReport
- Changed enumerators names: xtpGrid* to xtpReportGrid*; xtpColumn* to xtpReportColumn*