As I read the memory device context is used to select a DDB object from the memory and draw on it.
Now what i'm trying to do is; select a bitmap object and draw a line on it, would it work that way?
void OnDraw(HDC hDC)
{
RECT wnd;
GetClientRect(m_hWnd, &wnd);
HDC memDC = CreateCompatibleDC ( hDC );
HBITMAP memBM = CreateCompatibleBitmap ( hDC, 200, 200 );
SelectObject ( memDC, memBM );
LineTo(memDC, 100, 100);
DeleteDC(memDC);
DeleteObject(memBM);
}
I'm confused with what i'm doing here.