Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Create ArrowLine
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Create ArrowLine

 Post Reply Post Reply
Author
Message
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Topic: Create ArrowLine
    Posted: 12 May 2006 at 9:23am

Hi.

I have problems to set properties by creating an arrow!

I create my Arrowline as listed below:

ViewClass:

void XDVView::OnArrowLine()
{
 m_drawshape = FO_COMP_ARROWLINE;
 SetCurrentDrawingCursor(IDC_FO_DRAWLINE_CURSOR);
 m_action_state = State_DrawLine;;
 m_bUpRightMode = FALSE;
}

MyDataModalClass:

void CMyExtDataModel::AddLineShape(UINT m_drawshape,LPPOINT pptPoints, int nCount,BOOL bArrow)
{
 switch(m_drawshape)
 {
 case FO_COMP_LINE:
  {
   CString strCaption;
   CString strName;
   strCaption = _T("");
   strName = _T("");
  
   CFOLineShape *pReturn = new CFOLineShape;
   pReturn->AddRef();
   pReturn->Create(pptPoints,nCount);
   pReturn->UpdatePosition();
   strCaption = GetUniqueCaption(m_drawshape);
   strName = GetUniqueName(m_drawshape);
   pReturn->SetObjectCaption(strCaption);
   pReturn->SetObjectName(strName);
   pReturn->SetLineWidth(4);
   pReturn->SetLineColor(RGB(0,255,0));
   if(bArrow)
   {
    pReturn->SetEndArrowType(5);
    pReturn->SetEndArrowWidth(5);
    pReturn->SetEndArrowLength(5);
   } 
   InsertShape(pReturn);
   pReturn->Release();
   pReturn=NULL;
   SetModifiedFlag(TRUE);
   break;
  }
 default:
  {
   CFODataModel::AddLineShape(m_drawshape,pptPoints,nCount,bArr ow);
  }
 }
}


It looks like this:

Can anybody help me? What's wrong?

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.035 seconds.