![]() ![]() |
||
Steps: 1.Create a new class CAnchorShape which uses CFODrawPortsShape as base class, this work can be done with ClassWizard.exe that shipped with E-XD++. 2.Modify the following method of CExtDataModel: // Call before create shape new shape. 3. Add new methods to CAnchorTestView for mouse drawing: void CAnchorTestView::OnDrawAnchor() { // TODO: Add your command handler code here m_drawshape = MY_ANCHOR_SHAPE; SetCurrentDrawingCursor(IDC_FO_DRAW_COMP_CURSOR); m_action_state = State_DrawRect; m_bUpRightMode = FALSE; } void CAnchorTestView::OnUpdateDrawAnchor(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here pCmdUI->SetCheck(m_drawshape == MY_ANCHOR_SHAPE); } And
Steps: 1.Create a new class CMyThreePointEllipseShape which uses CFOPAdvAnchorShapeas base class, this work can be done with ClassWizard.exe that shipped with E-XD++. 2.Modify the following method of CExtDataModel: // Call before create shape new shape. case My_THREEPOINT_ELLIPSE: 3. Add new methods to CAnchorTestView for mouse drawing: void CAnchorTestView::OnDrawThreeellipse() { // TODO: Add your command handler code here m_drawshape = My_THREEPOINT_ELLIPSE; SetCurrentDrawingCursor(IDC_CURSOR_ELLIPSE); m_action_state = State_DrawDimLine; m_bUpRightMode = FALSE; } void CAnchorTestView::OnUpdateDrawThreeellipse(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here BOOL bDesign = GetCurrentModel()->IsDesignMode(); pCmdUI->Enable(bDesign); pCmdUI->SetCheck(m_drawshape == My_THREEPOINT_ELLIPSE); } 4. Override the following method of CAnchorTestView for handle drawing: // Draw Track Dimension Line
|
Copyright ?1998-2007 UCanCode.Net Software, all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.
Please direct your questions or comments to webmaster@ucancode.com