I'm having problems with the basics of windows api programming.
before you attack me i do have a book, and i did read on-line tutorials on the subject, but they are so blur.
all i need is a simple explanation on:

1. what is a Device Context ?

2. how does the SelectObject() works, what does it mean selecting an object?

3. when i want to use an object or draw something why do i need to create a compatibleDC, like so:
Code:
HDC hDC, memDC;
HBRUSH hBrush;

hDC = GetDC(hwnd);
memDC = CreateCompatibleDC(hdc);

hBrush = (HBRUSH) GetStockObject(WHITE_BRUSH);
SelectObject(memDC, hBrush);
PatBlt(memDC, 0, 0, 100, 100, PATCOPY);

BitBlt(hDC, 0, 0, 100, 100, memDC, 0, 0, SRCCOPY);
ReleaseDC(hwnd, hDC);
DeleteDC(memDC);


thank you very much,