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

    Drawing in a control

    I would like to make a control that I can use to draw on part of a formview window using the GDI functions. i.e. to make a plot that takes up a fraction of the window, but has its own ClientDC.
    How do I do this in MFC?


  2. #2
    Join Date
    May 1999
    Posts
    31

    Re: Drawing in a control

    Hi,

    Since CFormView is based on a dialog resource, add a button control on the resource where you want to draw, check the Owner Draw property, and override OnDrawItem. It works for me, although there is probably a better way.

    Daniel.


  3. #3
    Join Date
    Apr 1999
    Posts
    4

    Re: Drawing in a control

    Thanks, Daniel, I'll try it.
    Joe



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