GetGDISurface. What is it for?

Started by
1 comment, last by ed091maf 24 years, 7 months ago
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).]

Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!
Advertisement
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?

Ernis
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

Creativity is a bloody nuisance and an evil curse that will see to it that you die from stress and alcohol abuse at a very early age, that you piss off all your friends, break appointments, show up late, and have this strange bohemian urge (you know that decadent laid-back pimp-style way of life). The truly creative people I know all live lousy lives, never have time to see you, don't take care of themselves properly, have weird tastes in women and behave badly. They don't wash and they eat disgusting stuff, they are mentally unstable and are absolutely brilliant. (k10k)

This topic is closed to new replies.

Advertisement