I have a small 2D rendering library in C++ that runs on Win32 apps, and uses Direct2D to do it's drawing. I have called BeginDraw(), done a load of drawing and then called DrawText(). This is of course before EndDraw().
Instead of returning so I can carry on making calls to rendering functions, it stalls because it has sent a WM_PAINT (presumably without waiting).(and will continue to send the message until maybe the window is validated? I don't know)
I have tried to catch the call and test if I'm drawing at the time, in which case pretend I have processed the message correctly (but without actually validating any client region manually), but it just keeps sending it, and DrawText() doesn't return.
Is this normal behaviour and what to do about it?
(I'm using visual studio community 2013 as well.)