leftMove proc
mov eax,oneRect.left
mov paintRect.left,eax
add eax,10
mov paintRect.right,eax
mov eax,oneRect.top
mov paintRect.top,eax
mov eax,oneRect.bottom
mov paintRect.bottom,eax
add oneRect.left,10
add oneRect.right,10
add paintRect.left,40
add paintRect.right,40
mov bProcess,1
mov b2,1
invoke InvalidateRect,hWinMain,addr paintRect,FALSE
;invoke FillRect,hDC,addr paintRect,hBrush1
invoke SendMessage,hWinMain,WM_PAINT,NULL,NULL
sub paintRect.left,40
sub paintRect.right,40
mov bProcess,1
mov b2,0
invoke InvalidateRect,hWinMain,addr paintRect,FALSE
;invoke FillRect,hDC,addr paintRect,hBrush2
ret
leftMove endp
the whole asm file is attached,
theinvoke SendMessage,hWinMain,WM_PAINT,NULL,NULL
is added to make it work,if i quoted out it,it will only paint onece