Click to See Complete Forum and Search --> : HELP....using ExtTextOut in VC++
Azie
March 29th, 1999, 03:41 AM
I got a problem using ExtTextOut. I am trying to display text inside a rectangle or circle. When I ran the program it gives me assertion fault. What is causing it? If there are any examples on using this function please let me know...
Thanks a lot.
Martin Speiser
March 29th, 1999, 06:44 AM
Hi Azje,
you didn't say anything about the line or the file where the assert occured, so I looked in the MFC source files. The only asserts I found are when the CDC is not created properly so CDC::m_hDC is NULL.
Martin
Azie
March 30th, 1999, 03:58 AM
I am using the ExtTextOut in the View file in the OnDrawEllipse class. The only
example that I could find is the one used in OnDraw class.
I want to label the circle(inside). How can achieve this without CDC::m_hDC
being NULL?
Thanks
Martin Speiser
March 30th, 1999, 05:03 AM
Hi Azie,
sorry, but I don't found any OnDrawEllipse class or function in the MFC or SDK documentation. There's a OnDraw function in the MFC, a member of the CView class, but there you get a pointer to a CDC class, so you can call CDC::ExtTextOut. If you need to get a CDC by yourself I recommend you to look at the CDC class, especially at GetDC or CreateDC.
Martin
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.