I'm trying to make a program with a framebuffer but Im having problems with BitBlt. Its giving me very wierd displays.
It is just meant to copy the memhdc over hdc and draw hdc but its giving me various displays depending on the amount of calls to it.

1 call: works correctly except redaws over entire window not just client area.

2 call: tries to fit entire desktop into client area

3 call:redraws entire window into client area

4 call: same as 2

5 call: works fine

This is not the only set of calls I get but this is the most common and most sets include the same things only in different order. This is my BitBlt call:
BitBlt(hdc, 0, 0, clientWidth, clientHeight, memhdc, 0, 0, SRCCOPY) ;

clientWidth and clientHeight is initilized in WM_CREATE to the height and width of the Client area respectivly.
Also if I have the window in the background it doesnt re-paint as seemingly random part of my window

Any help would be most appreciated

Sincerly,
Isometric