Jump to content

  • Log In with Google      Sign In   
  • Create Account


GetGDISurface. What is it for?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 ed091maf   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 October 1999 - 10:17 AM

Could anybody explain me, in what circumstances GetGDISurface could be used?

Actually i have a problem. I am creating a level editor for my own game using MFC and DirectX. All the tiles are contained in the DirectDraw surfaces.

I want to make a window that is always ontop of the main level editor window, in other words it is a floating window. Could anybody tell me, how to blit a tile from DirectX surface to the ontop window. Is it posible to blit from DirectDraw surface to GDI?


Sponsor:

#2 mason   Members   -  Reputation: 128

Like
Likes
Like

Posted 01 October 1999 - 06:54 AM

The way I've always done it is to call DirectDrawSurface::GetDC(), and use this in a subsequent call to BitBlt. Just make sure you also call ReleaseDC() when you're done, and forget about using the debugger between the two, 'cause you're locking the surface.

Mason McCuskey
Spin Studios
www.spin-studios.com


[This message has been edited by mason (edited October 01, 1999).]


#3 revolver   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 October 1999 - 10:17 AM

You would call that function, and use the returned surface for GDI drawing functions such as TextOut() (OutText()? I dunno).

I really don't use it that much.

Bitmapped fonts are much better to use, and can be smoothed - where GDI just draws them with "jaggies".

It's a decent way to get cheap stuff done quick. But don't rely upon it too heavily.

------------------
Revolver, aka Brian Smith ( brian@angelhill.net )
Angel Hill programmer/designer (aka slave worker)
http://www.angelhill.net





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS