CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    40

    HELP....using ExtTextOut in VC++



    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.




  2. #2
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    418

    Re: HELP....using ExtTextOut in VC++



    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

  3. #3
    Join Date
    Apr 1999
    Posts
    40

    Re: HELP....using ExtTextOut in VC++



    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

  4. #4
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    418

    Re: HELP....using ExtTextOut in VC++



    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured