Hi, is there a way to process code while a window's being dragged without stopping the move?

I need to keep a foreign window (App B) in the same position relative to mine (App A). So when I move App A, App B needs to move at the same time. I'm using Subclassing, GetWindowRect, and SetWindowPos to do this. When I move App A, App B moves at the same time, but this code processing interrupts the movement of App A, so I have to click App A and start dragging again.

Thanks.