bash – How to display a program output through a “dialog” window

How can I reroute a program’s output to a dialog window instead of stdout or stderr using bash?

I don’t want to capture that output to a variable by using variable=$(appname) and display it afterwards by using dialog --msgbox. I want to have something like a runtime rerouting so that the program’s output is displayed in that dialog window as it happens. Not after it’s finished.

Is that possible?

Thank you!