Well, the thing is, if you put an application into "block inside GUI" mode, it does just that. Or, at least its window thread does that. If the main thread and the window thread are the same (as is the case with Code::Blocks), this means the application does nothing in the mean time.
Try this for yourself, make a new OpenGL project using the wizard, this will build the classic, well-known "spinning triangle" demo. Very fancy to look at.
The demo does nothing but draw a spinning, colored triangle as fast as it can, and pump messages in between, so the application works in a "normal way" (i.e. it does not show the "application is hung" dialog, and the window can be dragged and closed).
Now click on the system menu or drag the window. And behold, the triangle stops spinning. CPU usage is zero, but also the application is not doing anything.