L
luser- -droog
Using the old GDI API directly *is* difficult.
Example 1: try drawing a graphic element in a certain colour. You can't just
select an RGB colour as you might expect; you have to create and allocatea
special 'pen' object, apply a colour to it, attach it to a device context,
use it, then deattach it, and deallocate it when you don't need that colour
anymore! (Or something along those lines.)
Example 2: once you've managed to draw your graphics, and then the windowis
obscured then uncovered, or minimised/restored, then your graphics will have
disappeared and have to be recreated! The original source data (random
numbers, arbitrary input from a stream, etc) no longer exists.
Your application has to written around always being able to *quickly*
recreate whatever is in any window. Which is a complete pain.
And that's true of pretty much everything in GDI. (And trying to use GDI+
from C is a magnitude or so worse, because it assumes C++)
It's not uncommon for a window system to require the client to redraw
the window. Even in X11, XSetWindowAttributes wa.backing_store is
still
just a hint.