C::b interacts with the user over his gui. What your program does is completaly over you. If you want a fancy gui, you have to write one in your program.
At the moment it is not possible to integrate the cmd window at the bottom in codeblocks. But you can try to create a tools+ menu entry and call your program over this. Tools+ has the ability to redirect the output to a c::b window.