LoadUseViewPerspective example for C++ 4.0 and later
Note: This topic is for Document/Medical only.
This example times the loading of a bitmap with and without changing the internal view perspective.
// Declare local variables.
CTime StartTime, EndTime;
CTimeSpan DeltaTime;
// Do not include paints when measuring time.
m_Lead1.SetAutoRepaint (FALSE);
// Time the load using the bitmap's view perspective.
m_Lead1.SetLoadUseViewPerspective (TRUE);
StartTime = CTime::GetCurrentTime();
m_Lead1.Load ("d:\\lead\\images\\rotated.tif", 0, 0, 1);
EndTime = CTime::GetCurrentTime();
DeltaTime = EndTime - StartTime;
MessageBox (DeltaTime.Format("%S seconds loaded as is" ), "Notice", MB_OK);
// Time the load that converts the bitmap's view perspective.
m_Lead1.SetLoadUseViewPerspective (FALSE);
StartTime = CTime::GetCurrentTime();
m_Lead1.Load ("d:\\lead\\images\\rotated.tif", 0, 0, 1);
EndTime = CTime::GetCurrentTime();
DeltaTime = EndTime - StartTime;
MessageBox (DeltaTime.Format("%S seconds converted on load" ), "Notice", MB_OK);