Click to See Complete Forum and Search --> : Getting a Device context


Brian Robbins
April 2nd, 1999, 02:28 PM
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

April 2nd, 1999, 02:49 PM
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!

April 2nd, 1999, 04:11 PM
For CDC , use CDC * pDC = GetDC();
For CClientDC use CClientDC dc(this);