O'Reilly logo

Windows Graphics Programming Win32 GDI and DirectDraw® by Feng Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. GDI/DirectDraw Internal Data Structures

The Windows API often claims to be object based, which is close to, but not exactly the same as, object oriented. To use the Win32 API, you often have to create objects of some kind, manipulate them through some functions, and then finally destroy them. When you create an object, the operating system is completely managing the internal representation of the object, and you as a programmer only see a handle.

GDI uses dozens of different kinds of objects, device contexts, logical pens, logical brushes, logical fonts, logical palettes, device-independent bitmaps, DIB sections, etc. For all of them, you only see a handle, a mysterious handle which you can't do anything about except pass it back to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required