I'm trying to render a bitmap. The actual rendering seems to work fine, however since I'm rendering on top of another controls (a tab control to be precise) my own rendering doesn't show up. It's overwritten by the tab control's rendering. If I disable the default renderings my bitmap showsup but then , of course, the controls won't.

I did the default drawings first and then my own (I thought mine would overwrite theirs then, but nope...).

This is my WM_PAINT handler:
Code:
//Render
case WM_PAINT:
{
	//Render the normal windows
	DefWindowProc(Handle, Message, wParam, lParam);

	//Render the image (if neccessary)
	if(CurrentBitmap != NULL)
	{
		RenderImage();
	}
	return 0;
}
and my RenderImage function basically looks like this:

Code:
//Data
PAINTSTRUCT PaintStruct;
HDC SourceDevice;
HDC TargetDevice;

//Retrieves a target device
TargetDevice = BeginPaint(ImageFrame, &PaintStruct);
if(TargetDevice == NULL)
{
	return FALSE;
}

//Retrieves a source device
SourceDevice = CreateCompatibleDC(TargetDevice);
if(SourceDevice == NULL)
{
	EndPaint(ImageFrame, &PaintStruct);
	return FALSE;
}

//Select a handle to the bitmap object
if(!SelectObject(SourceDevice, CurrentBitmap))
{
	DeleteDC(SourceDevice);
	EndPaint(ImageFrame, &PaintStruct);
	return FALSE;
}

//Blits an image
if(!BitBlt(TargetDevice, 1, 1, ImageFrameWidth, ImageFrameHeight, SourceDevice, 0, 0, SRCCOPY))
{
	DeleteDC(SourceDevice);
	EndPaint(ImageFrame, &PaintStruct);
	return FALSE;
}

//Clean up
DeleteDC(SourceDevice);
EndPaint(ImageFrame, &PaintStruct);
Any suggestions?