Hi Igor
I measured the distance that the object in the paint box in the sub window moved roughly and it looked like it moved three times. It appeared that the last InvalidateRect() went through (I.e. x=x+10 in "case WM_LBUTTONUP:"). You are a brilliant teacher!
Many thanks
regards
Chong