Problem regerding LineTo(..)
-
I want to draw lines on a dialog in MFC(SDI) application. Currently I am doing the same thing in OnDraw function of my CAppView by using the code. pDC->MoveTo(x1,y1); pDC->MoveTo(x1,y2); Now I want to draw these lines on a dialog. Is it possible. Can I use the same functions. If yes, Then what would I use in place of pDC to call these functions. If not refer me other ways of doing so. Reply me soon
-
I want to draw lines on a dialog in MFC(SDI) application. Currently I am doing the same thing in OnDraw function of my CAppView by using the code. pDC->MoveTo(x1,y1); pDC->MoveTo(x1,y2); Now I want to draw these lines on a dialog. Is it possible. Can I use the same functions. If yes, Then what would I use in place of pDC to call these functions. If not refer me other ways of doing so. Reply me soon
pDC->MoveTo(x,y) That is the startpoint where you will start drawing your line. I don't see why you move 2 times to the same place. I think you want something like this pDC->MoveTo(startpointx, startpointy); pDC->LineTo(endpointx, endpointy); so you needed LineTo with a EndPoint of course i hope this helps Greetings Jens
-
I want to draw lines on a dialog in MFC(SDI) application. Currently I am doing the same thing in OnDraw function of my CAppView by using the code. pDC->MoveTo(x1,y1); pDC->MoveTo(x1,y2); Now I want to draw these lines on a dialog. Is it possible. Can I use the same functions. If yes, Then what would I use in place of pDC to call these functions. If not refer me other ways of doing so. Reply me soon
Do the same thing you did in OnDraw() only do it in the dialogs OnPaint(). Trust in the code Luke. Yea right!