Came across the function RestoreDC()... tried using it in the folowing code
Code:
hBmp = RadarBgrnd.GetHandle();
hMemDC = CreateCompatibleDC(0);
hOldBmp = SelectObject(hMemDC, hBmp);
//Save the DC to be used later
savedDC = SaveDC(hMemDC);
SelectObject (hMemDC, hOldBmp);
DeleteDC(hMemDC);
// Restore the saved DC and draw line on it
RestoreDC(hMemDC, savedDC);
MoveToEx(hMemDC, coord.x,coord.y, &myPoint);
LineTo(hMemDC, coord.x+factor.x,coord.y+factor.y);
SelectObject (hMemDC, hOldBmp);
DeleteDC(hMemDC);
RadarBgrnd.Repaint ();
Really this is just to test if Restore DC works... Results are as if hMemDC to draw to does not exist because no line is drawn... Is RestoreDC correctly used in the above code?