You can have an endless loop, and in GUI application you actually should have one.
The problem with Acknex and endless loops is that Acknex never gets the control back and can't draw a new frame or respond to Windows events. Thus Windows thinks your application has stopped responding and marks it as irresponsive.
But in the background of Acknex there is at leas one while() loop, mainly the one which fires the drawing and the responding to windows events.
A typical application life cycle looks like this:
while(notTerminated)
{
dispatchEvents();
updateUI();
// Do some other stuff
}
(This is btw the perfect place to do non-blocking socket stuff to have asynchronous networking in the main thread)