Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I start drawing in a Window called by DoModal()

Status
Not open for further replies.

Sedai

Programmer
Mar 4, 2001
158
US
I have a main dialog window. By pressing a button, I open a nother window with DoModal();
Then I use
Code:
CDC *pDC;    
pDC = GetDC();
CPen blackpen;
blackpen.CreatePen(PS_SOLID, 1, RGB(0,0,0));
pDC->SelectObject(&blackpen);
pDC->MoveTo(100,100);
pDC->LineTo(250, 350);
However, the above starts drawing in the main dialog window. How can I make it draw in the newly opened dialog.
Thanks!
Avendeval


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top