Application Just halts?
Have you tried to comment BitBlt line and leave just GetDC/ReleaseDX sequence and see what will happen?
Or have you tried to run it without Delphi debugger attached?

Upps, it seems to late ;-)

Ok. "Where to place the loop" is already discussed somethere on these forums lately. In your case of [holding] scroll bars of TRichEdit the only solution seems to be create a separate thread and render from it - but it's dangerous!