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