Click to See Complete Forum and Search --> : DCs and DirectX8?
Stef
Jun 8th, 2001, 04:25 AM
Hello
In directdraw 7 it was possible to get the DC from a surface using the GetDC method. This way you could blit to it using standard API functions. In directx8 however, this function seems to have disappeared. Is there any way to get the DC from a texture or surface in DX8? (or blit to them from another DC in some way?)
kedaman
Jun 8th, 2001, 04:36 AM
I'd say it would be inefficient to do GDI operations on the surface and i think there isn't a way, but i think there's specific blit to DC or from DC operations you can use. What kind of blitting are you doing?
Stef
Jun 8th, 2001, 04:41 AM
I'm trying to blit the entire desktop image to a texture to use in a D3D screensaver...
kedaman
Jun 11th, 2001, 05:16 PM
there should be a method for that, at least there's in Dx7::Ddraw
In case there's not you could blit over using DMA.
Stef
Jul 29th, 2001, 01:21 PM
Do you have some sample code for doing that?
Zaei
Jul 30th, 2001, 12:00 PM
You cannot get a DC from a surface in DX8. Take a look at the Surface's "LockRect()" function, however. It should suit your purpose.
Z.
danielkw
Jan 28th, 2003, 01:37 PM
why dont you just save the desktop image to a file and then load that file into the surface?
Zaei
Jan 28th, 2003, 06:36 PM
How do you people FIND this stuff?!
Z.
Sastraxi
Jan 28th, 2003, 06:39 PM
Was just thinking that myself :rolleyes:
CornedBee
Jan 28th, 2003, 08:16 PM
Registered: Jan 70
:D
You could create a memory DC, then copy the data from the bitmap you selected over to the locked area...
But I guess it's far to late now to help.
Zaei
Jan 28th, 2003, 09:05 PM
Registered: Dec 69
The DB is screwed =).
Z.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.