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
    1

    Getting a Device context

    I'm sure this is very easy to do, but I just can't figure it out I need a way to get a pDC for the screen from my view View class. However, I need this from a function where it isn't automatically passed in (e.g. OnPaste())

    Thanks in advance for the help.

    Brian Robbins
    http://www.cartoonwavs.com
    http://www.cs.du.edu/~brobbins

  2. #2
    Guest

    Re: Getting a Device context

    Check out the function GetDC(driver, device, output, NULL). By the by, you can get the driver, device and output info from the registry. I think you're right though, and there may be an easier way to do this. But at least this might give you an idea!


  3. #3
    Guest

    Re: Getting a Device context

    For CDC , use CDC * pDC = GetDC();
    For CClientDC use CClientDC dc(this);


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