There's not much to tell, really. They're just libraries you can use to draw.
WinGDI ?and DirectX? are specific to Windows, so they're not cross-platform friendly. If you would like to target Mac and Linux users, OpenGL is a friendlier option. Shake the Windows-only development trap by not getting sucked into it in the first place! </soapbox>
I may be wrong on some technical points here, but this is more or less to give you a
very general idea.
The chain-o-command is like so:
Your Program -> Graphics library -> Video driver -> Video card -> Monitor
Your program uses a graphic library (such as DirectX, OpenGL, or a higher level widgetry lib like WinAPI/WinGDI) to draw things. This graphics library relays this information to a video driver, which translates it into a series of register reads/writes that the hardware (video card) can understand, which sends a signal to the monitor telling it what to draw.
Different libraries all do pretty much the same thing, they just go about it in different ways and/or have different goals. For example WinAPI/GDI is geared towards making an interactive program with widgets, all of which uses a theme common to the entire OS. The program need not worry about all sorts of common drawing tasks, such as drawing individual buttons, caption bars, printing text, etc, etc. DirectX and OpenGL don't do all those kinds of things for you -- if you want to do something that seems simple (like print text), it might be a surprising amount of work, because you have to draw it all yourself. Conversely, DirectX and OpenGL make it much easier to do other things, like depth testing, alpha blending, rotation, scaling, and other 3D stuffs.
3rd party widget libs like Allegro, wxWidgets, FLTK typically add another layer to the process (fitting between Your Program and Graphics Library on the above chart). This extra layer allows them to be portable to other platforms.
Also is it possible that I could possibly write one with C++ code. |
Yes it's possible, but it's not practical in any sense of the word. Nor is it a good idea.