Click to See Complete Forum and Search --> : dialog box drawing problem


Asha
April 1st, 1999, 04:03 AM
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

Rudolf
April 1st, 1999, 05:32 AM
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

April 5th, 1999, 11:52 PM
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