Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: How can I Draw line!!
Started by GUY at 08-21-2008 10:19. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  08-21-2008, 10:19
GUY is not online. Last active: 8/23/2008 2:30:42 AM GUY

Top 500 Posts
Joined on 08-21-2008
Posts 8
How can I Draw line!!
Reply Quote

Hellow I`m a newbie developer.

In Visual studio 2005 C++, base project type Dialogbox on Picture control, I want to draw line, and write text. just it.

this is my code. please don`t laugh too much.

void CInputDataDlg::DrawCross(void)
{
 LBitmapWindow m_AniWnd;
 LAnnLine  m_Line;

 LPRECT lprc = new CRect;
 L_INT nRet=0;
 
 HDC hDC = ::GetDC(m_hWnd);

 nRet = m_Line.Create();


 if (nRet !=SUCCESS){
  MessageBox(_T("Fail to Create"));
 }
 else {
  m_Line.SetLineStyle(ANNLINE_SOLID,0);
  m_Line.SetLineWidth(5,0);
  m_Line.SetFixed(TRUE,TRUE,0);
  m_Line.SetForeColor(0x00FFFFFF,0);
  lprc->top=10;
  lprc->bottom=30;
  lprc->left=10;
  lprc->right=30;
  nRet= m_Line.Draw(hDC,lprc);


 }

}

 

create and draw funtion`s return are SUCSSE. but I can`t see any line please tell me. what can I do

if  possible give me some example draw line


   Report 
  08-21-2008, 16:38
Walter is not online. Last active: 11/13/2008 12:56:37 PM Walter



Top 25 Posts
Joined on 04-14-2008
Charlotte, NC
Posts 114
Re: How can I Draw line!!
Reply Quote
If you minimize the window and restore it, does the line appear then? If so, then this is a simple repainting issue. For that, just call:
Invalidate(true);

This will cause the form to repaint.
Walter
Technical Support
LEADTOOLS
support@leadtools.com
   Report 
  08-21-2008, 19:03
GUY is not online. Last active: 8/23/2008 2:30:42 AM GUY

Top 500 Posts
Joined on 08-21-2008
Posts 8
Re: How can I Draw line!!
Reply Quote

I did it. but also I can`t see any line.

I wonder I use fit handle and coordinate to draw line. is that property enough ? Is there any more funtion required to draw line?

 


   Report 
  08-22-2008, 17:29
Walter is not online. Last active: 11/13/2008 12:56:37 PM Walter



Top 25 Posts
Joined on 04-14-2008
Charlotte, NC
Posts 114
Re: How can I Draw line!!
Reply Quote
Try m_Line.SetVisible(true, 0, null);

This method, SetVisible, marks the annotation as visible in the container. It could be that it is defaulted to invisible.

If this still doesn't help, could you tell me what version of our toolkit you're using?
Walter
Technical Support
LEADTOOLS
support@leadtools.com
   Report 
Post
LEAD Support Fo... » Developer » Annotations » Re: How can I Draw line!!

Powered by Community Server, by Telligent Systems