ScaleActionSample Example for Visual C++ 5.0
void ScaleActionSample(CLEADRasterContainerViewer * pLEADContainerViewer)
{
TRY
{
pLEADContainerViewer->SetEnableMethodErrors (TRUE);
// Activate scale action if the action is not activated
if(!pLEADContainerViewer->ScaleAction().GetUse ())
pLEADContainerViewer->ScaleAction().ActivateAction (TRUE, 0);
// Select left mouse button to control scale action parameters.
pLEADContainerViewer->ScaleAction().SetMouseButtonAction (CONVIEW_MOUSE_BUTTON_LEFT, CONVIEW_ACTION_ACTIVEONLY|CONVIEW_ACTION_REALTIME);
// Select left, right, up, and down keys to control scale parameters.
pLEADContainerViewer->ScaleAction().SetModifier (CONVIEW_KEY_ALT);
pLEADContainerViewer->ScaleAction().SetKey (VK_DOWN);
pLEADContainerViewer->ScaleAction().SetKeyboardAction (CONVIEW_MOUSEMOVE_DOWN);
pLEADContainerViewer->ScaleAction().SetKey(VK_UP);
pLEADContainerViewer->ScaleAction().SetKeyboardAction(CONVIEW_MOUSEMOVE_UP);
// Select scale cursor.
CPictureHolder PicHolder;
if(PicHolder.CreateFromIcon(LoadCursor(NULL, IDC_CROSS)))
{
pLEADContainerViewer->ScaleAction().SetCursor (PicHolder.GetPictureDispatch());
}
// Specify scale parameters.
pLEADContainerViewer->ScaleAction().SetChange (100);
pLEADContainerViewer->ScaleAction().SetCircularMouseMove (TRUE);
// Set scale parameters.
pLEADContainerViewer->ScaleAction ().SetAction(0, CONVIEW_ACTIONLEVEL_CONTAINER);
}
CATCH_ALL(e)
{
e->ReportError();
}
END_CATCH_ALL
}