Home | Products | Download | Purchase | Support 


   

OwnTool Sample

 

 

The OwnTool sample demonstrates the how to draw the other over 130 shapes in E-XD++ Library, in fact, you can do the same to draw all other custom shapes that created by yourself, you can also setting the drawing cursor, up -right mode or others.

Steps:

Draw button with a rectangle drawing tracker, just call the following codes, you need setting the shape ID, the drawing cursor, the action state, and Up - right mode:


void COwnToolView::OnDrawBevel() 
{
	// TODO: Add your command handler code here
	m_drawshape = FO_COMP_BEVEL_COMP;
	SetCurrentDrawingCursor(IDC_FO_DRAWRECT_CURSOR);
	m_action_state = State_DrawRect;
	m_bUpRightMode = FALSE;
}

void COwnToolView::OnUpdateDrawBevel(CCmdUI* pCmdUI) 
{
	// TODO: Add your command update UI handler code here
	BOOL bDesign = GetCurrentModel()->IsDesignMode();
	pCmdUI->Enable(bDesign);

	pCmdUI->SetCheck(m_drawshape == FO_COMP_BEVEL_COMP && (!m_bUpRightMode));
}

void COwnToolView::OnDrawCorner() 
{
	// TODO: Add your command handler code here
	m_drawshape = FO_COMP_CORNER_COMP;
	SetCurrentDrawingCursor(IDC_FO_DRAWRECT_CURSOR);
	m_action_state = State_DrawRect;
	m_bUpRightMode = FALSE;
}

void COwnToolView::OnUpdateDrawCorner(CCmdUI* pCmdUI) 
{
	// TODO: Add your command update UI handler code here
	BOOL bDesign = GetCurrentModel()->IsDesignMode();
	pCmdUI->Enable(bDesign);

	pCmdUI->SetCheck(m_drawshape == FO_COMP_CORNER_COMP && (!m_bUpRightMode));
}


[ Home | Products | Download Area | Purchase | SupportContact us ]


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