I didn't realize that this is the same guy who wanted to know how to use a static control to show a line on a window :-)
cgraus wrote:
Nishes reply to this question previously will allow you to do a line on your form. If you want the line to follow a function like sin(x), then you need to write your own control, no built in control does this.
Nishes reply to this question previously will allow you to do a line on your form. If you want the line to follow a function like sin(x), then you need to write your own control, no built in control does this.
about that Question. finaly I wrote my simple control:
this is my code:
CClientDC dc(this); CRect DRect; GetClientRect(&DRect); int a=DRect.Width(); int b=DRect.Height(); CRect myRect; m_design.GetWindowRect(&myRect); ScreenToClient(&myRect); CBrush ibr1(RGB(10,10,10)); CPen ibr2(PS_SOLID,1,RGB(255,255,255)); dc.SelectObject(&ibr1); dc.Rectangle(&myRect); int A=myRect.Width(); int B=myRect.Height(); int Top=myRect.top; int Bottom=myRect.bottom; int Left=myRect.left; int Right=myRect.right;.............and .......
my Line design in this Area (m_design is static control)
Please Help Me! Please...Please...!
Saul45521
I didn't realize that this is the same guy who wanted to know how to use a static control to show a line on a window :-)
Angela from Colombia
Nishes reply to this question previously will allow you to do a line on your form. If you want the line to follow a function like sin(x), then you need to write your own control, no built in control does this.
agos
Do you mean you want to plot a sine curve on a static control
If so, this article may help :- http://www.codeproject.com/csharp/PlothelpAlltogether.asp
It's in C#, but the code should be easily convertible.
Bill House
*grin* the question is the same, so I clicked the name, you can view the recent posts from there.
Shouldn't you be working on your book You're not going to do a CP all over again and overtake my post count here are you :P
Imran Farooqui
Sorry, that was my reply to nish. I've known him for years :-)
I hope you solved your problem :-)
VB Nut
Hi my friend! (if you Accept!!!!!)
about that Question. finaly I wrote my simple control:
this is my code:
CClientDC dc(this);
CRect DRect;
GetClientRect(&DRect);
int a=DRect.Width();
int b=DRect.Height();
CRect myRect;
m_design.GetWindowRect(&myRect);
ScreenToClient(&myRect);
CBrush ibr1(RGB(10,10,10));
CPen ibr2(PS_SOLID,1,RGB(255,255,255));
dc.SelectObject(&ibr1);
dc.Rectangle(&myRect);
int A=myRect.Width();
int B=myRect.Height();
int Top=myRect.top;
int Bottom=myRect.bottom;
int Left=myRect.left;
int Right=myRect.right;.............and .......
my Line design in this Area (m_design is static control)
Ritesh Patel
thank Nishant Sivakumar !
thank you very much for your help.
jproberts
ok. I will work on my book.
thank for your *grin*.
you break my heart !