dialog box drawing problem
Hai there i have created a dialog box , in that i am drawing some lines , i want the lines color same as background color and line width should be more than the default setting width ,
in OnPaint()
{
dc.MoveTo(0,0);
dc.LineTo(200,200);
}
this code works fine drwing line but inh black color , i want it to be by the same background color , and little bit width more
can anyone help me?\
thanx in advance
asha
Re: dialog box drawing problem
Hi,
LineTo draws the line with the selected pen. Create the pen (includes color and line width) You like with the CreatePen method of CPen and select it with CDC::SelectObject. Don't forget to reselect the old pen and delete Your pen afterwards.
Hope for help
Rudolf
Re: dialog box drawing problem
Hi Asha,
You are still there with the same problem??!!??
Just go through the CPen::CPen function and you will be able to solve the problem.
But one thing, if you draw the line with the background color, You definitely will not see the line since
both are of the same color.
Anyway all the best
Bye
Vittal